Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

keep settings in database

In a reusable application (in which i don't want to change any code) i would like to change a SETTING var that the application uses (in its forms and maybe other parts) to be dynamic (update its contents from a db table).

What would be the best approach to do that (a middleware maybe?) ?

like image 420
vinilios Avatar asked Sep 08 '09 13:09

vinilios


People also ask

Is it better to keep configurations in config file or database?

Multiple versions may require different key values. The bottom line is that if it's a large scale distributed environment, database is the way to go unless you have automated config file management system in place.

What should I store in a database?

The purpose of every database is to store information, texts, images, even media files. All dynamic modern websites rely on one or more databases for storing articles and other published content, information about the users, contact information, connections to other websites, ads, etc.

What is configuration in database?

You use the Database Configuration application to create or change objects and attributes, and to customize the database. An object is a self-contained software entity that consists of both data and functions to manipulate data. Most applications are associated with one main object and other related objects.


2 Answers

Look into the django-dbsettings project.

like image 112
Daniel Roseman Avatar answered Sep 23 '22 20:09

Daniel Roseman


Django-settings is another alternative.

It was created about a year after this question was originally asked.

like image 36
Trey Hunner Avatar answered Sep 20 '22 20:09

Trey Hunner