26 lines
No EOL
686 B
Python
26 lines
No EOL
686 B
Python
from django.contrib import admin
|
|
from django.contrib.auth.admin import UserAdmin
|
|
from django.contrib.auth.models import User
|
|
from monstage.models import *
|
|
|
|
class NormalienInline(admin.StackedInline):
|
|
model = Normalien
|
|
inline_classes = ("collapse open",)
|
|
|
|
class UserAdmin(UserAdmin):
|
|
inlines = (NormalienInline, )
|
|
|
|
|
|
class LieuStageInline(admin.StackedInline):
|
|
model = LieuStage
|
|
inline_classes = ("collapse open",)
|
|
extra = 0
|
|
|
|
class StageAdmin(admin.ModelAdmin):
|
|
inlines = (LieuStageInline, )
|
|
|
|
admin.site.unregister(User)
|
|
admin.site.register(User, UserAdmin)
|
|
admin.site.register(Lieu)
|
|
admin.site.register(StageMatiere)
|
|
admin.site.register(Stage, StageAdmin) |