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