2013-02-28 12:45:21 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from django.conf.urls.i18n import i18n_patterns
|
2013-03-25 14:45:24 +00:00
|
|
|
from django.http import HttpResponse, StreamingHttpResponse
|
2014-12-21 20:19:05 +00:00
|
|
|
from django.test import ignore_warnings
|
2014-11-26 21:21:29 +00:00
|
|
|
from django.utils.deprecation import RemovedInDjango20Warning
|
2013-02-28 12:45:21 +00:00
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
2014-11-26 21:21:29 +00:00
|
|
|
# test deprecated version of i18n_patterns() function (with prefix). Remove it
|
2014-04-02 00:46:34 +00:00
|
|
|
# and convert to list of urls() in Django 2.0
|
2014-12-21 20:19:05 +00:00
|
|
|
i18n_patterns = ignore_warnings(category=RemovedInDjango20Warning)(i18n_patterns)
|
2014-04-02 00:46:34 +00:00
|
|
|
|
2014-12-21 20:19:05 +00:00
|
|
|
urlpatterns = i18n_patterns('',
|
|
|
|
(r'^simple/$', lambda r: HttpResponse()),
|
|
|
|
(r'^streaming/$', lambda r: StreamingHttpResponse([_("Yes"), "/", _("No")])),
|
|
|
|
)
|