Answer the question
In order to leave comments, you need to log in
Based url views django?
I'm thinking of using django-bootstrap-breadcrumbs, but I just can't figure out how to get the url for the section, for example, only from the view. One of the first projects can be said completely.
def all_rozdil(request,is_main):
foo = []
for name_part in NamePart.objects.all():
foo.append({'name_part': name_part,'rozdils': Rozdil.objects.filter(part_of=name_part.pk)})
stats = Stats.objects.all().filter(main_is_id=is_main)
rozdil = Rozdil.objects.all()
title_rozdil = Rozdil.objects.get(pk=is_main)
context = {'stats':stats,'rozdil': rozdil,'title_rozdil':title_rozdil , 'foo': foo }
def get_absolute_url(self):
return "/rozdil/%i/" % self.id
return render(request,'stats.html',context)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question