AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Yeah, i know i'm a little messys with all that but thanks for the tipp. Could it be that you're Mail reader did something to the indentation because i am calling return inside the function or am i understanding you wrong ?! . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSL

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Thanks for not giving up on me :-), i'll give it a try ! . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.: 00431 534521573 Fax: +43 (1) 534 52 - 146 -Ursprüngliche Nachricht

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Okay i think i'm close but i can't figure it out. I did this: class ReportingForm_ProduktField(ModelChoiceField): def label_from_instance(self, obj): return "My Object #%i" % obj.id class ReportingForm_Produkt(ModelForm): Produkt = ReportingForm_ProduktField(Produkte.o

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Okay I'll try do tot hat...thank's a lot. I already have this in my model for "Produkte" which holds the FK for that drop down: def __unicode__(self): if self.Auflage: return "%s %s" % (self.Titel, self.Auflage) else: return self.Titel So shouldn't this al

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
I was afraid somethig like that would come. I did read the doc but i don't really understand it :-( Could you plz make it a little clearer for me ?! . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexi

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Okay my Model now looks like this: class Produkte(models.Model): Kategorie = models.ForeignKey(Kategorien) Titel = models.CharField(max_length=100) Auflage = models.IntegerField(max_length=2, default=0) Bestell_Nr = models.CharField(max_length=30, blank=True) ISBN = models.Char