Paginator der besser ins Design passt.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user