1 | from django.contrib import admin
|
---|
2 |
|
---|
3 | admin.site.apps = [
|
---|
4 | {
|
---|
5 | 'name': 'User Management',
|
---|
6 | 'classes': 'collapse-closed',
|
---|
7 | 'show_apps': True,
|
---|
8 | 'apps': ['auth', 'user', 'registration']
|
---|
9 | },
|
---|
10 | {
|
---|
11 | 'name': 'Main Content',
|
---|
12 | 'classes': 'collapse-closed',
|
---|
13 | 'show_apps': True,
|
---|
14 | 'apps': ['movies', 'stars']
|
---|
15 | },
|
---|
16 | {
|
---|
17 | 'name': 'Special Content',
|
---|
18 | 'classes': 'collapse-closed',
|
---|
19 | 'show_apps': False,
|
---|
20 | 'apps': ['festivals']
|
---|
21 | },
|
---|
22 | ...
|
---|
23 | ]
|
---|
24 |
|
---|
25 | from www.movies.models import Movie, MovieTip
|
---|
26 | from www.movies.admin import MovieOptions, MovieTipOptions
|
---|
27 |
|
---|
28 | from www.stars.models import Star, StarNews, StarInterview, StarCredit
|
---|
29 | from www.stars.admin import StarOptions, StarNewsOptions, StarInterviewOptions, StarCreditOptions
|
---|
30 |
|
---|
31 | from www.trailer.models import Trailer, TrailerItem, TrailerMobile
|
---|
32 | from www.trailer.admin import TrailerOptions, TrailerMobileOptions
|
---|
33 |
|
---|
34 | from www.gallery.models import Gallery, GalleryItem
|
---|
35 | from www.gallery.admin import GalleryOptions
|
---|
36 |
|
---|
37 | from www.festivals.models import SpecialScreening, SpecialScreeningSet, SpecialScreeningSetItem
|
---|
38 | from www.festivals.models import Award, AwardSet, AwardSetItem
|
---|
39 | from www.festivals.models import Festival, FestivalSet, FestivalSetItem
|
---|
40 | from www.festivals.admin import SpecialScreeningOptions, SpecialScreeningSetOptions, AwardOptions, AwardSetOptions, FestivalOptions, FestivalSetOptions
|
---|
41 |
|
---|
42 | main_site = admin.AdminSite()
|
---|
43 | main_site.register(Movie, MovieOptions)
|
---|
44 | main_site.register(MovieTip, MovieTipOptions)
|
---|
45 | main_site.register(Star, StarOptions)
|
---|
46 | main_site.register(StarNews, StarNewsOptions)
|
---|
47 | main_site.register(StarInterview, StarInterviewOptions)
|
---|
48 | main_site.register(StarCredit, StarCreditOptions)
|
---|
49 | main_site.register(Trailer, TrailerOptions)
|
---|
50 | main_site.register(TrailerMobile, TrailerMobileOptions)
|
---|
51 | main_site.register(Gallery, GalleryOptions)
|
---|
52 | main_site.register(SpecialScreening, SpecialScreeningOptions)
|
---|
53 | main_site.register(SpecialScreeningSet, SpecialScreeningSetOptions)
|
---|
54 | main_site.register(Award, AwardOptions)
|
---|
55 | main_site.register(AwardSet, AwardSetOptions)
|
---|
56 | main_site.register(Festival, FestivalOptions)
|
---|
57 | main_site.register(FestivalSet, FestivalSetOptions)
|
---|
58 |
|
---|
59 | main_site.apps = [
|
---|
60 | {
|
---|
61 | 'name': 'Main Content',
|
---|
62 | 'classes': '',
|
---|
63 | 'show_apps': True,
|
---|
64 | 'apps': ['movies', 'stars']
|
---|
65 | },
|
---|
66 | {
|
---|
67 | 'name': 'Special Content',
|
---|
68 | 'classes': '',
|
---|
69 | 'show_apps': False,
|
---|
70 | 'apps': ['festivals']
|
---|
71 | },
|
---|
72 | {
|
---|
73 | 'name': 'Relational Content',
|
---|
74 | 'classes': '',
|
---|
75 | 'show_apps': True,
|
---|
76 | 'apps': ['trailer', 'gallery']
|
---|
77 | }
|
---|
78 | ]
|
---|