V
V
vikholodov2017-10-07 20:44:39
Django
vikholodov, 2017-10-07 20:44:39

How to properly organize the site structure in Django?

In general, I'm making a website with the following structure:
Main
Home -> static page
News -> News
Providers - > \
Provider - > Tariffs - > Tariff
Provider - > Reviews
Provider - > static page
Tariffs
I don't quite understand:
1) How to add static pages created in the admin panel in the visual editor (the editor is already screwed)?
2) I have a news application for example and a "news" model. I display on the news.html page each news in a cycle... but how do I create models for editing the titles of this page, meta tags. It occurred to me to do something like create a PageOptions class and make these fields there, but xs how right it is.
3) How to make universal in head? Something like {% if seotitle %}{{ seotitle }} |{% endif %}, if there is a seotitle, it is automatically picked up...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question