Problèmes de urls django

Fermé
ciranox Messages postés 387 Date d'inscription vendredi 11 juillet 2008 Statut Membre Dernière intervention 28 février 2016 - 25 mai 2013 à 19:29
nar6du14 Messages postés 459 Date d'inscription dimanche 27 décembre 2009 Statut Membre Dernière intervention 7 décembre 2013 - 27 juin 2013 à 04:28
Salut,

je suis en train de suivre le tuto sur l'installation de django, malheureusement je suis bloqué à cet étape :

https://openclassrooms.com/fr/courses

pourtant j'ai suivie toutes les instructions mais ça ne marche pas. voici le message d'erreur que j'ai :
Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/

Using the URLconf defined in escort_service.urls, Django tried these URL patterns, in this order:

^accueil/

The current URL, , didn't match any of these.

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.

et la voici comment j'ai organisé mes deux fichiers urls.py

premier fichier:

from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
url(r'^accueil/', include('site_escort.urls'))

# Examples:
# url(r'^', 'escort_service.views.home', name='home'),
# url(r'^escort_service/', include('escort_service.foo.urls')),

# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
# url(r'^admin/', include(admin.site.urls)),

deuxième fichier :

from django.conf.urls import patterns, url

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()


urlpatterns = patterns('site_escort.views',
url(r'^accueil/$', 'index'),



# Examples:
# url(r'^$', 'escort_service.views.home', name='home'),
# url(r'^escort_service/', include('escort_service.foo.urls')),

# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
# url(r'^admin/', include(admin.site.urls)),
)

Merci d'avance

1 réponse

nar6du14 Messages postés 459 Date d'inscription dimanche 27 décembre 2009 Statut Membre Dernière intervention 7 décembre 2013 64
27 juin 2013 à 04:28
prends la doc sur le site de django c'est mieux, apprends avec la doc elle plus consistante
0