Skip to content
Browse files

Uncommenting some admin functionality

* The Assets superclass functionality is not working correctly and not totally necessary so abandoning effort to repair til we have a more solid model anyways.
  • Loading branch information...
1 parent 31ebb5f commit 9e20fd23161efb98864f62f83f7ebf3dc5959061 Dustin Chesterman committed Feb 22, 2012
Showing with 33 additions and 36 deletions.
  1. +33 −36 rebootourschools/technologytracker/admin.py
View
69 rebootourschools/technologytracker/admin.py
@@ -1,20 +1,20 @@
-# from technologytracker.models import School
-# from technologytracker.models import Computer
+from technologytracker.models import School
+from technologytracker.models import Computer
# from technologytracker.models import LicensedSoftware
# from technologytracker.models import Printer
-# from technologytracker.models import Tablet
+from technologytracker.models import Tablet
# from technologytracker.models import MobileDevice
from technologytracker.models import District
from technologytracker.models import DistrictUserProfile
from django.contrib import admin
-# class SchoolsInline(admin.TabularInline):
-# model = School
-# extra = 1
+class SchoolsInline(admin.TabularInline):
+ model = School
+ extra = 1
-# class ComputersInline(admin.TabularInline):
-# model = Computer
-# extra = 1
+class ComputersInline(admin.TabularInline):
+ model = Computer
+ extra = 1
# class LicensedSoftwaresInline(admin.TabularInline):
# model = LicensedSoftware
@@ -24,38 +24,35 @@
# model = Printer
# extra = 1
-# class TabletsInline(admin.TabularInline):
-# model = Tablet
-# extra = 1
+class TabletsInline(admin.TabularInline):
+ model = Tablet
+ extra = 1
# class MobileDevicesInline(admin.TabularInline):
# model = Tablet
# extra = 1
-# class SchoolAdmin(admin.ModelAdmin):
-# fieldsets = [
-# ('School info', {'fields' : ['full_name', 'school_code', 'district']})
-# ]
-# list_display = ('full_name', 'school_code', 'district')
-# list_filter = ['district',]
-# search_fields = ['full_name', 'school_code']
-# inlines = [ComputersInline, LicensedSoftwaresInline, PrintersInline, TabletsInline, MobileDevicesInline]
+class SchoolAdmin(admin.ModelAdmin):
+ fieldsets = [
+ ('School info', {'fields' : ['full_name', 'school_code', 'district']})
+ ]
+ list_display = ('full_name', 'school_code', 'district')
+ list_filter = ['district',]
+ search_fields = ['full_name', 'school_code']
+# inlines = [ComputersInline, TabletsInline]
-# class DistrictAdmin(admin.ModelAdmin):
-# fieldsets = [
-# ('District info', {'fields' : ['full_name', 'district_code', 'city', 'state', 'county']})
-# ]
-# list_display = ('full_name', 'district_code', 'city', 'state', 'county')
-# list_filter = ['district_code']
-# search_fields = ['full_name', 'district_code', 'city', 'state', 'county']
-# inlines = [SchoolsInline]
-
-
-# admin.site.register(School, SchoolAdmin)
-
-
-
-admin.site.register(District)#, DistrictAdmin)
-admin.site.register(DistrictUserProfile)#, DistrictAdmin)
+class DistrictAdmin(admin.ModelAdmin):
+ fieldsets = [
+ ('District info', {'fields' : ['full_name', 'district_code', 'city', 'state', 'county']})
+ ]
+ list_display = ('full_name', 'district_code', 'city', 'state', 'county')
+ list_filter = ['district_code']
+ search_fields = ['full_name', 'district_code', 'city', 'state', 'county']
+ inlines = [SchoolsInline]
+
+
+admin.site.register(School, SchoolAdmin)
+admin.site.register(District, DistrictAdmin)
+admin.site.register(DistrictUserProfile)

0 comments on commit 9e20fd2

Please sign in to comment.
Something went wrong with that request. Please try again.