Answer the question
In order to leave comments, you need to log in
Edit static pages in Django admin?
Hello!
Please help me figure it out. There are two pages: home and license . The home page has a slider whose content is generated dynamically ( Slide.objects.all()
) and static content. And the license page consists only of static content. It is necessary to give the opportunity to edit static content through the admin panel. Django comes with a flatpages app out of the box, but it's quite clear how to properly compose a home page. Advise what to do?
URLs.py:
from django.contrib.flatpages import views
urlpatterns += [
url(r'^home/$', views.flatpage, {'url': '/home/'}, name='home'),
url(r'^license/$', views.flatpage, {'url': '/license/'}, name='license'),
]
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