-
-
djblets/datagrid/grids.py (Diff revision 1) This isn't a built-in Python module, so make sure setup.py depends on it.
-
djblets/datagrid/grids.py (Diff revision 1) What happens on Django <= 1.3? Does this exist? Today, Djblets must work with Django 1.1 and higher, so you may need to make things conditional here.
-
-
-
-
djblets/util/forms.py (Diff revision 1) """A form blah blah""" First line should be summary, appended to """. If it can fit on one line, then it should be a one-liner.
-
Localized timezone support (Djblets)
Review Request #2721 — Created Dec. 1, 2011 and submitted
Information | |
---|---|
ddruska | |
Djblets | |
Reviewers | |
djblets | |
Supports the USE_TZ feature in Django dev by creating UTC, timezone aware datetime objects. DateTimeColumn and DateTimeSinceColumn are updated to accept a new parameter "timezone", which converts the datetime object into that timezone. A TimeZoneField form field is created to make implementing a timezone ChoiceField simple. Lastly, timezones are created as UTC and are checked to be aware/naive for backwards compatibility.
Description | From | Last Updated |
---|---|---|
This isn't a built-in Python module, so make sure setup.py depends on it. |
|
|
What happens on Django <= 1.3? Does this exist? Today, Djblets must work with Django 1.1 and higher, so you … |
|
|
Same comments here. |
|
|
Blank lines before and after this block. |
|
|
Two blank lines. |
|
|
"""A form blah blah""" First line should be summary, appended to """. If it can fit on one line, then … |
|
|
Same question here. |
|
|
Indent 4 spaces |
|
|
We'll probably want newlines before and after this block. |
|
|
We'll want a newline before this block. |
|
-
Two final nits. With those fixed, this gets my green light.
-
-
djblets/util/templatetags/djblets_utils.py (Diff revision 3) We'll want a newline before this block.
DD
Change Summary:
Added helper method for creating tz aware, UTC datetimes. Fixed other stuff from reviews.
Diff: |
Revision 4 (+78 -9) |
---|
-
Dave: So I committed the patch to Djblets, and when trying to kick off the devserver, I was getting: Running dependency checks (set DEBUG=False to turn this off)... Traceback (most recent call last): File "./reviewboard/manage.py", line 174, in <module> check_dependencies() File "./reviewboard/manage.py", line 41, in check_dependencies from reviewboard.admin import checks File "/media/Projects/reviewboard/reviewboard/admin/checks.py", line 40, in <module> from djblets.siteconfig.models import SiteConfiguration File "/media/Projects/djblets/djblets/siteconfig/models.py", line 31, in <module> from djblets.util.fields import JSONField File "/media/Projects/djblets/djblets/util/fields.py", line 42, in <module> from djblets.util.dates import get_tz_aware_utcnow ImportError: cannot import name get_tz_aware_utcnow Looking at djblets.util.dates, it looks like there's a function missing. Can you look into this please? Thanks, -Mike
DD
Change Summary:
Got rid of NameError's and ImportError's, added dates.py to the commit.
Diff: |
Revision 6 (+61 -10) |
---|
-
If I try to run this using Django 1.3, I get the following: Traceback (most recent call last): File "./reviewboard/manage.py", line 174, in <module> check_dependencies() File "./reviewboard/manage.py", line 41, in check_dependencies from reviewboard.admin import checks File "/home/david/Projects/reviewboard/reviewboard/admin/checks.py", line 40, in <module> from djblets.siteconfig.models import SiteConfiguration File "/usr/local/lib/python2.7/dist-packages/Djblets-0.7alpha0.dev-py2.7.egg/djblets/siteconfig/models.py", line 31, in <module> from djblets.util.fields import JSONField File "/usr/local/lib/python2.7/dist-packages/Djblets-0.7alpha0.dev-py2.7.egg/djblets/util/fields.py", line 36, in <module> from django.utils.timezone import is_aware ImportError: No module named timezone It looks like a previous version of your change caught ImportError to support this. Why did you remove it?