First tank you Xavier for you respond let me get you more precisions:
this is my app models.py (normaly the models.py have more classes always with a
ForeignKey to Info):
class Info (models.Model):
nom = models.CharField(max_length=100)
prenom = models.CharField(max_length=100)
rue = models.CharField(max_length=200)
cpostal = models.CharField(max_length=10)
ville = models.CharField(max_length=100)
mail = models.CharField(max_length=100)
tel = models.CharField(max_length=100)
#pic = models.ImageField()
def __unicode__(self):
return self.nom
class Naissance(models.Model):
info = models.ForeignKey(Info)
date = models.DateTimeField(blank=False)
def __unicode__(self):
return self.date
and my urls.py configuration for the generic view :
url(r'^cv/(?P<pk>\d+)/$', DetailView.as_view(
model = Info,
template_name = 'Cv/cv_detail.html')),
So i need to show all classes from my models.py in detailview on one template
what could be the query set?
thank you.
On May 4, 2011, at 2:45 PM, Xavier Ordoquy wrote:
>
> Le 4 mai 2011 à 14:38, Pascal Moutia a écrit :
>
>> Hi,
>> I've been having a problem i'd like to show mutiple class from a model in a
>> generic view but I can't find a way to it,
>> Can some one tel me do I have to write my own view or is there any generic
>> view that can do this ?
>
> What do you mean multiple class from a model ?
> Multiple instances maybe ?
>
> If so you can go for a list view with the correct queryset.
>
> Regards,
> Xavier.
>
> --
> 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.
>
--
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.