Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#209 closed defect (worksforme)

errors from tutorial 1

Reported by: rklein@… Owned by: jacob
Component: Documentation Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

working through the tutorial, I was running into the following obstacles:

I'd to import the datetime model manually...

the interactive call resulted in a trace dump

polls.get_object(pk=1)

Traceback (most recent call last):

File "<stdin>", line 1, in ?
File "/usr/lib/python2.4/site-packages/django/core/meta.py", line 87, in _curried

return args[0](*(args[1:]+moreargs), dict(kwargs.items() + morekwargs.items()))

File "/usr/lib/python2.4/site-packages/django/core/meta.py", line 1032, in function_get_object

obj_list = function_get_list(opts, klass, kwargs)

File "/usr/lib/python2.4/site-packages/django/core/meta.py", line 1054, in function_get_list

select, sql, params = function_get_sql_clause(opts, kwargs)

File "/usr/lib/python2.4/site-packages/django/core/meta.py", line 1231, in function_get_sql_clause

tables2, join_where2, where2, params2, _ = _parse_lookup(kwargs.items(), opts)

File "/usr/lib/python2.4/site-packages/django/core/meta.py", line 1150, in _parse_lookup

_throw_bad_kwarg_error(kwarg)

File "/usr/lib/python2.4/site-packages/django/core/meta.py", line 1123, in _throw_bad_kwarg_error

raise TypeError, "got unexpected keyword argument '%s'" % kwarg

TypeError: got unexpected keyword argument 'pk'

Change History (1)

comment:1 Changed 10 years ago by jacob

  • Resolution set to worksforme
  • Status changed from new to closed

This probably means you've got an outdated version of Django; we just added the "pk" syntax yesterday. Please update to the latest version from SVN and try again. If you're still having problems, feel free to reopen this ticket.

Note: See TracTickets for help on using tickets.
Back to Top