-
Notifications
You must be signed in to change notification settings - Fork 21
settings assume pk=1 #9
Comments
I considered suggesting settings move to settings.py-- although I admit being able to edit them in the Wordpress admin is a nice feature of RAMP. I'd be on board for migrating them to settings.py or a separate file if you agree. |
Yeah, I like the ability to edit them in admin, too. Is it safe to assume pk will always be 1? Will the admin enforce this? If not should we enforce that just one record exists no matter what the id and just grab it? |
Right now admin does enforce it On Feb 4, 2012, at 11:48 AM, Joshua Ruihleyreply@reply.github.com wrote:
|
Nice. Does admin explicitly enforce that the id will always be 1 or does it just enforce one record (and the id could be anything)? |
It doesn't acknowledge that other settings objects might exist: if you try to add one or look at the list, it does a get_or_create for pk=1, and redirects you to edit it On Feb 4, 2012, at 2:19 PM, Joshua Ruihleyreply@reply.github.com wrote:
|
Thanks fo the clarification. I'm closing this since settings should assume that pk=1. |
find a better way. don't rely on id, maybe enforce that only one setting record exists? possibly move settings out of database and into a file?
The text was updated successfully, but these errors were encountered: