Monday, May 30, 2011

View with form?

Hi,
I'm a DJango newb and need to make sure I approach initial issues
correctly:

I have a couple of models: Items, and subItems which have a ForeignKey
to Items.

I have a detail page for Items that displays all its subItems.

I want to add a form to allow addition of up to 3 extra subItems on
the Item detail page.

What's the best approach here?

I've found the UpdateView which looks like it might meet this, but
with the idea of putting the call to the View directly in urls.py I'm
unsure where any extra code in the view would need to live? Is it
worth moving away from calls to views in urls.py quickly, to allow for
putting custom code in views.py?

Thanks!

mmm

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment