23 | | We won't deal with read-only globals. `grep` in Django source finds the following other globals. |
| 23 | The following modules' use of globals needs review. |
| 24 | |
| 25 | See below for raw `grep` results. |
| 26 | |
| 27 | '''THE FOLLOWING IS WORK IN PROGRESS.''' |
| 28 | |
| 29 | === Settings === |
| 30 | |
| 31 | FIXME: not reviewed. Replacing the `global_settings` with `settings` -- probably no major issues. |
| 32 | |
| 33 | === django/contrib/sites/models.py === |
| 34 | |
| 35 | Globals used: |
| 36 | {{{ |
| 37 | SITE_CACHE |
| 38 | }}} |
| 39 | |
| 40 | === django/template === |
| 41 | |
| 42 | Globals used: |
| 43 | {{{ |
| 44 | context.py: _standard_context_processors |
| 45 | __init__.py: invalid_var_format_string, libraries |
| 46 | loader.py: template_source_loaders |
| 47 | }}} |
| 48 | |
| 49 | === django/utils/translation === |
| 50 | |
| 51 | Globals used: |
| 52 | {{{ |
| 53 | trans_real.py: _accepted, _active, _default, _translations |
| 54 | }}} |
| 55 | |
| 56 | === django/contrib/sites/models.py === |
| 57 | |
| 58 | Globals used: |
| 59 | {{{ |
| 60 | SITE_CACHE |
| 61 | }}} |
| 62 | |
| 63 | |
| 64 | |
| 65 | {{{ |
| 66 | }}} |
| 67 | |
| 68 | == Raw `grep` results == |
| 161 | Out of these, the following are read-only (i.e. not changed anywhere in code) or otherwise irrelevant: `contrib/admin, formtools tests, localflavor mappings, core/cache, core/handlers, core/serializers/__init__.py:BUILTIN_SERIALIZERS, core/servers, |
| 162 | |
| 163 | `SITE_CACHE` and everything in `django.utils.translation.trans_real` has already been listed under `globals` above. |
| 164 | |
| 165 | `_callable_cache` and `_resolver_cache` in django/core/urlresolvers.py are used within the memoize decorator, `result = func(*args)` may be called more than once in `utils/functional.py`, but this should generally be a non-issue. |
| 166 | |
| 167 | That leaves the following relevant global dicts not listed before: |
| 168 | {{{ |
| 169 | django/core/serializers/__init__.py:_serializers = {} |
| 170 | }}} |
| 171 | |