admin.py 3.19 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from django.contrib import admin
from reversion_compare.admin import CompareVersionAdmin

from backend.models.location import Country, City

from backend.models.location import CountryCulture
from backend.models.location import CountryHealthInsurance
from backend.models.location import CountryOtherInsurance
from backend.models.location import CountryTransport
from backend.models.location import CountryTourism
from backend.models.location import CountryOtherStuff
from backend.models.location import CountryVisaAdministrative
from backend.models.location import CountryPhoto
from backend.models.location import CountryScholarship
from backend.models.location import CountryDri

from backend.models.location import CityTransport
from backend.models.location import CityTourism
from backend.models.location import CityOtherStuff

from backend.models.university import University, Campus, UniversityScholarship

from backend.models.university import UniversityInfo
from backend.models.university import UniversitySemestersDates
from backend.models.university import UniversityInsurance
from backend.models.university import UniversityCourses
from backend.models.university import UniversityCulture
from backend.models.university import UniversityOtherStuff
from backend.models.university import UniversitySpecialOffer
from backend.models.university import UniversityPhoto
from backend.models.university import UniversityDri

from backend.models.university import CampusTransport
from backend.models.university import CampusAccommodation
from backend.models.university import CampusCultureAndStudentLife
from backend.models.university import CampusOtherStuff

from backend.models.module import Currency
from backend.models.otherCore import Department
from backend.models.otherCore import Offer
from backend.models.otherCore import Semester
from backend.models.otherCore import Specialty

from backend.models.user import Recommendation
from backend.models.user import RecommendationList
from backend.models.user import PreviousDeparture
from backend.models.user import PreviousDepartureFeedback
from backend.models.user import UserData

Florent Chehab's avatar
Florent Chehab committed
50
from backend.models.my_model import PendingModeration
51

52
53
54
55
56
57
58
59
60
61
62
63
CLASSIC_MODELS = [
    Country,
    City,
    Currency,
    Department,
    Offer,
    Semester,
    Specialty,
    Recommendation,
    RecommendationList,
    PreviousDeparture,
    PreviousDepartureFeedback,
64
65
    UserData,
    PendingModeration
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
]

VERSIONNED_MODELS = [
    University,
    Campus,
    UniversityScholarship,
    UniversityInfo,
    UniversitySemestersDates,
    UniversityInsurance,
    UniversityCulture,
    UniversityCourses,
    UniversityOtherStuff,
    UniversitySpecialOffer,
    UniversityPhoto,
    CountryCulture,
    CountryHealthInsurance,
    CountryOtherInsurance,
    CountryTransport,
    CountryTourism,
    CountryOtherStuff,
    CountryVisaAdministrative,
    CountryPhoto,
    CountryScholarship,
    CityTransport,
    CityTourism,
    CityOtherStuff,
    CampusTransport,
    CampusAccommodation,
    CampusCultureAndStudentLife,
    CampusOtherStuff,
    CountryDri,
    UniversityDri,
]

for model in CLASSIC_MODELS:
    admin.site.register(model)

for model in VERSIONNED_MODELS:
    admin.site.register(model, CompareVersionAdmin)