if this : http://oebfare.com/blog/2008/feb/23/overriding-modelchoicefield-labels
is the answer… I guess I'm not ready for google app engine.

Francois

On 24 oct, 16:00, Francois <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I just can't find how to populate a drop djangoforms down menu using
> the data from another table.
>
> class Formation(db.Model):
>         date = db.DateProperty()
>         type = db.StringProperty(choices=set(["PSC 1","PSE 1","PSE 2"]))
>         moniteur = db.UserProperty()
>         lieu = db.StringProperty()
>         statut =
> db.StringProperty(choices=set(["Ouvertes","Pause","Fermees"]))
>         entry_time = db.DateTimeProperty(auto_now_add=True)
>         added_by = db.UserProperty()
>
> class Student(db.Model):
>         id_formation = db.ReferenceProperty(Formation)
>         prenom = db.StringProperty(required=True)
>         nom = db.StringProperty(required=True)
>         date_naissance = db.DateProperty()
>         ville_naissance = db.StringProperty()
>         dept_naissance = db.StringProperty()
>         adresse = db.PostalAddressProperty()
>         telephone = db.PhoneNumberProperty()
>         comments = db.StringProperty()
>         paiement = db.StringProperty(choices=set(["PAYE","EN
> ATTENTE","REFUSE"]))
>         entry_time = db.DateTimeProperty(auto_now_add=True)
>         added_by = db.UserProperty()
>
> class StudentForm(djangoforms.ModelForm):
> #       id_formation = djangoforms.ModelChoiceField(Formation,
> query=db.Query(Formation).order('date'))
>         class Meta:
>                 model = Student
>                 exclude = ['added_by']
>
> Does anyone have any idea ?
>
> Thank you
>
> Francois
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to