On Thursday, 19 November 2015 21:38:50 UTC, Bob Aalsma wrote:
>
> Umm, one of the things I've found difficult is to determine the logic in
> the translation of the class names in models.py to other variables.
>
> And I'm sorry to have not included the models.py. This is the part of
> ZoekVraag:
>
> class ZoekVraag(models.Model):
> vrager = models.ForeignKey(KlantContactPersoon)
> vraag_naam = models.CharField("naam vraag", max_length=200)
> vraag_omschrijving = models.TextField("omschrijving vraag", blank =
> True)
> vraag_taktiek = models.TextField("taktiek oplossing vraag", blank =
> True)
>
> def __unicode__(self):
> return self.vraag_naam
>
> class Meta:
> verbose_name = 'zoekvraag'
> verbose_name_plural = 'zoekvragen'
>
>
And as I stated, you have no field "zoekvraag_id" there. The automatic PK
field that Django creates is called "id" and can also be referenced as
"pk". You need to use that in your {% url %} tag. There is no "logic in
translation of class names".
--
DR.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/e2573cfa-5442-4657-9264-8b0b7c01e90c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.