Specifying a namespace in include() without providing an app_name ' django.core.exceptions.ImproperlyConfigured

WooSung Park
from django.urls import path
from django.conf.urls import include, url #22.JUN.2018 #25.Jun.2018
from django.contrib import admin

#from bookmark.views import BookmarkLV, BookmarkDV

urlpatterns = [
        url(r'^admin/',admin.site.urls),
        url(r'^bookmark/',include('bookmark.urls', namespace='bookmark')),
        url(r'^blog/', include('blog.urls', namespace='blog')),

I need you guys help!!! This is my code. And i have a error....please help me....

'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.

Sonali Mahajan

You have to add a variable called app_name in the included urls.py module.

For example if you have this include in your project urls.py:

url(r'^bookmark/',include('bookmark.urls', namespace='bookmark'))

you have to add a variable:

app_name = 'bookmark'

just before the definition of urlpatterns variable in bookmark/urls.py file.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Specifying a namespace in include() without providing an app_name

Why do I keep getting django.core.exceptions.ImproperlyConfigured: Specifying a namespace although I added app name in urls.py

Django Installed app and ImproperlyConfigured Error: django.core.exceptions.ImproperlyConfigured

django.core.exceptions.ImproperlyConfigured

Django.core.exceptions.ImproperlyConfigured:

django.core.exceptions.ImproperlyConfigured: Field name `id` is not valid for model

Issue in django.core.exceptions.ImproperlyConfigured

django.core.exceptions.ImproperlyConfigured: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is prohibited.need

How to include urls with app_name without having to use reverse with app name in Django?

Django 2 namespace and app_name

django.core.exceptions.ImproperlyConfigured: Cannot import 'category'. Check that 'api.category.apps.CategoryConfig.name' is correct

Python | Docker | Django | django.core.exceptions.ImproperlyConfigured Error

How to fix the error for django 'django.core.exceptions.ImproperlyConfigured' with urls?

Django Celery scheduled task django.core.exceptions.ImproperlyConfigured

django.core.exceptions.ImproperlyConfigured: Django 3.0.1 is not supported

Django channels pytest testing. django.core.exceptions.ImproperlyConfigured. .

Include keyword in url.py not working without app_name(Django 2.0)

django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG

django.core.exceptions.ImproperlyConfigured: WSGI application 'application' could not be loaded

django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library

"django.core.exceptions.ImproperlyConfigured:" while doing migrations to posgreSQL

ImpropyConfiguredError about app_name when using namespace in include()

ImproperlyConfiguredError about app_name when using namespace in include()

Error in deploying Django app on Google cloud using appengine "django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY environment variable"

django.core.exceptions.ImproperlyConfigured: WSGI application '{project_name}.wsgi.application' could not be loaded; Error importing module

django.core.exceptions.ImproperlyConfigured: uses parameter name 'order.id' which isn't a valid Python identifier

( django.core.exceptions.ImproperlyConfigured: Cannot import 'apps.accounts'. Check that 'mysite.apps.accounts.apps.AccountsConfig.name' is correct

django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'app.User' that has not been installed

How to resolve "django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: foo" in Django 1.7?