diff --git a/WikiENS/settings/common.py b/WikiENS/settings/common.py index 5e78470..840f5e1 100644 --- a/WikiENS/settings/common.py +++ b/WikiENS/settings/common.py @@ -7,9 +7,12 @@ from django.contrib.messages import constants as messages try: from . import secret except ImportError: + import pathlib + dir_path = pathlib.Path(__file__).parent.resolve().as_posix() raise ImportError( "The secret.py file is missing.\n" - "For a development environment, simply copy secret_example.py" + "For a development environment, simply copy secret_example.py:\n" + f" $ cp {dir_path}/{{secret_example,secret}}.py" ) diff --git a/WikiENS/urls.py b/WikiENS/urls.py index ceafd69..2ff4476 100644 --- a/WikiENS/urls.py +++ b/WikiENS/urls.py @@ -1,23 +1,22 @@ -from django.conf.urls import url, include +from django.conf.urls import include +from django.urls import re_path from django.contrib import admin from allauth_ens.views import capture_login, capture_logout -from wiki.urls import get_pattern as get_wiki_pattern -from django_nyt.urls import get_pattern as get_nyt_pattern allauth_urls = [ # Catch login/logout views of admin site. - url(r'^_admin/login/$', capture_login), - url(r'^_admin/logout/$', capture_logout), + re_path(r'^_admin/login/$', capture_login), + re_path(r'^_admin/logout/$', capture_logout), # Allauth urls. - url(r'^_profil/', include('allauth.urls')), + re_path(r'^_profil/', include('allauth.urls')), ] urlpatterns = allauth_urls + [ - url(r'^_admin/', admin.site.urls), - url(r'^notifications/', get_nyt_pattern()), - url(r'^_groups/', include("wiki_groups.urls")), - url(r'', get_wiki_pattern()), + re_path(r'^_admin/', admin.site.urls), + re_path(r'^notifications/', include('django_nyt.urls')), + re_path(r'^_groups/', include("wiki_groups.urls")), + re_path(r'', include('wiki.urls')), ] # TODO add MEDIA_ROOT diff --git a/wiki_groups/__init__.py b/wiki_groups/__init__.py deleted file mode 100644 index 8588003..0000000 --- a/wiki_groups/__init__.py +++ /dev/null @@ -1 +0,0 @@ -default_app_config = "wiki_groups.apps.WikiGroupsConfig"