|
1 | 1 | # coding: utf-8
|
2 | 2 | import private_storage.urls
|
3 | 3 | from django.conf import settings
|
4 |
| -from django.urls import include, re_path, path |
| 4 | +from django.urls import include, path, re_path |
5 | 5 | from django.views.i18n import JavaScriptCatalog
|
6 | 6 |
|
7 | 7 | from hub.models import ConfigurationFile
|
8 | 8 | from hub.views import ExtraDetailRegistrationView
|
9 |
| -from kobo.apps.superuser_stats.views import ( |
10 |
| - user_report, |
11 |
| - country_report, |
12 |
| - retrieve_reports, |
13 |
| -) |
| 9 | +from kobo.apps.mfa.views import MfaLoginView, MfaTokenView |
| 10 | +from kobo.apps.superuser_stats.views import (country_report, retrieve_reports, |
| 11 | + user_report) |
14 | 12 | from kpi.forms.registration import RegistrationForm
|
15 |
| -from kpi.views import authorized_application_authenticate_user |
16 |
| -from kpi.views import home, one_time_login, browser_tests, design_system, modern_browsers |
17 |
| -from kpi.views.environment import EnvironmentView |
| 13 | +from kpi.views import (authorized_application_authenticate_user, browser_tests, |
| 14 | + design_system, home, modern_browsers, one_time_login) |
18 | 15 | from kpi.views.current_user import CurrentUserViewSet
|
19 |
| -from kobo.apps.mfa.views import ( |
20 |
| - MfaLoginView, |
21 |
| - MfaTokenView, |
22 |
| -) |
| 16 | +from kpi.views.environment import EnvironmentView |
23 | 17 | from kpi.views.token import TokenView
|
24 | 18 |
|
25 | 19 | from .router_api_v1 import router_api_v1
|
26 |
| -from .router_api_v2 import router_api_v2, URL_NAMESPACE |
| 20 | +from .router_api_v2 import URL_NAMESPACE, router_api_v2 |
27 | 21 |
|
28 | 22 | # TODO: Give other apps their own `urls.py` files instead of importing their
|
29 | 23 | # views directly! See
|
|
37 | 31 | 'get': 'retrieve',
|
38 | 32 | 'patch': 'partial_update',
|
39 | 33 | }), name='currentuser-detail'),
|
| 34 | + path('grant-default-model-level-perms', CurrentUserViewSet.as_view({ |
| 35 | + 'post': 'grant_default_model_level_perms', |
| 36 | + }), name='currentuser-default-perms') |
40 | 37 | re_path(r'^', include(router_api_v1.urls)),
|
41 | 38 | re_path(r'^api/v2/', include((router_api_v2.urls, URL_NAMESPACE))),
|
42 | 39 | re_path(r'^api/v2/auth/', include('kobo.apps.mfa.urls')),
|
|
0 commit comments