16 lines
442 B
Python
16 lines
442 B
Python
import datetime
|
|
|
|
from django.utils.encoding import force_text
|
|
|
|
from aesop.ovvpfile import OvvpFile
|
|
|
|
|
|
def default_ovvpfile(event, rocnik):
|
|
of = OvvpFile()
|
|
of.headers['version'] = '1'
|
|
of.headers['event'] = event
|
|
of.headers['year'] = force_text(rocnik.prvni_rok)
|
|
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
|