diff --git a/datetimewidget/apps.py b/datetimewidget/apps.py new file mode 100755 index 0000000..d888af6 --- /dev/null +++ b/datetimewidget/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class AppConfig(AppConfig): + name = 'datetimewidget' diff --git a/datetimewidget/static/css/datetimepicker.css b/datetimewidget/static/datetimewidget/css/datetimepicker.css similarity index 100% rename from datetimewidget/static/css/datetimepicker.css rename to datetimewidget/static/datetimewidget/css/datetimepicker.css diff --git a/datetimewidget/static/js/bootstrap-datetimepicker.js b/datetimewidget/static/datetimewidget/js/bootstrap-datetimepicker.js similarity index 100% rename from datetimewidget/static/js/bootstrap-datetimepicker.js rename to datetimewidget/static/datetimewidget/js/bootstrap-datetimepicker.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.ar.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ar.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.ar.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ar.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.bg.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.bg.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.bg.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.bg.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.ca.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ca.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.ca.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ca.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.cs.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.cs.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.cs.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.cs.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.da.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.da.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.da.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.da.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.de.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.de.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.de.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.de.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.ee.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ee.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.ee.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ee.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.el.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.el.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.el.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.el.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.es.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.es.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.es.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.es.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.eu.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.eu.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.eu.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.eu.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.fi.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.fi.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.fi.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.fi.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.fr.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.fr.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.fr.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.fr.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.he.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.he.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.he.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.he.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.hr.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.hr.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.hr.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.hr.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.hu.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.hu.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.hu.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.hu.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.id.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.id.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.id.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.id.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.is.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.is.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.is.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.is.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.it.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.it.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.it.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.it.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.ja.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ja.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.ja.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ja.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.ko.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ko.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.ko.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ko.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.kr.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.kr.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.kr.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.kr.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.lt.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.lt.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.lt.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.lt.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.lv.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.lv.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.lv.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.lv.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.ms.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ms.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.ms.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ms.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.nb.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.nb.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.nb.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.nb.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.nl.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.nl.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.nl.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.nl.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.no.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.no.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.no.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.no.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.pl.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.pl.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.pl.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.pl.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.pt-BR.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.pt-BR.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.pt-BR.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.pt-BR.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.pt.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.pt.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.pt.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.pt.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.ro.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ro.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.ro.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ro.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.rs-latin.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.rs-latin.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.rs-latin.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.rs-latin.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.rs.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.rs.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.rs.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.rs.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.ru.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ru.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.ru.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ru.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.sk.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.sk.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.sk.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.sk.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.sl.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.sl.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.sl.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.sl.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.sv.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.sv.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.sv.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.sv.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.sw.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.sw.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.sw.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.sw.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.th.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.th.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.th.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.th.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.tr.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.tr.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.tr.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.tr.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.ua.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ua.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.ua.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.ua.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.uk.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.uk.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.uk.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.uk.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.zh-CN.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.zh-CN.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.zh-CN.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.zh-CN.js diff --git a/datetimewidget/static/js/locales/bootstrap-datetimepicker.zh-TW.js b/datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.zh-TW.js similarity index 100% rename from datetimewidget/static/js/locales/bootstrap-datetimepicker.zh-TW.js rename to datetimewidget/static/datetimewidget/js/locales/bootstrap-datetimepicker.zh-TW.js diff --git a/datetimewidget/widgets.py b/datetimewidget/widgets.py index b159c31..1a74b9b 100644 --- a/datetimewidget/widgets.py +++ b/datetimewidget/widgets.py @@ -219,7 +219,7 @@ def __init__(self, attrs=None, options=None, usel10n=None, bootstrap_version=Non super(PickerWidgetMixin, self).__init__(attrs, format=self.format) - def render(self, name, value, attrs=None): + def render(self, name, value, renderer=None, attrs=None): final_attrs = self.build_attrs(attrs) rendered_widget = super(PickerWidgetMixin, self).render(name, value, final_attrs) @@ -251,15 +251,15 @@ def render(self, name, value, attrs=None): def _media(self): - js = ["js/bootstrap-datetimepicker.js"] + js = ["datetimewidget/js/bootstrap-datetimepicker.js"] language = self.options.get('language', 'en') if language != 'en': - js.append("js/locales/bootstrap-datetimepicker.%s.js" % language) + js.append("datetimewidget/js/locales/bootstrap-datetimepicker.%s.js" % language) return widgets.Media( css={ - 'all': ('css/datetimepicker.css',) + 'all': ('datetimewidget/css/datetimepicker.css',) }, js=js )