> On Sun, 2009-03-01 at 06:36 +0200, Ionut Gabriel Stan wrote: > > When rendered, the > > form includes a SELECT widget for selecting the blog post to which the > > comment > > belongs, but the post is already known. So how do I specify the post > > id so that > > the form renders a hidden field with the id as a value.
In your model, try making your 'post' field as not editable (editable=False) and in the admin, override save_model() method of AdminClass for Comment, to set obj.post to the expected_value before saving it. --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---