Problèmes de urls django
ciranox
Messages postés
436
Statut
Membre
-
nar6du14 Messages postés 506 Statut Membre -
nar6du14 Messages postés 506 Statut Membre -
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
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
A voir également:
- Problèmes de urls django
- Urls - Guide
- Reducteur de lien url - Guide
- Le fichier pdf à télécharger est disponible avec le même nom sur le site de livreval. mais vous ne le trouverez pas directement avec un moteur de recherche… quelle est l’url de ce fichier pdf sur le site web de livreval ? - Forum PDF
- Comment trouver l'url de mon serveur ✓ - Forum Debian
- O2switch django - Forum Python