Opened 13 years ago

Closed 13 years ago

#678 closed enhancement (fixed)

I would like to see a tutorial describing how to edit One-To-Many relationships

Reported by: Ian@… 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:


The current 'polls' tutorial is GREAT, and it REALLY helps new users come up to speed quickly. I love the style it is presented in.

Currently the tutorial skips one important task. Creating a one -> many entry screen (ie the page to create a poll with multiple choices on it). It 'cheats' and goes to the command line/admin screens to do these.

I would like to see a tutorial on how to do this. I belive the tutorial would cover a lot of material that I have issues with, and would go into detail on how the framework behaves.


Change History (6)

comment:1 Changed 13 years ago by Adrian Holovaty

Resolution: invalid
Status: newclosed

Maybe I'm not understanding you correctly, but the tutorial does indeed cover how to edit one-to-many relationships in the admin. Check out the section that starts "But, really, this is an inefficient way of adding Choice objects to the system."

Here's the image:

Please reopen if I'm misunderstanding you.

comment:2 Changed 13 years ago by anonymous

Resolution: invalid
Status: closedreopened

hi Jacob.
I meant how to build a form to do this.
(not do it via the admin interface)

comment:3 Changed 13 years ago by rjwittams

I think you want to do inline editing outside the admin?
This is pretty broken in trunk. Use new-admin to do this.

See NewAdminChanges.

I agree that after new-admin is merged it would be a good
idea to have a tutorial on this.

comment:4 Changed 13 years ago by ian@…

Thanks rj.
I switched to new-admin, and I can now see this as my form object

{'error_dict': {}, 'manipulator': , 'data': {'': None, 'contact.0.tags': [16, 19, 20, 21, 22], 'name': 'Ian Holsman', '': '', 'id': 1, '': '', '': 5}, '_inline_collections': [], 'edit_inline': True}

but I have no idea how to show this in my template ;(

comment:5 Changed 13 years ago by rjwittams

Sorry, I should have covered this properly in new-admin changes. Will do so, however, a quick example is:

{% for contact in form.contacts %}

{% %}
{% %}
{% %}

{% endfor %}

I will also think about how to make the repr mor informative....

comment:6 Changed 13 years ago by anonymous

Resolution: fixed
Status: reopenedclosed

Thanks RJ.
I'll mark it as fixed

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