|
@@ -2,4 +2,11 @@ from django.contrib import admin
|
|
|
|
|
|
from coin.vpn.models import VPNSubscription
|
|
|
|
|
|
-admin.site.register(VPNSubscription,)
|
|
|
+class VPNAdmin(admin.ModelAdmin):
|
|
|
+ def get_readonly_fields(self, request, obj=None):
|
|
|
+ if obj:
|
|
|
+ return ['login',]
|
|
|
+ else:
|
|
|
+ return []
|
|
|
+
|
|
|
+admin.site.register(VPNSubscription, VPNAdmin)
|