F
F
Friend2016-10-25 17:57:42
Django
Friend, 2016-10-25 17:57:42

How to implement urls transitions in an online store?

I started to write an online store and realized that I don’t know how to implement a product transition.
There is a product catalog (/tovaru) how to implement a universal template for transitions to a product in urls? That is, there is 1 page on which the product that you have chosen is loaded (/tovaru/samsung_xxxx)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2016-10-25
@sim3x

https://docs.djangoproject.com/en/1.10/glossary/#t...
https://docs.djangoproject.com/en/1.10/ref/models/...

V
Vitaly, 2016-10-25
@MrCute

You create a separate application, so where the whole roll of goods will lie. In the main url file (which is created right after the project is created), include the url file from your application.
For example. urls.py file

urlpatterns = [

    url(r'^tovaru/', include('shop.urls')),
    url(r'^admin/', admin.site.urls),
   ....
]

Read the documentation. If it’s bad with English, there is in Russian - here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question