Is it a good practice to store all static data dynamically in database rather?

98 views
Skip to first unread message

Sapna Tomar

unread,
Aug 30, 2019, 4:35:55 PM8/30/19
to Django users
Hey! I'm making a static website (showcasing a hobby club of my college) using Django. I have used database for storing most of the content like photos, or events since they have multiple instances. Will it also be okay to save all the rest of the content which does not necessarily have more than one instance, like 'contact info' at the end of the page, or an 'About' of the page?

Raul Santos

unread,
Aug 30, 2019, 7:46:37 PM8/30/19
to django...@googlegroups.com
Hello there!

The images you mentioned you can store in the static folder of your Django project. This is the "default" location.Things such logo image, icons, JS and CSS files are placed in this folder, you can separete them by types. 






Em Sex, 30 de ago de 2019 17:35, Sapna Tomar <medr...@gmail.com> escreveu:
Hey! I'm making a static website (showcasing a hobby club of my college) using Django. I have used database for storing most of the content like photos, or events since they have multiple instances. Will it also be okay to save all the rest of the content which does not necessarily have more than one instance, like 'contact info' at the end of the page, or an 'About' of the page?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1b86e8d4-6d37-4c85-b3d4-fb7283565fed%40googlegroups.com.

Aldian Fazrihady

unread,
Aug 31, 2019, 5:53:40 AM8/31/19
to django...@googlegroups.com
There are already servers that are very good at handling static files, such as nginx, apache, or amazon S3.
Django will never be better at handling static files compared to those servers, as on production, Django will always be put behind those web servers.

Putting static files on database, means Django will be needed to handle them, which is not efficient.


On Sat, Aug 31, 2019 at 3:35 AM Sapna Tomar <medr...@gmail.com> wrote:
Hey! I'm making a static website (showcasing a hobby club of my college) using Django. I have used database for storing most of the content like photos, or events since they have multiple instances. Will it also be okay to save all the rest of the content which does not necessarily have more than one instance, like 'contact info' at the end of the page, or an 'About' of the page?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1b86e8d4-6d37-4c85-b3d4-fb7283565fed%40googlegroups.com.


--
Regards,

Reply all
Reply to author
Forward
0 new messages