Sith/core/admin.py

17 lines
465 B
Python
Raw Normal View History

2015-11-18 08:44:06 +00:00
from django.contrib import admin
2016-11-25 12:47:09 +00:00
from ajax_select import make_ajax_form
2016-08-10 03:48:06 +00:00
from core.models import User, Page, RealGroup, SithFile
from django.contrib.auth.models import Group as AuthGroup
2015-11-18 08:44:06 +00:00
admin.site.register(User)
admin.site.unregister(AuthGroup)
2016-03-29 10:45:10 +00:00
admin.site.register(RealGroup)
2015-11-20 14:47:01 +00:00
admin.site.register(Page)
2015-11-18 08:44:06 +00:00
2016-11-25 12:47:09 +00:00
@admin.register(SithFile)
class SithFileAdmin(admin.ModelAdmin):
form = make_ajax_form(SithFile, {
'parent': 'files', # ManyToManyField
})