I'm going through the "Writing your first Django app" tutorial on
djangoproject.com but I'm not getting very far, unfortunately.

I'm on the last bit of the first page (http://www.djangoproject.com/
documentation/tutorial01/) basically trying to create a new choice
object. Honestly the docs are doing very little to help me understand
what's going on or troubleshoot at all, but this is my error:

>>> p = Poll.objects.get(pk=1)
>>> p.choice_set.create(choice='Not much', votes=0)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\Python25\lib\site-packages\django\db\models\base.py", line
241, in __repr__
    return smart_str(u'<%s: %s>' % (self.__class__.__name__,
unicode(self)))
  File "C:\Python25\Lib\site-packages\django\testproject\..\testproject
\polls\models.py", line 19, in __unicod
e__
    return self.question
AttributeError: 'Choice' object has no attribute 'question'


Unfortunately I can't even think of how to troubleshoot this as I'm
brand spanking new to Django and Python, so my knowledge in PHP isn't
doing me a whole lot. The documentation is written with sort of a
condescending tone which presents everything as super easy, which I'm
sure it is once you've played around for a while, but to a beginner
it's not really helping much.  It's a lot of do this -> see this, but
not as much explanation.

Anyway enough of my rant, any help with my clearly stupid question
would be great. 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to