Now you're talking!!! Thanks for that, it's exactly what I was thinking.
Basically I am trying to make a system where you show a list of records,
allow the user to view the record, edit the record or add a new one.
Similar to the admin interface, but with only a view option, so in case your
a 'p
The HTML in the template is fairly easy to do:
{% if object %}
we have an object so we're updating
{% else %}
no object so we're inserting
{% endif %}
I'm not quite sure how you want to handle the viewing part though.
In the form HTML, just create your form as if you are doing an update:
{% if
you would have an html form with if's around each input if there was a
value or not or even just around the whole thing.
Now that I think about it, it might be easier to make 2 views for this
though.
--~--~-~--~~~---~--~~
You received this message because you ar
[EMAIL PROTECTED] wrote:
Create a form where if it's new, it's blank and has a "create" button
that makes the thing. If you are viewing, fill in the form with the
existing info with an "update" button. You can also add a "delete"
button to the view/update version if you want.
This is just a
Create a form where if it's new, it's blank and has a "create" button
that makes the thing. If you are viewing, fill in the form with the
existing info with an "update" button. You can also add a "delete"
button to the view/update version if you want.
This is just a couple of conditionals real
5 matches
Mail list logo