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. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.