开发者

easy question about managing static content in django

开发者 https://www.devze.com 2023-01-15 06:12 出处:网络
I have a simple website in django where the content is static. Where i use templates like \"AboutUs.html\" ,\"OurServices.html\" or \"con开发者_运维问答tact.html\".. now i want to use the django admin

I have a simple website in django where the content is static. Where i use templates like "AboutUs.html" ,"OurServices.html" or "con开发者_运维问答tact.html".. now i want to use the django admin so anyone could change the content for those pages using a WYSIWYG editor (cause the people who will change this dont know html).. i wanted to create a class called StaticContent, something like:

class StaticContent(models.Model):
    content = models.TextField("content")

then i taught that maybe there's something in django that can do that, but i couldn't find anything in the documentation.

Do you know if django has some module or something to manage this static content in the admin?

Thxs in advance!


What you're looking for is the flatpages app that is bundled with Django

http://docs.djangoproject.com/en/dev/ref/contrib/flatpages/

0

精彩评论

暂无评论...
验证码 换一张
取 消