#18765: tutorial01 missed step (poll save) -------------------------------+-------------------- Reporter: evanda@… | Owner: nobody Type: Bug | Status: new Component: Documentation | Version: 1.4 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 1 | UI/UX: 0 -------------------------------+-------------------- When adding choices to the poll it is suggested that the choice can tell you its API:
{{{ >>> c = p.choice_set.create(choice_text='Just hacking again', votes=0) # Choice objects have API access to their related Poll objects. >>> c.poll <Poll: What's up?> }}} But that does not work - you must save the poll after adding the choices before it appears. Just add: {{{ p.save() }}} In there after the choice_set.create() call. -- Ticket URL: <https://code.djangoproject.com/ticket/18765> 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.