Tuesday, February 28, 2012

Learning Django: DjangoProject Poll application

https://docs.djangoproject.com/en/dev/intro/tutorial01/

I'm using the Djangostack (Python 2.7.2+; Django 1.3.1-1) from Bitnami
ran on Ubuntu 11.10 with PostgreSQL 9.1.2

Sorry for my newbie question.

I got to the portion where it asks me to import timezone from the
django.utils module but all I manage to receive is:

>>> from django.utils import timezone
Traceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: cannot import name timezone

If I cannot do the above, I cannot get to the next line in the shell:

>>> p = Poll(question="What's new?", pub_date=timezone.now())


Anybody ever encounter this issue? I've attempted to look for a
timezone setting in my settings.py and the only setting I can modify
seems to be the location. A preliminary Google search and
StackOverflow search turned up nothing. Your help is greatly
appreciated. Thanks!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment