Friday, October 11, 2013

deploy ?

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.
To post to this group, send email to django-users@googlegroups.com.
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/5257D7A6.8060202%40yahoo.fr.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment