D
D
devalone2016-12-19 23:57:53
Django
devalone, 2016-12-19 23:57:53

Django. What is the best way to edit the main page from the admin panel?

There is a site on django, on the main page of which there is text that would be nice to edit from the admin. What's the best way to do this from django's point of view? Do not make a model that will have only one instance in the database.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2016-12-20
@devalone

flatpages

A
Ayk72, 2017-05-11
@Ayk72

I think I figured it out, I don't know if it's correct yet:

SELECT post_id, SUM(view) AS Allview FROM post_stat WHERE date>='' AND date<='' GROUP BY post_id ORDER by Allview DESC LIMIT 0,10

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question