Re: content management in django

73 views
Skip to first unread message

Jonas Geiregat

unread,
Sep 24, 2012, 10:57:51 AM9/24/12
to django...@googlegroups.com
I would advise you to take a look at feincms, it has exactly what you need.


Hello,

I'm converting a static website to a Django application and I need a piece of advice from more experienced people what is the right way to store content.
The website will have some static pages like "about","contacts", etc. and a dynamic content like news and photo galleries that should be updated from the web interface. So my best guess is that static pages should be implemented using templates and news should be stored in a database. I believe this is a common task so is there a better way to solve it? And how is news editing implemented? Does the editor create an html in some html-editor and then paste it into the database, or is a web-based WYSIWYG-editor usually used?

Thank you!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/_wtR7b_RXKYJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Paul Backhouse

unread,
Sep 24, 2012, 12:00:24 PM9/24/12
to django...@googlegroups.com
I'm not sure that I fully understand your question, but, for the static
content, django flatpages
(https://docs.djangoproject.com/en/dev/ref/contrib/flatpages/) may be
what you are looking for.

News editing would have to be handled by your news editing app!
django-cms (https://www.django-cms.org/) may be a good first port of
call. There are WYSIWYG editors which can be easily integrated, eg
TinyMCE (http://django-tinymce.readthedocs.org/en/latest/index.html)




eclypcix

unread,
Sep 25, 2012, 9:35:14 AM9/25/12
to django...@googlegroups.com
@jonas, @Paul Backhouse  thank you for your answers!

I thought about using CMS but considering this is my first project I would like to do most of the work from scratch, that way I will have more control over the result and will learn more in the process. TinyMCE looks like something I had in mind, thanks for the link!

What I should have asked, is it okay to store all the site's html content in a database? Is it usually done that way?


понедельник, 24 сентября 2012 г., 20:01:45 UTC+4 пользователь Paul Backhouse написал:

Paul Backhouse

unread,
Sep 25, 2012, 12:45:24 PM9/25/12
to django...@googlegroups.com
On Tue, 2012-09-25 at 06:35 -0700, eclypcix wrote:
> What I should have asked, is it okay to store all the site's html
> content in a database? Is it usually done that way?
>

I'm not sure what you mean by "all the site's html". You wouldn't have
_all_ the sites html in the database, django generates html dynamically
in response to requests, and (usually html) templates are used to
provide uniform structure around the context of a response. Templates
are not normally stored in a database, maybe because they're not
considered to be data which are likely to change, nor can be expressed
in a relational manner.

However it's not unreasonable to have some editable content stored in
the database, which may be html.

An example:

A site has an "About Us" page and the client wants to add in the fact
that Gerald has joined the company.

You could render a template that has all the "About Us" data hard coded,
but then to update the page you would have to edit the template, check
it into revision control and redeploy the site.

If you use flatpages (or any other CMS) then the site administrator (the
client) can change the "About Us" page content through the admin
interface, save it (to the database) and make sure it looks OK on the
site. Lovely.

Reply all
Reply to author
Forward
0 new messages