Skip to content

Commit

Permalink
修改日期样式错乱的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
wgbbiao committed Oct 30, 2017
1 parent 07a4c70 commit f4b53db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions demo_app/demo/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
from django.contrib import admin

urlpatterns = [
url(r'xadmin/', include(xadmin.site.urls)),
url(r'^admin/', include(admin.site.urls)),
url(r'^', include(xadmin.site.urls))
]

4 changes: 2 additions & 2 deletions xadmin/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def media(self):
return vendor('datepicker.js', 'datepicker.css', 'xadmin.widget.datetime.js')

def __init__(self, attrs=None, format=None):
final_attrs = {'class': 'date-field', 'size': '10'}
final_attrs = {'class': 'date-field form-control', 'size': '10'}
if attrs is not None:
final_attrs.update(attrs)
super(AdminDateWidget, self).__init__(attrs=final_attrs, format=format)
Expand All @@ -42,7 +42,7 @@ def media(self):
return vendor('datepicker.js', 'clockpicker.js', 'clockpicker.css', 'xadmin.widget.datetime.js')

def __init__(self, attrs=None, format=None):
final_attrs = {'class': 'time-field', 'size': '8'}
final_attrs = {'class': 'time-field form-control', 'size': '8'}
if attrs is not None:
final_attrs.update(attrs)
super(AdminTimeWidget, self).__init__(attrs=final_attrs, format=format)
Expand Down

0 comments on commit f4b53db

Please sign in to comment.