|
| 1 | +from django.conf import settings |
1 | 2 | from django.core.exceptions import ( |
2 | 3 | ImproperlyConfigured, |
| 4 | + ValidationError, # noqa: F401 |
3 | 5 | ) |
| 6 | +from django.core.validators import URLValidator, validate_email # noqa: F401 |
4 | 7 | from django.http import ( |
| 8 | + HttpRequest, # noqa: F401 |
| 9 | + HttpResponse, # noqa: F401 |
| 10 | + HttpResponseRedirect, # noqa: F401 |
5 | 11 | QueryDict, # noqa: F401 |
6 | 12 | ) |
| 13 | +from django.http.response import HttpResponseBase # noqa: F401 |
| 14 | +from django.shortcuts import render # noqa: F401 |
7 | 15 | from django.template import RequestContext |
8 | 16 | from django.template.backends.django import Template as DjangoLoadedTemplate |
9 | 17 | from django.template.context_processors import csrf as csrf_ |
|
13 | 21 | render_to_string, |
14 | 22 | ) |
15 | 23 | from django.template.utils import InvalidTemplateEngineError |
| 24 | +from django.utils.encoding import smart_str # noqa: F401 |
16 | 25 | from django.utils.html import format_html as django_format_html |
17 | 26 | from django.utils.safestring import mark_safe |
| 27 | +from django.utils.text import slugify # noqa: F401 |
18 | 28 |
|
19 | 29 | DjangoTemplate = None |
20 | 30 | JinjaTemplate = None |
21 | 31 |
|
22 | | -from django.conf import settings |
23 | 32 |
|
24 | 33 | template_types = tuple() |
25 | 34 |
|
@@ -48,7 +57,7 @@ class Template: |
48 | 57 | def __init__(self, template_string): |
49 | 58 | self.s = template_string |
50 | 59 |
|
51 | | - def render(self, context): |
| 60 | + def render(self, context): # noqa: F811 |
52 | 61 | if DjangoTemplate is not None: |
53 | 62 | return DjangoTemplate(self.s).render(context=context) |
54 | 63 | else: |
|
0 commit comments