text media files for comments

15 views
Skip to first unread message

Fatih Tiryakioglu

unread,
Jan 13, 2014, 4:11:55 PM1/13/14
to django...@googlegroups.com
Hi all,

I want to render a static media .txt file from django template, but I can't load it. Should I use database for text comments, or is it better statatic text files like image files in media folder.

Any help is appreciated.


Sven Aßmann

unread,
Jan 14, 2014, 7:47:38 PM1/14/14
to django...@googlegroups.com, Fatih Tiryakioglu
Hi Fatih,

i would ask myself the question is this static data that not changes
frequently or is it editable content that should be:

a) maintainable from users (without code updates of course)
b) is maintained independently form software releaes

if one of thoses questions can be answered with yes then i would go for a
model that stores that texts. So that in fact you only render that stuff within
a normal view (like blog posts but much more simpler)

if the answer is no: then just include it like css of js files and deliver the
files with a custom ResponseView that reads the file content and puts it out, or
a specialized template view that skips the parse and processing aspect of
processing templates.
--


Best Regards,
Sven

Reply all
Reply to author
Forward
0 new messages