Answer the question
In order to leave comments, you need to log in
How to bind url pattern in Django to model?
There is a blog.
The blog has info pages (domain.rf/url-pages) and section pages (domain.rf/url-section)
Can I somehow determine which view to work with in urls.py?
Answer the question
In order to leave comments, you need to log in
urls.py just to determine which view to work with
urlpatterns = [
url(r'^урл-раздела/$', SectionView.as_view()),
url(r'^урл-страницы/$', PageView.as_view()),
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question