Permalink
Browse files

magic-removal: Fixed #500 -- Removed TEMPLATE_FILE_EXTENSION setting …

…so that template loading requires you to give the full filename, including extension. This applies everywhere, even in the 'extends' and 'include' template tags.

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2700 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
adrianholovaty committed Apr 15, 2006
1 parent 39d42d4 commit 6442fd27bcf116d62ba5108436a28a3ed4df95e5
Showing with 124 additions and 140 deletions.
  1. +0 −3 django/conf/global_settings.py
  2. +1 −1 django/contrib/admin/templates/admin/404.html
  3. +1 −1 django/contrib/admin/templates/admin/500.html
  4. +1 −1 django/contrib/admin/templates/admin/base_site.html
  5. +1 −1 django/contrib/admin/templates/admin/change_form.html
  6. +1 −1 django/contrib/admin/templates/admin/change_list.html
  7. +1 −1 django/contrib/admin/templates/admin/delete_confirmation.html
  8. +2 −2 django/contrib/admin/templates/admin/index.html
  9. +1 −1 django/contrib/admin/templates/admin/login.html
  10. +1 −1 django/contrib/admin/templates/admin/object_history.html
  11. +1 −1 django/contrib/admin/templates/admin/template_validator.html
  12. +1 −1 django/contrib/admin/templates/admin_doc/bookmarklets.html
  13. +1 −1 django/contrib/admin/templates/admin_doc/index.html
  14. +1 −1 django/contrib/admin/templates/admin_doc/missing_docutils.html
  15. +1 −1 django/contrib/admin/templates/admin_doc/model_detail.html
  16. +1 −1 django/contrib/admin/templates/admin_doc/model_index.html
  17. +1 −1 django/contrib/admin/templates/admin_doc/template_detail.html
  18. +1 −1 django/contrib/admin/templates/admin_doc/template_filter_index.html
  19. +1 −1 django/contrib/admin/templates/admin_doc/template_tag_index.html
  20. +1 −1 django/contrib/admin/templates/admin_doc/view_detail.html
  21. +1 −1 django/contrib/admin/templates/admin_doc/view_index.html
  22. +1 −1 django/contrib/admin/templates/registration/logged_out.html
  23. +1 −1 django/contrib/admin/templates/registration/password_change_done.html
  24. +1 −1 django/contrib/admin/templates/registration/password_change_form.html
  25. +1 −1 django/contrib/admin/templates/registration/password_reset_done.html
  26. +1 −1 django/contrib/admin/templates/registration/password_reset_form.html
  27. +1 −1 django/contrib/admin/templates/widget/many_to_many.html
  28. +1 −1 django/contrib/admin/templates/widget/one_to_one.html
  29. +6 −6 django/contrib/admin/templatetags/admin_list.py
  30. +6 −6 django/contrib/admin/templatetags/admin_modify.py
  31. +1 −1 django/contrib/admin/views/decorators.py
  32. +19 −19 django/contrib/admin/views/doc.py
  33. +13 −13 django/contrib/admin/views/main.py
  34. +1 −1 django/contrib/admin/views/template.py
  35. +1 −1 django/contrib/auth/forms.py
  36. +6 −6 django/contrib/auth/views.py
  37. +3 −3 django/contrib/comments/views/comments.py
  38. +1 −1 django/contrib/comments/views/karma.py
  39. +4 −4 django/contrib/comments/views/userflags.py
  40. +2 −2 django/contrib/flatpages/views.py
  41. +2 −2 django/contrib/syndication/feeds.py
  42. +1 −1 django/template/loaders/app_directories.py
  43. +1 −1 django/template/loaders/eggs.py
  44. +1 −1 django/template/loaders/filesystem.py
  45. +3 −3 docs/authentication.txt
  46. +0 −8 docs/settings.txt
  47. +5 −4 docs/syndication_feeds.txt
  48. +4 −4 docs/templates.txt
  49. +12 −17 docs/templates_python.txt
  50. +4 −5 docs/tutorial03.txt
@@ -102,9 +102,6 @@
# List of locations of the template source files, in search order.
TEMPLATE_DIRS = ()
-# Extension on all templates.
-TEMPLATE_FILE_EXTENSION = '.html'
-
# List of callables that know how to import templates from various sources.
# See the comments in django/core/template/loader.py for interface
# documentation.
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block title %}{% trans 'Page not found' %}{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% trans "Home" %}</a> &rsaquo; {% trans "Server error" %}</div>{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base" %}
+{% extends "admin/base.html" %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Django site admin' %}{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n admin_modify adminmedia %}
{% block extrahead %}{{ block.super }}
<script type="text/javascript" src="../../../jsi18n/"></script>
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load adminmedia admin_list i18n %}
{% block stylesheet %}{% admin_media_prefix %}css/changelists.css{% endblock %}
{% block bodyclass %}change-list{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block userlinks %}<a href="../../../../doc/">{% trans 'Documentation' %}</a> / <a href="../../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../../logout/">{% trans 'Log out' %}</a>{% endblock %}
{% block breadcrumbs %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/dashboard.css{% endblock %}
@@ -14,7 +14,7 @@
{% if app_list %}
{% for app in app_list %}
<div class="module">
- <table summary="{% blocktrans with app.name as name %}Models available in the {{ name }} application.{% endblocktrans %}">
+ <table summary="{% blocktrans with app.name as name %}Models available in the {{ name }} application.{% endblocktrans %}">
<caption>{{ app.name }}</caption>
{% for model in app.models %}
<tr>
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/login.css{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block userlinks %}<a href="../../../../doc/">{% trans 'Documentation' %}</a> / <a href="../../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../../logout/">{% trans 'Log out' %}</a>{% endblock %}
{% block breadcrumbs %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% block content %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% block breadcrumbs %}{% load i18n %}<div class="breadcrumbs"><a href="../../">{% trans "Home" %}</a> &rsaquo; <a href="../">{% trans "Documentation" %}</a> &rsaquo; {% trans "Bookmarklets" %}</div>{% endblock %}
{% block userlinks %}<a href="../../password_change/">{% trans 'Change password' %}</a> / <a href="../../logout/">{% trans 'Log out' %}</a>{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">Home</a> &rsaquo; Documentation</div>{% endblock %}
{% block userlinks %}<a href="../password_change/">{% trans 'Change password' %}</a> / <a href="../logout/">{% trans 'Log out' %}</a>{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">Home</a> &rsaquo; Documentation</div>{% endblock %}
{% block userlinks %}<a href="../password_change/">{% trans 'Change password' %}</a> / <a href="../logout/">{% trans 'Log out' %}</a>{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block userlinks %}<a href="../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../logout/">{% trans 'Log out' %}</a>{% endblock %}
{% block extrahead %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block coltype %}colSM{% endblock %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; Models</div>{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Home</a> &rsaquo; <a href="../../">Documentation</a> &rsaquo; Templates &rsaquo; {{ name }}</div>{% endblock %}
{% block userlinks %}<a href="../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../logout/">{% trans 'Log out' %}</a>{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block coltype %}colSM{% endblock %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; filters</div>{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block coltype %}colSM{% endblock %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; Tags</div>{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../../">Home</a> &rsaquo; <a href="../../">Documentation</a> &rsaquo; <a href="../">Views</a> &rsaquo; {{ name }}</div>{% endblock %}
{% block userlinks %}<a href="../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../logout/">{% trans 'Log out' %}</a>{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block coltype %}colSM{% endblock %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">Home</a> &rsaquo; <a href="../">Documentation</a> &rsaquo; Views</div>{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a></div>{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password change' %}</div>{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block userlinks %}<a href="../doc/">{% trans 'Documentation' %}</a> / {% trans 'Change password' %} / <a href="../logout/">{% trans 'Log out' %}</a>{% endblock %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password change' %}</div>{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password reset' %}</div>{% endblock %}
@@ -1,4 +1,4 @@
-{% extends "admin/base_site" %}
+{% extends "admin/base_site.html" %}
{% load i18n %}
{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> &rsaquo; {% trans 'Password reset' %}</div>{% endblock %}
@@ -1 +1 @@
-{% include "widget/foreign" %}
+{% include "widget/foreign.html" %}
@@ -1 +1 @@
-{% include "widget/foreign" %}
+{% include "widget/foreign.html" %}
@@ -65,7 +65,7 @@ def pagination(cl):
'ALL_VAR': ALL_VAR,
'1': 1,
}
-pagination = register.inclusion_tag('admin/pagination')(pagination)
+pagination = register.inclusion_tag('admin/pagination.html')(pagination)
def result_headers(cl):
lookup_opts = cl.lookup_opts
@@ -185,7 +185,7 @@ def result_list(cl):
return {'cl': cl,
'result_headers': list(result_headers(cl)),
'results': list(results(cl))}
-result_list = register.inclusion_tag("admin/change_list_results")(result_list)
+result_list = register.inclusion_tag("admin/change_list_results.html")(result_list)
def date_hierarchy(cl):
if cl.lookup_opts.admin.date_hierarchy:
@@ -245,20 +245,20 @@ def date_hierarchy(cl):
'title': year.year
} for year in years]
}
-date_hierarchy = register.inclusion_tag('admin/date_hierarchy')(date_hierarchy)
+date_hierarchy = register.inclusion_tag('admin/date_hierarchy.html')(date_hierarchy)
def search_form(cl):
return {
'cl': cl,
'show_result_count': cl.result_count != cl.full_result_count and not cl.opts.one_to_one_field,
'search_var': SEARCH_VAR
}
-search_form = register.inclusion_tag('admin/search_form')(search_form)
+search_form = register.inclusion_tag('admin/search_form.html')(search_form)
def filter(cl, spec):
return {'title': spec.title(), 'choices' : list(spec.choices(cl))}
-filter = register.inclusion_tag('admin/filter')(filter)
+filter = register.inclusion_tag('admin/filter.html')(filter)
def filters(cl):
return {'cl': cl}
-filters = register.inclusion_tag('admin/filters')(filters)
+filters = register.inclusion_tag('admin/filters.html')(filters)
@@ -35,7 +35,7 @@ def submit_row(context):
'show_save_and_continue': not is_popup and context['has_change_permission'],
'show_save': True
}
-submit_row = register.inclusion_tag('admin/submit_line', takes_context=True)(submit_row)
+submit_row = register.inclusion_tag('admin/submit_line.html', takes_context=True)(submit_row)
def field_label(bound_field):
class_names = []
@@ -64,15 +64,15 @@ def get_nodelist(cls, klass):
if not cls.nodelists.has_key(klass):
try:
field_class_name = klass.__name__
- template_name = "widget/%s" % class_name_to_underscored(field_class_name)
+ template_name = "widget/%s.html" % class_name_to_underscored(field_class_name)
nodelist = loader.get_template(template_name).nodelist
except template.TemplateDoesNotExist:
super_klass = bool(klass.__bases__) and klass.__bases__[0] or None
if super_klass and super_klass != Field:
nodelist = cls.get_nodelist(super_klass)
else:
if not cls.default:
- cls.default = loader.get_template("widget/default").nodelist
+ cls.default = loader.get_template("widget/default.html").nodelist
nodelist = cls.default
cls.nodelists[klass] = nodelist
@@ -126,7 +126,7 @@ def __init__(self, related_object, field_mapping, original):
self.show_url = original and hasattr(self.relation.opts, 'get_absolute_url')
def template_name(self):
- return "admin/edit_inline_tabular"
+ return "admin/edit_inline_tabular.html"
class StackedBoundRelatedObject(BoundRelatedObject):
def __init__(self, related_object, field_mapping, original):
@@ -138,7 +138,7 @@ def __init__(self, related_object, field_mapping, original):
self.show_url = original and hasattr(self.relation.opts, 'get_absolute_url')
def template_name(self):
- return "admin/edit_inline_stacked"
+ return "admin/edit_inline_stacked.html"
class EditInlineNode(template.Node):
def __init__(self, rel_var):
@@ -229,4 +229,4 @@ def admin_field_line(context, argument_val):
'bound_fields': bound_fields,
'class_names': " ".join(class_names),
}
-admin_field_line = register.inclusion_tag('admin/field_line', takes_context=True)(admin_field_line)
+admin_field_line = register.inclusion_tag('admin/field_line.html', takes_context=True)(admin_field_line)
@@ -19,7 +19,7 @@ def _display_login_form(request, error_message=''):
post_data = _encode_post_data(request.POST)
else:
post_data = _encode_post_data({})
- return render_to_response('admin/login', {
+ return render_to_response('admin/login.html', {
'title': _('Log in'),
'app_path': request.path,
'post_data': post_data,
Oops, something went wrong.

0 comments on commit 6442fd2

Please sign in to comment.