Hi, 

 

I have a forum that looks like this:

 

class ReportingForm_Produkt(ModelForm):

    class Meta:

        model = Buchung

 

Where Buchung and Produkt looks like this:

 

class Buchung(models.Model):

    Mitarbeiter = models.IntegerField(max_length=3)

    Produkt = models.ForeignKey(Produkte)

    Datum = models.DateField()

    Aktivitaet = models.ForeignKey(Aktivitaeten, blank=True)

    Minuten = models.PositiveIntegerField(max_length=2)

 

    def __unicode__(self):

        return str(self.Mitarbeiter) + ' ' + str(self.Datum)

    

    class Meta:

        db_table = 'tb_Times'

        verbose_name_plural = "Buchungen"

        verbose_name = "Buchung"

 

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.CharField(max_length=30, blank=True)    

    Autor = models.CharField(max_length=50, blank=True)

    Status = models.IntegerField(max_length=1, blank=False, default=1)

    

    def __unicode__(self):

        if self.Auflage:

            return "%s %s" % (self.Titel, self.Auflage)

        else:

            return self.Titel

    

    class Meta:

        db_table = 'tb_Produkte'

        verbose_name_plural = "Produkte"

        verbose_name = "Produkt"

        unique_together = ("Kategorie", "Titel", "Auflage", "Status")

 

Now if i include that form into a template, the dropdown only shows the
"Titel" of each objects from "Produkte".  I also want the "Auflage" -
Info to be visible in the drop down.

 

How do i do that ?!

 

greetings


. . . . . . . . . . . . . . . . . . . . . . . . . .
Patrick Szabo
 XSLT Developer 
LexisNexis
Marxergasse 25, 1030 Wien

mailto:patrick.sz...@lexisnexis.at
Tel.: 00431 534521573 
Fax: +43 (1) 534 52 - 146 





-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to