from django import forms
from django.contrib.admin import widgets
from datetimewidget.widgets import DateTimeWidget
from .models import Event


class LoginForm(forms.Form):
    username = forms.CharField(label='Nazwa użytkownika')
    password = forms.CharField(label='Hasło', widget=forms.PasswordInput())


data_time_options = {
    'format': 'dd-mm-yyyy HH:ii'
}

def dt_widget():
    return DateTimeWidget(
        bootstrap_version=3,
        usel10n=True,
        options=data_time_options
    )


class EventForm(forms.ModelForm):

    class Meta:
        model = Event
        fields = (
            'title', 'place',
            'description', 'categories',
            'start_time', 'end_time',
            'image', 'url',
        )
        widgets = {
            'start_time': dt_widget(),
            'end_time': dt_widget(),
        }

@@ -305,17 +305,17 @@
 ))%0A%0A%0Adat
-a
+e
 _time_op
@@ -345,12 +345,12 @@
  'dd
--mm-
+.mm.
 yyyy
@@ -356,16 +356,38 @@
 y HH:ii'
+,%0A    'language': 'pl'
 %0A%7D%0A%0Adef 
@@ -459,30 +459,8 @@
 =3,%0A
-        usel10n=True,%0A
     
@@ -474,17 +474,17 @@
 ions=dat
-a
+e
 _time_op

Fix date-time-widget options.