Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

519
Visualizações
(urls.W005) URL namespace 'LnkIn' isn't unique.

Hi I'm getting this error when doing my migrations or using the python manage.py runserver command.

(urls.W005) URL namespace 'LnkIn' isn't unique.You may not be able to reverse all URLs in this namespace. 

This is how I have my urls.py inside my app directory (LnkIn).

from django.conf.urls import url
from . import views

app_name = 'LnkdIn'

urlpatterns = [
    url(r'^$', views.index, name='index'),
    url(r'^register/$', views.register, name='register'),
    url(r'^login_user/$', views.login_user, name='login_user'),
    url(r'^logout_user/$', views.logout_user, name='logout_user'),
    url(r'^(?P<user_id>[0-9]+)/$', views.profile, name='profile'),
    url(r'^(?P<song_id>[0-9]+)/favorite/$', views.favorite, name='favorite'),
    url(r'^trabajos/$', views.trabajos, name='trabajos'),
    url(r'^crear_oferta/$', views.crear_oferta, name='crear_oferta'),
    url(r'^(?P<user_id>[0-9]+)/create_trabajo/$', views.create_trabajo, name='create_trabajo'),
    url(r'^(?P<user_id>[0-9]+)/crear_amistad/$', views.crear_amistad, name='crear_amistad'),
    url(r'^(?P<user_id>[0-9]+)/delete_trabajo/(?P<trabajo_id>[0-9]+)/$', views.delete_trabajo, name='delete_trabajo'),
    url(r'^(?P<album_id>[0-9]+)/favorite_album/$', views.favorite_album, name='favorite_album'),
    url(r'^(?P<album_id>[0-9]+)/delete_album/$', views.delete_album, name='delete_album'),
]

And this is how I have my urls.py in my main directory.

from django.conf.urls import include, url
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^LnkdIn/', include('LnkdIn.urls')),
    url(r'^', include('LnkdIn.urls')),
]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

I really have no idea what could I've done wrong. I checked in my views and in my templates and everything seems to be fine, I don't seem to be having any typo on my urls. I've search but haven't find this error, I've seem similars one and they suggest to check not having mistakes in the urls.

I'm using Python 2.7 and Django 1.10.

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You are importing LnkdIn.urls twice to your application urlpatterns.

You should only do it once, so choose either one from the section below

url(r'^LnkdIn/', include('LnkdIn.urls')),

or

url(r'^', include('LnkdIn.urls')),
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda