Rizwan Haider | 30b3379 | 2016-08-18 02:11:18 -0400 | [diff] [blame^] | 1 | # admin.py - MetroNetworkService Django Admin |
| 2 | |
| 3 | from core.admin import ReadOnlyAwareAdmin |
| 4 | from django.contrib import admin |
| 5 | from services.metronetwork.models import * |
| 6 | |
| 7 | |
| 8 | class MetroServiceAdmin(ReadOnlyAwareAdmin): |
| 9 | model = MetroNetworkService |
| 10 | verbose_name = "MetroNetwork Service" |
| 11 | verbose_name_plural = "MetroNetwork Services" |
| 12 | list_display = ("name", "administrativeState") |
| 13 | list_display_links = ('name',) |
| 14 | fieldsets = [(None, { |
| 15 | 'fields': ['name', 'administrativeState', 'description'], |
| 16 | 'classes': ['suit-tab suit-tab-general']})] |
| 17 | |
| 18 | |
| 19 | admin.site.register(MetroNetworkService, MetroServiceAdmin) |