Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
voucher_partner_session_forms.py 571 B
import datetime
import logging

from django import forms
from django.forms import ModelForm

from web.forms.forms import DATETIMEPICKER_DATE_ATTRS
from web.models.voucher_partner_session import VoucherPartnerSession

logger = logging.getLogger(__name__)


class VoucherPartnerSessionForm(ModelForm):
    date = forms.DateTimeField(widget=forms.DateTimeInput(DATETIMEPICKER_DATE_ATTRS),
                               initial=datetime.datetime.now().replace(hour=8, minute=0, second=0))

    class Meta:
        model = VoucherPartnerSession
        exclude = ['voucher']