diff options
| author | Sjoerd Job Postmus <sjoerdjob@sjec.nl> | 2016-10-20 19:29:04 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-09-20 18:04:42 -0400 |
| commit | df41b5a05d4e00e80e73afe629072e37873e767a (patch) | |
| tree | baaf71ae695e2d3af604ea0d663284cb406c71e4 /django/views | |
| parent | c4c128d67c7dc2830631c6859a204c9d259f1fb1 (diff) | |
Fixed #28593 -- Added a simplified URL routing syntax per DEP 0201.
Thanks Aymeric Augustin for shepherding the DEP and patch review.
Thanks Marten Kenbeek and Tim Graham for contributing to the code.
Thanks Tom Christie, Shai Berger, and Tim Graham for the docs.
Diffstat (limited to 'django/views')
| -rw-r--r-- | django/views/generic/dates.py | 2 | ||||
| -rw-r--r-- | django/views/templates/technical_404.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/django/views/generic/dates.py b/django/views/generic/dates.py index 5e0247474d..2aedf3aacd 100644 --- a/django/views/generic/dates.py +++ b/django/views/generic/dates.py @@ -612,7 +612,7 @@ def _date_from_string(year, year_format, month='', month_format='', day='', day_ (only year is mandatory). Raise a 404 for an invalid date. """ format = year_format + delim + month_format + delim + day_format - datestr = year + delim + month + delim + day + datestr = str(year) + delim + str(month) + delim + str(day) try: return datetime.datetime.strptime(datestr, format).date() except ValueError: diff --git a/django/views/templates/technical_404.html b/django/views/templates/technical_404.html index ec518f658e..0bf5fd3cd0 100644 --- a/django/views/templates/technical_404.html +++ b/django/views/templates/technical_404.html @@ -52,7 +52,7 @@ {% for pattern in urlpatterns %} <li> {% for pat in pattern %} - {{ pat.regex.pattern }} + {{ pat.pattern }} {% if forloop.last and pat.name %}[name='{{ pat.name }}']{% endif %} {% endfor %} </li> |
