Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
asaglimbeni committed Dec 2, 2014
2 parents a62f1a8 + 08208b0 commit 5bc47ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -32,7 +32,7 @@ Screenshots

.. image:: https://raw.github.com/smalot/bootstrap-datetimepicker/master/screenshot/standard_decade.png

This view allows to select the day in the selected month.
This view allows to select the year in a range of 10 years.

* Year view

Expand All @@ -44,7 +44,7 @@ This view allows to select the month in the selected year.

.. image:: https://raw.github.com/smalot/bootstrap-datetimepicker/master/screenshot/standard_month.png

This view allows to select the year in a range of 10 years.
This view allows to select the day in the selected month.

* Day view

Expand Down
5 changes: 3 additions & 2 deletions datetimewidget/widgets.py
Expand Up @@ -9,6 +9,7 @@
from django.forms.widgets import MultiWidget, DateTimeInput, DateInput, TimeInput
from django.utils.formats import get_format, get_language
from django.utils.safestring import mark_safe
from django.utils.six import string_types

try:
from django.forms.widgets import to_current_timezone
Expand Down Expand Up @@ -156,7 +157,7 @@ def quote(key, value):
numbers so we type check the value before wrapping it in quotes.
"""

if key in quoted_options and isinstance(value, basestring):
if key in quoted_options and isinstance(value, string_types):
return "'%s'" % value

if key in quoted_bool_options and isinstance(value, bool):
Expand Down Expand Up @@ -227,7 +228,7 @@ def render(self, name, value, attrs=None):

# Build javascript options out of python dictionary
options_list = []
for key, value in self.options.iteritems():
for key, value in iter(self.options.items()):
options_list.append("%s: %s" % (key, quote(key, value)))

js_options = ",\n".join(options_list)
Expand Down

0 comments on commit 5bc47ae

Please sign in to comment.