Search code examples
google-app-enginedjango-modelsdjangoappengine

Trying Django tutorial with djangoappengine


I was trying to implement the poll app tutorial of Django using djangoappengine.

Steps I took:
1)Copied the test-app in workspace folder.

2)Copied django-toolbox, dbindexer, django, djangoappengine, autoload, as directed on website http://www.allbuttonspressed.com/projects/djangoappengine, in 'test-app' folder.

3) Started a new project in eclipse as PyDev Google App Engine Project and made test-app as the working folder.

4) Now I deployed the app on GAE using terminal

$ python manage.py deploy

Got the "It Works" page on x.appspot.com.

5) Now I tried to make a polls app as directed in the tutorial

python manage.py startapp polls

folder 'polls' was created with four files

6) I edited the polls' model.py file and added the code as mentioned in tutorial-1 Then I ran the command-

$ python manage.py syncdb

It showed no error but did not create a new table of polls. I had added 'polls' under 'Installed_Apps' in settings.py
I think the problem is in Database declartion where it is dbindexer instead of django.db.backends.sqlite3, but i am not sure.

Also there is error when i run this in shell

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

I have some more queries but I will mention it after the above has been solved.


Solution

  • The Django tutorial is written for the latest version of django. As far as I recall, timezone was added to django.utils around 1.3? Can you check what version of Django you have? The current version is 1.41.