Здравствуйте, у меня возникла проблема при попытке запустить сервер из старого проекта Django 2.0.
это ошибка:
File "/usr/lib/python3.7/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.'
это мой urls.py
from django.conf.urls import url, include
from django.contrib import admin
from apps.sysgrub.views import LoginUser, LogoutUser
app_name = 'apps'
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^alumno/', include ('apps.alumno.urls', namespace="alumno")),
url(r'^grupo/', include ('apps.grupo.urls', namespace="grupo")),
url(r'^maestro/', include ('apps.maestro.urls', namespace="maestro")),
url(r'^rol/', include ('apps.rol.urls', namespace="rol")),
url(r'^sysgrub/', include ('apps.sysgrub.urls', namespace="sysgrub")),
url(r'^$', LoginUser),
url(r'^logout/$', LogoutUser),
]
и мои URL по приложению
urlpatterns = [
url(r'^index$', index),
url(r'^horarios$', horarios),
url(r'^listar$', Alumno_grupoList.as_view(), name='alumno_listar'),
url(r'^agregar$', AlumnoCreate.as_view(), name='add_student'),
]
Большое спасибо за ваши поздравления.