First View

15 views
Skip to first unread message

Tristan Demot

unread,
May 21, 2018, 4:55:04 PM5/21/18
to Django users
Hello,

I use tutorial 1.11

beaumarche (startproject)

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


urlpatterns
= [

    url
(r'^boutique/', include('boutique.urls')) ,
    url
(r'^admin/', admin.site.urls),
]


boutique
(app)


urls
.py


from django.conf.urls import url


from . import views


urlpatterns
= [
      url
(r'^$', views.index, name='index'),
]




views
.py
from django.http import HttpResponse


def index(request):
     
return HttpResponse ("Hello, world...")


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


1.^boutique/
2^admin/


The empty path didn't match any of these

An idea maybe

Thanks

Daniel Germano Travieso

unread,
May 21, 2018, 5:56:34 PM5/21/18
to django...@googlegroups.com
Hello!

As you configured, the available url patterns you have on your project are: "<ip/domain>/admin/" and "<ip/domain>/boutique/"... And as you request states, you are trying to access the path "<ip/domain>/".. So django didn't find any matching url pattern for that.

To access the view you are intended to access, you should access "<ip/domain>/boutique/".

To advance further I recommend you to check the documentation on URL patterns!

Hope it helps.

[]'s
Daniel Germano Travieso
Engenharia da Computação Turma: 013
Unicamp

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5431a0c8-1365-4a73-8026-25c57c2f775b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Journal-Immo

unread,
May 22, 2018, 4:09:18 PM5/22/18
to django...@googlegroups.com

Hello

First : thanks for your Help. It's very easy, but I need 4 hours...to understand... don't panic :-!

Have a good day
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

For more options, visit https://groups.google.com/d/optout.

--
Reply all
Reply to author
Forward
0 new messages