Django 1.9: Changes merged forward from previous datatracker django-1.9 branch.

- Legacy-Id: 12619
This commit is contained in:
Henrik Levkowetz 2016-12-22 17:24:45 +00:00
commit 6759dd6496
5 changed files with 11 additions and 9 deletions

View file

@ -4,8 +4,9 @@ from docutils.core import publish_string
from docutils.utils import SystemMessage
import debug # pyflakes:ignore
from django.template.base import Template as DjangoTemplate, TemplateDoesNotExist, TemplateEncodingError
from django.template.loader import BaseLoader
from django.template import loaders
from django.template.base import Template as DjangoTemplate, TemplateEncodingError
from django.template.exceptions import TemplateDoesNotExist
from django.utils.encoding import smart_unicode
from ietf.dbtemplate.models import DBTemplate
@ -60,9 +61,9 @@ class RSTTemplate(PlainTemplate):
e.args = tuple(args)
raise e
class Loader(BaseLoader):
def __init__(self, *args, **kwargs):
super(Loader, self).__init__(self, *args, **kwargs)
class Loader(loaders.base.Loader):
def __init__(self, engine):
super(Loader, self).__init__(engine)
self.is_usable = True
def load_template(self, template_name, template_dirs=None):
@ -77,7 +78,7 @@ class Loader(BaseLoader):
raise TemplateDoesNotExist(template_name)
_loader = Loader()
_loader = Loader(engine='django')
def load_template_source(template_name, template_dirs=None):

View file

@ -13,6 +13,8 @@ warnings.simplefilter("always", DeprecationWarning)
warnings.filterwarnings("ignore", message="Report.file_reporters will no longer be available in Coverage.py 4.2", module="coverage.report")
warnings.filterwarnings("ignore", message="initial_data fixtures are deprecated. Use data migrations instead.", module="django.core.management.commands.loaddata")
warnings.filterwarnings("ignore", message="The popen2 module is deprecated. Use the subprocess module.", module="ietf.utils.pipe")
warnings.filterwarnings("ignore", message="Reversing by dotted path is deprecated")
warnings.filterwarnings("ignore", message=r"Support for string view arguments to url\(\) is deprecated and will be removed in Django 1.10")
try:
import syslog

View file

@ -17,13 +17,13 @@ debug.debug = True
## To be removed after upgrade to Django 1.8 ##
from django.db.migrations.loader import MIGRATIONS_MODULE_NAME
class DisableMigrations(object):
def __contains__(self, item):
return True
def __getitem__(self, item):
from django.db.migrations.loader import MIGRATIONS_MODULE_NAME
# The string below is significant. It has to include the value of
# django.db.migrations.loader.MIGRATIONS_MODULE_NAME. Used by django
# 1.7 code in django.db.migrations.loader.MigrationLoader to

Binary file not shown.

View file

@ -7,7 +7,7 @@ coverage>=4.0.1,!=4.0.2
#cssselect>=0.6.1 # for PyQuery
decorator>=3.4.0
defusedxml>=0.4.1 # for TastyPie when ussing xml; not a declared dependency
Django>=1.8.16,<1.9
Django>=1.9,<1.10
django-bootstrap3>=5.1.1,<7.0.0 # django-bootstrap 7.0 requires django 1.8
django-formtools>=1.0 # instead of django.contrib.formtools in 1.8
django-markup>=1.1
@ -25,7 +25,6 @@ mock>=2.0.0
MySQL-python>=1.2.5
pathlib>=1.0
Pillow>=3.0
pip>=6.1.1,<9.0
pyang>=1.6
pyflakes>=0.8.1
pyquery>=1.2.13,!=1.2.14 # Pyqyery 1.2.14 fails on some selectors or stacked selectors