#2571 closed defect (invalid)
SyntaxError working through "writing 1st django app pt 1" tutorial
Reported by: | since1968 | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Working through the tutorial (http://www.djangoproject.com/documentation/tutorial1/) I get a syntax error when I run the following line: python manage.py sql polls. I named the project "tutorial" instead of "mysite" but other than that everything is the same. I copied and pasted the model code.
I'm using the development version downloaded from svn. I'm on OS X and my database is MySQL. The error message, in full:
towy:~/sites/django/tutorial marc$ python manage.py sql polls
Traceback (most recent call last):
File "manage.py", line 11, in ?
execute_manager(settings)
File "/usr/local/lib/python2.4/site-packages/django/core/management.py", line 1343, in execute_manager
execute_from_command_line(action_mapping, argv)
File "/usr/local/lib/python2.4/site-packages/django/core/management.py", line 1294, in execute_from_command_line
mod_list = [models.get_app(app_label) for app_label in args[1:]]
File "/usr/local/lib/python2.4/site-packages/django/db/models/loading.py", line 40, in get_app
mod = load_app(app_name)
File "/usr/local/lib/python2.4/site-packages/django/db/models/loading.py", line 51, in load_app
mod = import(app_name, , , models)
File "/Users/marc/Sites/django/tutorial/../tutorial/polls/models.py", line 10
votes models.IntegerField()
SyntaxError: invalid syntax
Change History (3)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
You have a syntax error in your models.py
file. I suspect you want this:
votes = models.IntegerField()
sorry, meant to include the email for follow up: marc at since1968 dot com.