#19311: "c.poll" did not work at the tutorial 01 (last example on the page) -------------------------------+-------------------------------------- Reporter: vijayky@… | Owner: nobody Type: Uncategorized | Status: closed Component: Documentation | Version: 1.4 Severity: Normal | Resolution: worksforme Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+--------------------------------------
Comment (by anonymous): Here is my rerun of the interactive shell commands and model is enclosed. Since I have proceeded to tutorial 3 but it is not different from your model. See enclosed file (model.py: https://code.djangoproject.com/attachment/ticket/19311/models.py) for the model reference. c:\Temp\django_projects\mysite $ python manage.py shell Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from polls.models import Poll, Choice >>> Poll.objects.all() [<Poll: What's new?>] >>> p = Poll.objects.get(pk=1) >>> c = p.choice_set.create(choice='Just hacking again', votes=0) >>> c.poll Traceback (most recent call last): File "<console>", line 1, in <module> AttributeError: 'Choice' object has no attribute 'poll' >>> -- Ticket URL: <https://code.djangoproject.com/ticket/19311#comment:4> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.