django-tos/tos/urls.py
Krzysztof Dorosz 2b3efcfcb0 This commit fixes bug:
1) in urls a view "tos" has context object evaluated only in a runtime. This means that even if tos was changed, the "tos" view shows always the same old tos object.
2) check_tos view uses now messages framework instead of {{note}}
3) Support for translation in "you cannot login..." message added

The following code was tested with django 1.4 and it is reported to work well.
2012-10-14 23:41:35 +02:00

10 lines
No EOL
317 B
Python

from django.conf.urls import url, patterns
from tos.views import check_tos, TosView
urlpatterns = patterns('',
# Terms of Service conform
url(r'^confirm/$', check_tos, name='tos_check_tos'),
# Terms of service simple display
url(r'^$', TosView.as_view(), name='tos'),
)