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

Florent Chehab's avatar
Florent Chehab committed
3
4
5
6
7
8
9
10
11
12
from .loading_scripts import (
    LoadAdminUser,
    LoadCountries,
    LoadCurrencies,
    LoadGroups,
    LoadTags,
    LoadUniversities,
    LoadUniversityEx,
)

Florent Chehab's avatar
Florent Chehab committed
13
14

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

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