Django dando 404 algunas URL

i don't know what i'm doing wrong but, im getting 404, i'm having some urls with 404, SITE_ID is fine.

Por ejemplo:

http://domain.com/industrias/  -> is giving 404 (within ending /)

URLs.py

urlpatterns = patterns('',
    ....
    (r'^industrias/$',allAreas),
    (r'^industria/(?P<slug>[-\w]+)/$',getArea),
    (r'^robots.txt$',TemplateView.as_view(template_name= 'robots.txt')),
    (r'', include('django.contrib.flatpages.urls')),
)

Editado

sorry i was with this: (r'^(?P<username>[-\w]+)/$', Perfil_view), bofore my others url, and there was the error

What i'm doing wrong? Thanks

preguntado el 08 de noviembre de 11 a las 18:11

Tienes raise Http404 anywhere in your views? -

sí hay todos links returning 404, or only /industrias/? Test to make sure your urlpatterns are set up correctly by running django shell, then from django.core.urlresolvers import resolve y entonces resolve('/industrias/'). -

@IvanKharlamov i dont have raise Http404 on this views JordanReiter just the /industrias/ is returning 404 with ending /, i will try your tip -

Can you post your view for us? -

Maybe adding "?" symbol in url mask resolve your problem: (r'^industrias/?$',allAreas), -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.