#626 closed enhancement (fixed)
Move template modules to django.core.template package
Reported by: | Adrian Holovaty | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Core (Other) | Version: | 1.0 |
Severity: | minor | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
There are too many template-related modules lying around in django.core
. We should create a django.core.template
package and put the following modules in it:
django.core.defaultfilters
django.core.defaulttags
django.core.template
(would bedjango.core.template.__init__
to retain identical interface)django.core.template_loader
django.core.template_file
To maintain backwards compatibility, django.core.template_loader should still exist (at least until 1.0), because a lot of Django code does from django.core.template_loader import ...
.
We should probably do this before #582 and #625, because those tickets both add template-related modules to django.core.
Attachments (2)
Change History (9)
comment:1 by , 19 years ago
Status: | new → assigned |
---|
comment:2 by , 19 years ago
Description: | modified (diff) |
---|
by , 19 years ago
Attachment: | 626_import_error.patch added |
---|
Patch that causes circular-import problem.
comment:3 by , 19 years ago
I'm running into circular import problems in the implementation. See the attached patch, 626_import_error.patch. Any ideas?
comment:4 by , 19 years ago
This patch works and includes some of the changes that were omitted from the previous patch.
comment:5 by , 19 years ago
Svn diff utterly sucks. It does not include file moves or directory creations.
So to apply this, do from your trunk checkout:
mkdir django/core/template/ svn add django/core/template/ svn move django/core/template.py django/core/template/__init__.py mkdir django/core/template/loaders/ touch django/core/template/loaders/__init__.py svn add django/core/template/loaders/ svn move django/core/template_file.py django/core/template/loaders/filesystem.py patch -p0 < /path/to/626_working.patch
I think that is it. Untested procedure. Little did I think we would be writing manual patch scripts on the verge of 2006....
bring on bazaar-ng ;-)
comment:6 by , 19 years ago
Got it. Basically you avoided the issue by importing specific objects from django.core.template instead of doing "from django.core import template".
comment:7 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(Changed formatting in description.)