Changes between Version 16 and Version 17 of ContribAuthImprovements
- Timestamp:
- Apr 3, 2012, 3:24:36 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ContribAuthImprovements
v16 v17 51 51 * Introduces a setting that immediately becomes deprecated (since it won't be needed once the migration cycle is complete) 52 52 * 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 {{{#!python55 self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE56 }}}57 53 58 54 == Solution 1a: Superminimal with forced migration == … … 102 98 === Problems === 103 99 104 * Has the same settings-models circular dependency problem as Solution 1.105 100 * 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. 106 101 * 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.