2021-10-05 00:25:15 +02:00
|
|
|
import datetime
|
|
|
|
|
2023-10-30 23:33:13 +01:00
|
|
|
from django.utils.encoding import force_str
|
2021-10-05 00:25:15 +02:00
|
|
|
|
|
|
|
from aesop.ovvpfile import OvvpFile
|
|
|
|
|
|
|
|
|
|
|
|
def default_ovvpfile(event, rocnik):
|
|
|
|
of = OvvpFile()
|
|
|
|
of.headers['version'] = '1'
|
|
|
|
of.headers['event'] = event
|
2023-10-30 23:33:13 +01:00
|
|
|
of.headers['year'] = force_str(rocnik.prvni_rok)
|
2021-10-05 00:25:15 +02:00
|
|
|
of.headers['date'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
|
|
of.headers['id-scope'] = 'mam'
|
|
|
|
of.headers['id-generation'] = '1'
|
|
|
|
return of
|