Hey there! Join Readernaut.

Readernaut is a free service that lets you write reviews, keep notes, make reading lists, track your reading progress and find your friends.

Join now!

Notes

In the search app you add Keywords to the Flatpage model as inlines. If you are using the latest django trunk, the code in the book will not work with NFA.

I used this code:

from django.contrib import admin
from django.contrib.flatpages.models import FlatPage
from cms.search.models import SearchKeyword

class SearchKeywordInline(admin.StackedInline):
model = SearchKeyword
extra = 3

class SearchKeywordAdmin(admin.ModelAdmin):
    pass

class FlatPageAdmin(admin.ModelAdmin):
inlines = [
    SearchKeywordInline
]

admin.site.unregister(FlatPage)
admin.site.register(FlatPage, FlatPageAdmin)
admin.site.register(SearchKeyword, SearchKeywordAdmin)

googlegroups.com/msg55668.html">Credit goes to this thread.

I had some issues getting Akismet working.

Instead of this line:

akismet_api = Akismet(key=settings.AKISMET_API_KEY, blog_url="http:/%s/" % Site.objects.get_current().domain)

I had to use a special method after the object instance was called:

akismet_api = Akismet()
akismet_api.setAPIKey(key=settings.AKISMET_API_KEY, blog_url='http://%s/' % Site.objects.get_current().domain)

Setting the API key and blog_url this way allowed verify_key() to return True.

Description edit

Build a django content management system, blog, and social networking site with James Bennett as he introduces the popular Django framework. You’ll work through the development of each project, implementing and running the applications while learning new features along the way. Web frameworks are playing a major role in the creation of today’s most compelling web applications, because they automate many of the tedious tasks, allowing developers to instead focus on providing users with creative and powerful features. Python developers have been particularly fortunate in this area, having been able to take advantage of Django, a very popular open source web framework whose stated goal is to “make it easier to build better web applications more quickly with less code.” Practical Django Projects is the first book to introduce this popular framework by way of a series of real–world projects. What you’ll learn Capitalize upon Django’s well–defined framework architecture to build web applications faster than ever before. Learn by doing by working through the creation of three real–world projects, including a content management system, blog, and social networking site. Build user–friendly web sites with well–structured URLs, session tracking, and syndication options. Let Django handle tedious tasks such as database interaction while you focus on building compelling applications. Who is this book for? Web developers seeking to use the powerful Django framework to build powerful web sites.

Cover

Rating

  • Hate
  • Dislike
  • Like
  • Really like
  • Love

Reader tags: backend, code, django, howto, instructional, learning, programming, python, web, web development

Additional information