admin.py 465 Bytes
Newer Older
Skia's avatar
Skia committed
1
from django.contrib import admin
Skia's avatar
Skia committed
2
from ajax_select import make_ajax_form
Skia's avatar
Skia committed
3
from core.models import User, Page, RealGroup, SithFile
4
from django.contrib.auth.models import Group as AuthGroup
Skia's avatar
Skia committed
5
6
7


admin.site.register(User)
8
admin.site.unregister(AuthGroup)
Skia's avatar
Skia committed
9
admin.site.register(RealGroup)
Skia's avatar
Skia committed
10
admin.site.register(Page)
Skia's avatar
Skia committed
11

Skia's avatar
Skia committed
12
13
14
15
16
@admin.register(SithFile)
class SithFileAdmin(admin.ModelAdmin):
    form = make_ajax_form(SithFile, {
        'parent': 'files',  # ManyToManyField
        })