from django.contrib import admin

from coin.vpn.models import VPNSubscription

# TODO: allow to regenerate IP endpoints (checkbox?)
class VPNAdmin(admin.ModelAdmin):
    def get_readonly_fields(self, request, obj=None):
        if obj:
            return ['login',]
        else:
            return []

admin.site.register(VPNSubscription, VPNAdmin)
