Skip to content

Commit 6759dd6

Browse files
committed
Django 1.9: Changes merged forward from previous datatracker django-1.9 branch.
- Legacy-Id: 12619
2 parents c2541ec + 0399ca5 commit 6759dd6

5 files changed

Lines changed: 11 additions & 9 deletions

File tree

ietf/dbtemplate/template.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
from docutils.utils import SystemMessage
55
import debug # pyflakes:ignore
66

7-
from django.template.base import Template as DjangoTemplate, TemplateDoesNotExist, TemplateEncodingError
8-
from django.template.loader import BaseLoader
7+
from django.template import loaders
8+
from django.template.base import Template as DjangoTemplate, TemplateEncodingError
9+
from django.template.exceptions import TemplateDoesNotExist
910
from django.utils.encoding import smart_unicode
1011

1112
from ietf.dbtemplate.models import DBTemplate
@@ -60,9 +61,9 @@ def render(self, context):
6061
e.args = tuple(args)
6162
raise e
6263

63-
class Loader(BaseLoader):
64-
def __init__(self, *args, **kwargs):
65-
super(Loader, self).__init__(self, *args, **kwargs)
64+
class Loader(loaders.base.Loader):
65+
def __init__(self, engine):
66+
super(Loader, self).__init__(engine)
6667
self.is_usable = True
6768

6869
def load_template(self, template_name, template_dirs=None):
@@ -77,7 +78,7 @@ def load_template(self, template_name, template_dirs=None):
7778
raise TemplateDoesNotExist(template_name)
7879

7980

80-
_loader = Loader()
81+
_loader = Loader(engine='django')
8182

8283

8384
def load_template_source(template_name, template_dirs=None):

ietf/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
warnings.filterwarnings("ignore", message="Report.file_reporters will no longer be available in Coverage.py 4.2", module="coverage.report")
1414
warnings.filterwarnings("ignore", message="initial_data fixtures are deprecated. Use data migrations instead.", module="django.core.management.commands.loaddata")
1515
warnings.filterwarnings("ignore", message="The popen2 module is deprecated. Use the subprocess module.", module="ietf.utils.pipe")
16+
warnings.filterwarnings("ignore", message="Reversing by dotted path is deprecated")
17+
warnings.filterwarnings("ignore", message=r"Support for string view arguments to url\(\) is deprecated and will be removed in Django 1.10")
1618

1719
try:
1820
import syslog

ietf/settings_sqlitetest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717

1818
## To be removed after upgrade to Django 1.8 ##
1919

20-
from django.db.migrations.loader import MIGRATIONS_MODULE_NAME
2120
class DisableMigrations(object):
2221

2322
def __contains__(self, item):
2423
return True
2524

2625
def __getitem__(self, item):
26+
from django.db.migrations.loader import MIGRATIONS_MODULE_NAME
2727
# The string below is significant. It has to include the value of
2828
# django.db.migrations.loader.MIGRATIONS_MODULE_NAME. Used by django
2929
# 1.7 code in django.db.migrations.loader.MigrationLoader to

release-coverage.json.gz

31 Bytes
Binary file not shown.

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ coverage>=4.0.1,!=4.0.2
77
#cssselect>=0.6.1 # for PyQuery
88
decorator>=3.4.0
99
defusedxml>=0.4.1 # for TastyPie when ussing xml; not a declared dependency
10-
Django>=1.8.16,<1.9
10+
Django>=1.9,<1.10
1111
django-bootstrap3>=5.1.1,<7.0.0 # django-bootstrap 7.0 requires django 1.8
1212
django-formtools>=1.0 # instead of django.contrib.formtools in 1.8
1313
django-markup>=1.1
@@ -25,7 +25,6 @@ mock>=2.0.0
2525
MySQL-python>=1.2.5
2626
pathlib>=1.0
2727
Pillow>=3.0
28-
pip>=6.1.1,<9.0
2928
pyang>=1.6
3029
pyflakes>=0.8.1
3130
pyquery>=1.2.13,!=1.2.14 # Pyqyery 1.2.14 fails on some selectors or stacked selectors

0 commit comments

Comments
 (0)