How to configure BaseURL in Django4?
I'm new to
django and trying to set a
django4. I came upon How to set base URL in Django of which the solution is:
from django.conf.urls import include, url from . import views urlpatterns = [ url(r'^someuri/', include([ url(r'^admin/', include(admin.site.urls) ), url(r'^other/$', views.other) ])), ]
but this import statement:
from django.conf.urls import url
Cannot find reference 'url' in '__init__.py'
What am I doing wrong?
from django.urls import include, path from . import views urlpatterns = [ path( "someuri/", include( [ path("admin/", include(admin.site.urls)), path("other/", views.other), ] ), ), ]