Changes between Version 16 and Version 17 of ContribAuthImprovements


Ignore:
Timestamp:
Apr 3, 2012, 3:24:36 PM (13 years ago)
Author:
Carl Meyer
Comment:

Remove references to models/settings circular dependency; it's a non-issue.

Legend:

Unmodified
Added
Removed
Modified
  • ContribAuthImprovements

    v16 v17  
    5151 * Introduces a setting that immediately becomes deprecated (since it won't be needed once the migration cycle is complete)
    5252 * Doesn't address the problem with any other usage of !EmailField having a max_length of 75.
    53  * Introduces a circular dependency between settings and models. When settings are loaded, `INSTALLED_APPS` is inspected, and each models file is loaded. If a models file contains a reference to settings, hilarity can ensue. This isn't a problem *most* of the time, but it can lead to some interesting side effects. (Once you declare a field,  you probably already have settings imported, see code of {{{Field.__init__}}})
    54     {{{#!python
    55         self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE
    56     }}}
    5753
    5854== Solution 1a: Superminimal with forced migration ==
     
    10298=== Problems ===
    10399
    104  * Has the same settings-models circular dependency problem as Solution 1.
    105100 * Doesn't address the !EmailField length problem for existing users. We could address this by having a User model (reflecting current field lengths) and a new !SimpleUser (that reflects better defaults); then use global_settings and project template settings to define which User is the default for new vs existing projects.
    106101 * Doesn't solve the analogous problem for any other project. E.g., contrib.comments already has pluggable Comments models, and has invented a bespoke solution. Other projects will have similar needs; this solution doesn't address the duplication of code.
Back to Top