Paginator der besser ins Design passt.

This commit is contained in:
Christian Berg
2014-12-10 00:23:36 +01:00
parent 2011d3ce25
commit 711c303f9a
75 changed files with 675 additions and 1599 deletions

View File

@@ -3,9 +3,10 @@ Created on 24.11.2011
@author: christian
"""
from django import forms
import datetime
from django import forms
class DateInput(forms.widgets.DateInput):
input_type = 'date'
@@ -13,9 +14,9 @@ class DateInput(forms.widgets.DateInput):
def __init__(self, attrs=None, **kwargs):
forms.widgets.DateInput.__init__(self,
attrs=attrs,
format='%Y-%m-%d',
**kwargs)
attrs=attrs,
format='%Y-%m-%d',
**kwargs)
class NumberInput(forms.widgets.Input):
@@ -23,8 +24,7 @@ class NumberInput(forms.widgets.Input):
class TimeInput(forms.widgets.Select):
def __init__(self, attrs=None,):
def __init__(self, attrs=None, ):
timeset = datetime.datetime(2000, 1, 1, 0, 0)
choices = [('', '-------')]
while timeset < datetime.datetime(2000, 1, 2, 0, 0):
@@ -37,7 +37,7 @@ class TimeInput(forms.widgets.Select):
def render(self, name, value, attrs=None, choices=()):
return forms.widgets.Select.render(self, name, value, attrs=attrs,
choices=choices)
choices=choices)
class SplitDateTimeWidget(forms.widgets.MultiWidget):