Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Dec. 1, 2005 04:37:27

Bryan M.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

generic update_object view help


I'm using the update_object generic view. My template just loops
through the fields like so:

<form method="post" action=".">
{% for field in form.fields %}

<p><label>{{ field.field_name }}</label> {{ field }}
{% if field.errors %}*** {{ field.errors|join:", "}}{% endif %}</p>

{% endfor %}
<input type="submit" value="Update"/>

I have a couple ForeignKeys in my model and those show up as selects,
but the original value is not selected by default. Is there any way
to do this? The CharField values all come up just fine.

Thanks,

Bryan

Offline

Board footer

Moderator control

Enjoy the 23rd of January
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support