I'm not sure, I'm quite new in django, but I think you need to include dashboard in INSTALLED_APPS and looking your urls.py in order to see hello view you need to type http://127.0.0.1:8000/john/hello

On 23/04/11 21:57, Honza Javorek wrote:
Hello guys,

I have searched to solve this for a whole evening without any results.
I have read all known "my first app in django" tutorials, but my test
app just isn't working.

I have project called "john". In it's directory I have app package
"dashboard" containing init, models, tests and views. Moreover, in
project directory "john" are init, manage, settings and urls files. My
urls.py:

from django.conf.urls.defaults import patterns, include, url
urlpatterns = patterns('john',
     (r'^$', 'dashboard.views.hello'),
     (r'^hello/$', 'dashboard.views.hello'),
)

My dashboard/views.py:

from datetime import datetime
from django.http import HttpResponse
def hello(request):
     return HttpResponse(datetime.now().strftime('%H:%M:%S'))

My settings.py (not complete, I copied only apparently important
parts):

ROOT_URLCONF = 'emil.urls'
INSTALLED_APPS = (
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.sites',
     'django.contrib.messages',
     'django.contrib.staticfiles',
)

Now what is the problem. If I go to my "john" directory and I launch
server, it looks like this:

.../john$ python manage.py runserver
Validating models...
0 errors found
Django version 1.3, using settings 'john.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[23/Apr/2011 14:40:31] "GET / HTTP/1.1" 200 2047
[23/Apr/2011 14:40:38] "GET / HTTP/1.1" 200 2047

but if I go to the browser and I type http://127.0.0.1:8000/ or
http://127.0.0.1:8000/hello, it shows me Django welcome screen (It
worked! ... you haven't configured any URLs.). According to it's text
I assume it completely ignores what I have configured in urls.py. I
can't get over this screen, I haven't seen any 404 yet or anything
else. Welcome screen is the most far place I managed to get in half of
a day spent with Django :(

Thanks for any help,

Honza Javorek


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to