> Scaffold Script maybe useful to you: > http://code.djangoproject.com/wiki/ScaffoldScript
At a first glance, this pretty much looks like what I need. I'll try it out. > anyway I suggest looking at generic views, they make append\update easy. > I found this tutorial useful: > http://www.postneo.com/2005/08/17/django-generic-views-crud Yeah, generic views is probably what I want and I'm having a hard time with the tutorial which is "underdocumented" as the post says. Thanks for the ressources, it's all good. Regards, > > > > On 5/15/06, Alexandre CONRAD <[EMAIL PROTECTED]> wrote: > >>Hello, >> >>I've already talked about it in the IRC channel, but I'm posting here to >>make sure... >> >>I have a model Client like so: >> >>class Client(models.Model): >> name = models.CharField(maxlength=30, core=True) >> contact_name = models.CharField(maxlength=30, blank=True) >> contact_email = models.EmailField(blank=True) >> >>So I'd like to add a new client. Isn't it possible to use the >>autogeneration of the admin for my app ? >> >>Instead of writing a template declaring *every* field of the Client >>model, wouldn't it be possible to autogenerate the form from the >>existing model ? >> >>If I never add a new entry in my model, let's say: >> >> city = models.CharField(maxlength=30, core=True) >> >>when I reload my "add_client" (or "edit_client") page, it would >>automaticly display the form including the new "city" field without >>having to touch my template code. >> >>I'm about to go into a "for" loop inside the form.data dictionnary to >>generate every field. But as it already took me some time to use >>organize the "fields" variable like I wanted for the "Admin" class, I >>was telling myself there *MUST* be someway to reuse the admin code for >>autogenerating forms in my own application. >> >>I have looked into this page: >>http://www.djangoproject.com/documentation/forms/ >> >>But it explains I have to write every field into my template. >> >>Any idea ? >> >>Regards, >>-- >>Alexandre CONRAD - TLV >>Research & Development >>tel : +33 1 30 80 55 05 >>fax : +33 1 30 80 55 06 >>6, rue de la plaine >>78860 - SAINT NOM LA BRETECHE >>FRANCE >> >> >> > > > > > > --------------------------------------------------------------------------------------------------- > Texte inséré par Platinum 2006: > > S'il s'agit d'un mail indésirable (SPAM), cliquez sur le lien suivant pour > le reclasser : http://127.0.0.1:6083/Panda?ID=pav_14894&SPAM=true > --------------------------------------------------------------------------------------------------- > > -- Alexandre CONRAD - TLV Research & Development tel : +33 1 30 80 55 05 fax : +33 1 30 80 55 06 6, rue de la plaine 78860 - SAINT NOM LA BRETECHE FRANCE --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---