Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Django 1.4 timezone aware datetime support #5

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Add Django 1.4 timezone aware datetime support #5

wants to merge 7 commits into from

Conversation

borispf
Copy link

@borispf borispf commented Jul 18, 2012

In django 1.4, tz-aware datetimes have been added. To support this we try to import django.utils.timezone first and fall back to datetime.datetime if it's django < 1.4. Also the default value for the creation time field has been moved into the model.

Boris Pfahringer and others added 7 commits July 18, 2012 15:53
In django 1.4, tz-aware datetimes have been added. To support this
we try to import django.utils.timezone first and fall back to
datetime.datetime if it's django < 1.4. Also the default value for
the creation time field has been moved into the model.
solves a bug if the model has not an 'id' field. e.g. when a field has 'primary_key=True' 
Fixes issue where by primary key is not an id, preventing template rendering.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants