load_all.py 929 Bytes
Newer Older
Florent Chehab's avatar
Florent Chehab committed
1
import reversion
Florent Chehab's avatar
Florent Chehab committed
2

3
4
5
6
7
8
9
from backend_app.load_data.loading_scripts.loadAdminUser import LoadAdminUser
from backend_app.load_data.loading_scripts.loadCountries import LoadCountries
from backend_app.load_data.loading_scripts.loadCurrencies import LoadCurrencies
from backend_app.load_data.loading_scripts.loadGroups import LoadGroups
from backend_app.load_data.loading_scripts.loadTags import LoadTags
from backend_app.load_data.loading_scripts.loadUniversities import LoadUniversities
from backend_app.load_data.loading_scripts.loadUniversityEx import LoadUniversityEx
Florent Chehab's avatar
Florent Chehab committed
10

Florent Chehab's avatar
Florent Chehab committed
11
12

def load_all():
13
14
    """
    Function to load all the initial data in the app
Florent Chehab's avatar
Florent Chehab committed
15
16
    """

Florent Chehab's avatar
Florent Chehab committed
17
    with reversion.create_revision():
18
        LoadGroups()
Florent Chehab's avatar
Florent Chehab committed
19
20
21
22
23
24
        admin = LoadAdminUser().get()
        LoadCurrencies(admin).load()
        LoadCountries(admin).load()
        LoadUniversities(admin).load()
        LoadTags(admin).load()
        LoadUniversityEx(admin).load()