H
H
HiTTi2021-03-20 22:53:26
Django
HiTTi, 2021-03-20 22:53:26

How to create an individual product page in an online store in Django?

please tell me how to make a product page in the online store (on django) which will be filled through the admin panel

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Antonio Solo, 2021-03-20
@HiTTi

from django.views.generic.detail import DetailView

class TovarView(DetailView):
    model = Tovar
    template = 'my_tovar.html'

urlpatterns = [
   .....
    path('tovar/<pk>', TovarView.as_view(), name='tovar'),
   .....
]

D
Dr. Bacon, 2021-03-20
@bacon

For example, first go through the django tutorial.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question