Answer the question
In order to leave comments, you need to log in
How to display the model correctly?
I'm sitting dumb, I made a model.
class TitleSite(models.Model):
name = models.CharField(verbose_name = u'Название сайта:',max_length=30)
def __unicode__(self):
return self.name
class NameSite(DetailView):
name = TitleSite.objects.all()
url(r'^$', NameSite.as_view(), name='index'),
{{ NameSite }}
Answer the question
In order to leave comments, you need to log in
https://docs.djangoproject.com/en/1.8/ref/class-ba...
class NameSite(DetailView):
model = TitleSite
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question