admin.py 2.63 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
from rex.models.location import CountryCulture
from rex.models.location import CountryHealthInsurance
from rex.models.location import CountryOtherInsurance
from rex.models.location import CountryTransport
Florent Chehab's avatar
Florent Chehab committed
10
from rex.models.location import CountryTourism
Florent Chehab's avatar
Florent Chehab committed
11
12
13
14
from rex.models.location import CountryOtherStuff
from rex.models.location import CountryVisaAdministrative
from rex.models.location import CountryPhoto
from rex.models.location import CountryScholarship
Florent Chehab's avatar
Florent Chehab committed
15
from rex.models.location import CountryDri
Florent Chehab's avatar
Florent Chehab committed
16

Florent Chehab's avatar
Florent Chehab committed
17
18
19
20
from rex.models.location import CityTransport
from rex.models.location import CityTourism
from rex.models.location import CityOtherStuff

21
from rex.models.university import University, Campus, UniversityScholarship
22

23
from rex.models.university import UniversityInfo
24
from rex.models.university import UniversitySemestersDates
Florent Chehab's avatar
Florent Chehab committed
25
from rex.models.university import UniversityInsurance
26
27
28
29
30
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
Florent Chehab's avatar
Florent Chehab committed
31
from rex.models.university import UniversityDri
32

Florent Chehab's avatar
Florent Chehab committed
33
34
35
36
37
from rex.models.university import CampusTransport
from rex.models.university import CampusAccommodation
from rex.models.university import CampusCultureAndStudentLife
from rex.models.university import CampusOtherStuff

Florent Chehab's avatar
Florent Chehab committed
38
39
40
41
42
43
from rex.models.module import Currency
from rex.models.otherCore import Department
from rex.models.otherCore import Offer
from rex.models.otherCore import Semester
from rex.models.otherCore import Specialty

44

Florent Chehab's avatar
Florent Chehab committed
45
46
CLASSIC_MODELS = [
    Country,
47
    City,
Florent Chehab's avatar
Florent Chehab committed
48
49
50
51
52
    Currency,
    Department,
    Offer,
    Semester,
    Specialty,
Florent Chehab's avatar
Florent Chehab committed
53
]
Florent Chehab's avatar
Florent Chehab committed
54

Florent Chehab's avatar
Florent Chehab committed
55
56
57
58
59
VERSIONNED_MODELS = [
    University,
    Campus,
    UniversityScholarship,
    UniversityInfo,
60
61
62
63
64
65
66
    UniversitySemestersDates,
    UniversityInsurance,
    UniversityCulture,
    UniversityCourses,
    UniversityOtherStuff,
    UniversitySpecialOffer,
    UniversityPhoto,
Florent Chehab's avatar
Florent Chehab committed
67
68
69
70
    CountryCulture,
    CountryHealthInsurance,
    CountryOtherInsurance,
    CountryTransport,
Florent Chehab's avatar
Florent Chehab committed
71
    CountryTourism,
Florent Chehab's avatar
Florent Chehab committed
72
73
74
75
    CountryOtherStuff,
    CountryVisaAdministrative,
    CountryPhoto,
    CountryScholarship,
Florent Chehab's avatar
Florent Chehab committed
76
77
78
    CityTransport,
    CityTourism,
    CityOtherStuff,
Florent Chehab's avatar
Florent Chehab committed
79
80
81
82
    CampusTransport,
    CampusAccommodation,
    CampusCultureAndStudentLife,
    CampusOtherStuff,
Florent Chehab's avatar
Florent Chehab committed
83
84
    CountryDri,
    UniversityDri,
Florent Chehab's avatar
Florent Chehab committed
85
]
Florent Chehab's avatar
Florent Chehab committed
86

Florent Chehab's avatar
Florent Chehab committed
87
88
89
90
91
for model in CLASSIC_MODELS:
    admin.site.register(model)

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