On 1/31/06, coulix <[EMAIL PROTECTED]> wrote: > hi, i am writting a generic create object view for my recipe model. > i can get the form display well using this kind of code :
Do you mean you're writing a view (which is Python code), or a template? I'm hoping you mean the latter and that you're using the built-in "create object" generic view, which will save you a lot of time and effort. > But is there a way of automatically checking if {{ form.nom }} is a > recquired field ? (and therefore put a star near it like this). Not that I'm aware of. Just as it's up to you to know your model well enough to know how many and what types of form elements you need to put in your template to accomodate the various fields, it's also up to you to know which of the fields will be required and mark them appropriately. -- "May the forces of evil become confused on the way to your house." -- George Carlin