https://static.djangoproject.com/img/logos/django-logo-negative.png

WARNINGS (URLs.W005) URL namespace ‘admin’ isn’t unique. You may not be able to reverse all URLs in this namespace

Let’s jump into this minor issue you face while running Django migrations. The issue also has a quick fix. The issue is encountered when we type the following command in your terminal:

python manage.py makemigrations

As an error message something like below will be displayed:

System check identified some issues:
WARNINGS:?:(urls.W005) URL namespace 'admin' isn't unique.
You may not be able to reverse all URLs in this namespace

[DJango makemigrations] URL namespace ‘admin’ isn’t unique

Now go to your Django Project’s major URL (urls.py). The issue has occurred because you have two paths defined for URLs in your URL patterns like below:

urlpatterns = [
    path('admin/', admin.site.urls),    # Django admin route
    path('admin' , admin.site.urls),
]

Comment out or remove one of the routes from your urlpatterns and than run the makemirgations command again. The warnings won’t be displayed again