I assume `site.test` is set to point to localhost in your /etc/hosts file
(or the HOSTS file on Windows). Then, try http://site.test/accueil/ (notice
the trailing slash). If that doesn't work, just try
`localhost:8000/accueil/` (replace 8000 with the port you're running on, of
course) to see if all is well.


On Fri, Oct 11, 2013 at 4:19 PM, Diogene Laerce <[email protected]> wrote:

> Hi,
>
> I'd like to deploy my first "hello world" app on localhost but I can't get
> through the first attribution url even after openclassrooms tuto :
>
> I've got :
>
> app/urls.py
> urlpatterns = patterns('',
> url(r'^accueil/$', 'portal.views.home'),
> )
>
> app/portal/views.py
> from django.http import HttpResponse
> def home(request):
> text = """<h1>Bienvenue sur mon blog !</h1>
> <p>Les crêpes bretonnes ça tue des mouettes en plein vol !</p>
> """
> return HttpResponse(text)
>
> settings.py
> DEBUG = True
> ALLOWED_HOSTS = ['127.0.1.1/site.test']
> STATIC_URL = '/static/'
> STATICFILES_DIRS = (
> '/var/www/site.test/app/**static/',
> )
> ROOT_URLCONF = 'app.urls'
> WSGI_APPLICATION = 'app.wsgi.application'
> TEMPLATE_DIRS = (
> '/var/www/site.test/app/**templates'
> )
> INSTALLED_APPS = (
> .
> .
> .
> # 'django.contrib.admindocs',
> 'portal',
> )
>
>
> and then get this django error - which means that django is functional on
> the localhost I guess :
>
> Using the URLconf defined in |app.urls |, Django tried these URL patterns,
> in this order:
>
>   1. ^accueil/$
>   2. ^static\/(?P<path>.*)$
>
> The current URL, |site.test/accueil <http://site.test/accueil>|, didn't
> match any of these.
>
>
> I don't get what I am doing wrong.
>
> Thanks to help.
>
> --
> “One original thought is worth a thousand mindless quotings.”
> “Le vrai n'est pas plus sûr que le probable.”
>
>                                               Diogene Laerce
>
> --
> 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<django-users%[email protected]>
> .
> To post to this group, send email to [email protected].
> Visit this group at 
> http://groups.google.com/**group/django-users<http://groups.google.com/group/django-users>
> .
> To view this discussion on the web visit https://groups.google.com/d/**
> msgid/django-users/5257D7A6.**8060202%40yahoo.fr<https://groups.google.com/d/msgid/django-users/5257D7A6.8060202%40yahoo.fr>
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> .
>



-- 
Yati Sagade

Software Engineer at mquotient <http://www.mquotient.net/>
<http://twitter.com/yati_itay>

Twitter: @yati_itay <http://twitter.com/yati_itay> | Github:
yati-sagade<https://github.com/yati-sagade>

Organizing member of TEDx EasternMetropolitanBypass
http://www.ted.com/tedx/events/4933
https://www.facebook.com/pages/TEDx-EasternMetropolitanBypass/337763226244869

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANpY%2BHkFzkXa0qceLCjbpsQ6V%3D2Yqyk%2BWhz43yVDJW%3D1rZHfEg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to