Hi!
Sorry if my question is nonsense, I'm not experienced with Django,
this is my first real app.
I'm trying to reproduce the admin interfase in a form that I build
with form_for_model(), well, not *all* the admin interfase, but the
editing part, in particular, the widgets that it shows with ForeignKey
fields.
The model is like this (I've removed some fields, to make it shorter):
class Owner(models.Model):
first_name = models.CharField(maxlength = 40)
last_name = models.CharField(maxlength = 50)
class House(models.Model):
address = models.CharField(maxlength = 60)
class Rental(models.Model):
date = models.DateField()
owner = models.ForeignKey(Owner)
house = models.ForeignKey(House)
Later in the view, I get the form for the Rental class ( using
newforms.form_for_model ), but it shows -only- a select box and I also
need the plus sign, like in admin interfase, is there any way to get
something like that with django.
Thanks!
D3f0
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---