Hi all,
I am reading through the Practical Django Projects 2nd Edition book
and i am now on the weblog entries_index part (page 84) where im
trying to view the weblog entry index but I get an error No FlatPage
matches the given query.
I followed exactly what's written in the book.
Please help, I'm new to Django and Python:
Here's my views.py
from django.shortcuts import render_to_response
from coltrane.models import Entry
def entries_index(request):
return render_to_response('coltrane/entry_index.html',
{ 'entry_list': Entry.objects.all() })
urls.py
from django.conf.urls.defaults import *
from coltrane.models import Entry
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
(r'^tiny_mce/(?P<path>.*)$', 'django.views.static.serve',
{ 'document_root': '/home/bernard/Django/cms/
tiny_mce/' }),
(r'^search/$', 'cms.search.views.search'),
(r'', include('django.contrib.flatpages.urls')),
(r'^weblog/$', 'coltrane.views.entries_index'), s
)
Thank you!!!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.