Re: Settings Model

2006-06-16 Thread Waylan Limberg
I would create a table with 2 columns as a key, value pair and set the key to be unique. That way, a setting could not be duplicated. Yet, you could add as many different settings as you want without altering the model at any point in the future. I suppose one could then add invalid/non-existent s

Re: Settings Model

2006-06-16 Thread Phil Powell
As far as I know, there's no way to restrict the number of instances of a particular model. You could hack the admin templates to hide "Add" buttons if an instance of a particular model already exists. Or override the save method in the model so that it doesn't save if an instance already exists

Settings Model

2006-06-16 Thread bradford
I need a model called settings that has some application settings the user can edit in the admin. How should I set this model up so that one and only one settings record always exists for the lifetime of the application. Also, please let me know if this approach is incorrect. --~--~-~-