プロジェクトの実行サーバーを試したとき、このエラー
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\apple\Desktop\web3start\tests\urls.py", line 8, in <module>
url(r'^', include('web3auth.urls', namespace='web3auth')),
File "C:\Users\apple\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\urls\conf.py", line 39, in include
'Specifying a namespace in include() without providing an app_name '
django.core.exceptions.ImproperlyConfigured: Specifying a namespace in include() without providing an app_name is not supported. Set the app_name attribute in
the included module, or pass a 2-tuple containing the list of patterns and app_name instead.
出てきました。
conf.py
if isinstance(urlconf_module, str):
urlconf_module = import_module(urlconf_module)
patterns = getattr(urlconf_module, 'urlpatterns', urlconf_module)
app_name = getattr(urlconf_module, 'app_name', app_name)
if namespace and not app_name:
raise ImproperlyConfigured(
'Specifying a namespace in include() without providing an app_name '
'is not supported. Set the app_name attribute in the included '
'module, or pass a 2-tuple containing the list of patterns and '
'app_name instead.',
urls.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
from django.conf.urls import url, include
urlpatterns = [
url(r'^', include('web3auth.urls', namespace='web3auth')),
]
私は何をすべきか??直接書き込む特定のコードが必要です。