Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

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

import datetime 

 

from django.utils import timezone 

 

from base_app.models import SiteInformation 

from base_app.models import User 

from .loadGeneric import LoadGeneric 

 

 

class LoadSiteInformation(LoadGeneric): 

""" 

Load currencies in the app 

""" 

 

def __init__(self, admin: User): 

self.admin = admin 

 

def load(self): 

start = timezone.now() 

end = start + datetime.timedelta(days=5) 

info = SiteInformation( 

start=start, 

end=end, 

variant="success", 

message="Le site vient d'être créé !", 

) 

self.add_info_and_save(info, self.admin)