Ticket #25466: 25466-aliases.diff

File 25466-aliases.diff, 1.0 KB (added by Tim Graham, 9 years ago)
  • django/template/base.py

    diff --git a/django/template/base.py b/django/template/base.py
    index bb2456a..a8597b5 100644
    a b class Origin(object):  
    156156            )
    157157
    158158
     159# for backwards compatibility in Django 1.9  RemovedInDjango20Warning
     160class StringOrigin(Origin):
     161    pass
     162
     163
    159164class Template(object):
    160165    def __init__(self, template_string, origin=None, name=None, engine=None):
    161166        try:
  • django/template/loader.py

    diff --git a/django/template/loader.py b/django/template/loader.py
    index 38dfabc..b5c5df8 100644
    a b  
    11from . import engines
     2from .base import Origin
    23from .exceptions import TemplateDoesNotExist
    34
    45
    def render_to_string(template_name, context=None, request=None, using=None):  
    5758
    5859def _engine_list(using=None):
    5960    return engines.all() if using is None else [engines[using]]
     61
     62
     63# for backwards compatibility in Django 1.9  RemovedInDjango20Warning
     64class LoaderOrigin(Origin):
     65    pass
Back to Top