admin.py 1.72 KB
Newer Older
Florent Chehab's avatar
Florent Chehab committed
1
from django.contrib import admin
2
3
from reversion_compare.admin import CompareVersionAdmin

4
5
from rex.models.location import Country, City

Florent Chehab's avatar
Florent Chehab committed
6
7
8
9
10
11
12
13
14
from rex.models.location import CountryCulture
from rex.models.location import CountryHealthInsurance
from rex.models.location import CountryOtherInsurance
from rex.models.location import CountryTransport
from rex.models.location import CountryOtherStuff
from rex.models.location import CountryVisaAdministrative
from rex.models.location import CountryPhoto
from rex.models.location import CountryScholarship

15
from rex.models.university import University, Campus, UniversityScholarship
16

17
from rex.models.university import UniversityInfo
18
from rex.models.university import UniversitySemestersDates
Florent Chehab's avatar
Florent Chehab committed
19
from rex.models.university import UniversityInsurance
20
21
22
23
24
25
26
from rex.models.university import UniversityCourses
from rex.models.university import UniversityCulture
from rex.models.university import UniversityOtherStuff
from rex.models.university import UniversitySpecialOffer
from rex.models.university import UniversityPhoto

from rex.models.tools import Currency
27

Florent Chehab's avatar
Florent Chehab committed
28
29
CLASSIC_MODELS = [
    Country,
30
31
    City,
    Currency
Florent Chehab's avatar
Florent Chehab committed
32
]
Florent Chehab's avatar
Florent Chehab committed
33

Florent Chehab's avatar
Florent Chehab committed
34
35
36
37
38
VERSIONNED_MODELS = [
    University,
    Campus,
    UniversityScholarship,
    UniversityInfo,
39
40
41
42
43
44
45
    UniversitySemestersDates,
    UniversityInsurance,
    UniversityCulture,
    UniversityCourses,
    UniversityOtherStuff,
    UniversitySpecialOffer,
    UniversityPhoto,
Florent Chehab's avatar
Florent Chehab committed
46
47
48
49
50
51
52
53
    CountryCulture,
    CountryHealthInsurance,
    CountryOtherInsurance,
    CountryTransport,
    CountryOtherStuff,
    CountryVisaAdministrative,
    CountryPhoto,
    CountryScholarship,
Florent Chehab's avatar
Florent Chehab committed
54
]
Florent Chehab's avatar
Florent Chehab committed
55

Florent Chehab's avatar
Florent Chehab committed
56
57
58
59
60
for model in CLASSIC_MODELS:
    admin.site.register(model)

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