This repository has been archived on 2026-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
RepApp/repapp/one_time_login/urls.py

23 lines
447 B
Python
Raw Normal View History

2023-08-27 20:47:19 +00:00
"""
Urls of RepApp.
"""
2023-08-30 19:19:36 +00:00
import sys
import logging
2023-08-27 20:47:19 +00:00
from django.urls import path
2023-08-30 19:19:36 +00:00
from django.conf import settings
2023-08-27 20:47:19 +00:00
from . import views
app_name = 'one_time_login'
urlpatterns = [
2023-08-29 11:08:35 +00:00
path("<str:secret>/", views.login_view, name="login"),
2023-08-27 20:47:19 +00:00
]
2023-08-30 19:19:36 +00:00
if settings.DEBUG or sys.argv[1:2] == ['test']:
logging.info('one_time_login: enable protected test URL')
urlpatterns += [
path("protected/", views.protected_test, name="protected"),
]