6b92b09693972780d64260de057b85bb4d3e9e42
[django-ssify.git] / tests / urls.py
1 # -*- coding: utf-8 -*-
2 # This file is part of django-ssify, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See README.md for more information.
4 #
5 from __future__ import unicode_literals
6
7 from django.conf.urls import patterns, url
8 from django.views.generic import TemplateView
9
10
11 urlpatterns = patterns(
12     'tests.views',
13
14     # tests.basic
15     url(r'^$',
16         TemplateView.as_view(template_name='tests_basic/main.html')
17         ),
18     url(r'^number_zero$',
19         TemplateView.as_view(template_name='tests_basic/number_zero.html')
20         ),
21     url(r'^basic_include$',
22         TemplateView.as_view(template_name='tests_basic/basic_include.html')
23         ),
24     url(r'^random_quote$', 'random_quote', name='random_quote'),
25     url(r'^quote/(?P<number>.+)$', 'quote', name='quote'),
26
27     url(r'^quote_undeclared/(?P<number>.+)$', 'quote_undeclared'),
28     url(r'^quote_overdeclared/(?P<number>.+)$', 'quote_overdeclared'),
29
30     # tests.args
31     url(r'^include_args$',
32         TemplateView.as_view(template_name='tests_args/include_args.html'),
33         ),
34     url(r'^args$',
35         TemplateView.as_view(template_name='tests_args/args.html'),
36         {'limit': 3}
37         ),
38     url(r'^args/(?P<limit>\d+)$', 'args', name='args'),
39
40     # tests.csrf
41     url(r'^csrf$',
42         TemplateView.as_view(template_name='tests_csrf/csrf_token.html'),
43         ),
44     url(r'^csrf_check$', 'csrf_check'),
45
46     # tests.locale
47     url(r'^include_language_with_lang$',
48         TemplateView.as_view(template_name='tests_locale/include_language_with_lang.html')
49         ),
50     url(r'^include_language_without_lang$',
51         TemplateView.as_view(template_name='tests_locale/include_language_without_lang.html')
52         ),
53     url(r'^language/(?P<lang>.+)$', 'language_with_lang', name='language_with_lang'),
54     url(r'^language$', 'language_without_lang', name='language_without_lang'),
55     url(r'^bad_language$', 'language_with_lang', name='bad_language_with_lang'),
56 )