Django 1.2 E-commerce


Django 1.2 E-commerce
eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
$20.39
save 15%!
Print + free eBook + free PacktLib access to the book: $63.98    Print cover: $39.99
$39.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters
  • Build all the components for an e-commerce store, from product catalog to shopping cart to checkout processor
  • Build a high quality e-commerce site quickly and start making money
  • All the examples in the book will run smoothly for all the versions of Django 1.x
  • Follow a tutorial format to build many components from scratch while leveraging the open-source community to enhance functionality

Book Details

Language : English
Paperback : 244 pages [ 235mm x 191mm ]
Release Date : May 2010
ISBN : 1847197000
ISBN 13 : 9781847197009
Author(s) : Jesse Legg
Topics and Technologies : All Books, CMS and eCommerce, e-Commerce, Open Source, Web Development


Table of Contents

Preface
Chapter 1: Django and e-commerce Development
Chapter 2: Setting Up Shop in 30 Minutes
Chapter 3: Handling Customers and Their Orders
Chapter 4: Building Payment Processors
Chapter 5: From Payment to Porch: An Order Pipeline
Chapter 6: Searching the Product Catalog
Chapter 7: Data and Report Generation
Chapter 8: Creating Rich, Interactive UIs
Chapter 9: Selling Digital Goods
Chapter 10: Deployment and Maintenance Strategies
Index
  • Chapter 1: Django and e-commerce Development
    • 21st Century web development
    • Django as an e-commerce platform
    • The model-template-view pattern
    • Payment processors and shopping carts
    • Exploring the Django framework
    • What's in a Django app?
    • Solving small problems
    • Reusable apps
    • Organizing Django projects
    • Preparing the development environment
    • Django 1.2
    • Summary
  • Chapter 2: Setting Up Shop in 30 Minutes
    • Designing a product catalog
    • Creating the product model
    • Categorizing products
    • Adding additional product details
    • Viewing the product catalog
    • Designing simple product HTML templates
    • Getting paid: A quick payment integration
    • Summary
  • Chapter 3: Handling Customers and Their Orders
    • Django's auth module
    • Django users and profiles
    • Creating accounts with django-registration
    • Extending the user model with django-profiles
    • The customer profile
      • Taking orders: Models
      • Taking orders: Views
    • Shopping carts and Django sessions
    • Checking out: Take two
    • Super-simple customer reviews
    • Summary
  • Chapter 4: Building Payment Processors
    • Building a generic payment processor app
      • Class-based views
      • Implementing a checkout view base class
      • Saving the order
    • A Google Checkout class
    • An Amazon Checkout class
      • The Amazon Callback view
    • PayPal and other payment processors
    • Summary
  • Chapter 5: From Payment to Porch: An Order Pipeline
    • Adding status information to orders
      • SSL and security considerations
    • Order processing overview
    • Notification API
    • Order Processing API
    • Calculating shipping charges
    • A simple CRM tool
    • Other payment services
    • Summary
  • Chapter 6: Searching the Product Catalog
    • Stupidly simple search
    • MySQL simple index searches
    • Search engines overview
      • Sphinx
      • Solr
      • Whoosh
      • Xapian
      • Haystack
    • Configuring the Sphinx search engine
      • Defining the data source
      • Defining the indexes
      • Building and testing our index
    • Searching Sphinx from Python
    • Simplifying searching with django-sphinx
    • The Whoosh search engine
    • Haystack search for Django
      • Haystack searches
      • Haystack for real-time search
    • Xapian/Djapian
      • Searching indexes
    • Advanced Xapian features
    • Summary
  • Chapter 7: Data and Report Generation
    • Exposing data and APIs
      • Django-piston: A mini-framework for data APIs
    • Django's syndication framework
    • Django sitemaps
    • ReportLab: Generating PDF reports from Python
    • Creating PDF views
    • Salesforce.com integration
      • Salesforce Object Query Language
    • Practical use-cases
    • Summary
  • Chapter 8: Creating Rich, Interactive UIs
    • JavaScript: A quick overview
      • JavaScript Object Notation
      • Event-driven programming
      • JavaScript frameworks: YUI
      • JavaScript frameworks: jQuery
      • Graceful degradation and progressive enhancement
    • Creating product ratings
      • Design aside: User experience and AJAX
      • Product rating view
      • Constructing the template
      • Writing the JavaScript
      • Debugging JavaScript
    • Summary
  • Chapter 9: Selling Digital Goods
    • Subscription sales
    • Digital goods sales
    • Content storage and bandwidth
    • Django and Amazon S3
      • Query string request authentication
      • About Amazon AWS services requests
    • Amazon FPS for digital goods
      • Prepaid payments
        • Obtaining a prepaid token
        • Funding the prepaid token
        • Prepaid pay requests
        • Checking prepaid balances
      • Postpaid payments
        • Obtaining a postpaid token
        • Postpaid pay requets
        • Settling debts
        • Writing off debt
        • Getting debt balances
      • Django integration
        • View implementation
    • Google Checkout Digital Delivery
    • Summary
  • Chapter 10: Deployment and Maintenance Strategies
    • Apache and mod_wsgi
      • A Django WSGI script
      • An example httpd.conf
      • Configuring daemon mode
      • Thread-safety
    • Automating deployment with Fabric
      • Writing a Fabfile
      • Using the fab tool
      • Fabric for production deployments
    • zc.buildout
      • Buildout bootstraps
      • buildout.cfg: The buildout section
      • Writing the setup script
      • buildout.cfg: The parts sections
    • Virtualenv
      • Creating an environment
      • Working in the environment
      • Virtualenvwrapper
    • Distutils and module distributions
      • Installing distributions
      • Distutils metadata and PyPI
      • Easy_install
    • Pip
    • Summary

Jesse Legg

Jesse Legg is a web engineer and writer based in Somerville, Massachusetts. He has built Python and Django tools in environments ranging from web startups to higher education and has contributed several applications to the Django open source community. He has been working in the technology industry for almost a decade and has developed web applications in a range of technologies, including Python, Django, PHP, and Javascript. He writes an occasional blog at jesselegg.com.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


Errata

- 9 submitted: last submission 02 Aug 2013

Errata type: Others | Page number: 18 | Errata date: 07 Sep 2011

missing space: run django-admin.pysyncdb -> run django-admin.py syncdb

 

Errata type: Typo | Page number: 22 |

The line "...products: cranberry drinks, food, and deserts." should read "...products: cranberry drinks, food, and desserts." instead.

 

Errata type: Code | Page number: 22 |

The line "name = models.CharField(max_length=255" at the code example should read "name = models.CharField(max_length=255)" instead.


Errata type: Code | Page number: 44 |

The line "classCustomerAddress(models.Model):" should read "class CustomerAddress(models.Model):" instead.

 

Errata type: Code | Page number: 46 |

The line "classStatusCode(models.Model):" should read "class StatusCode(models.Model):" instead.

 

Errata type: Code | Page number: 48 |

The line "classProductInOrder(models.Model):" should read "class ProductInOrder(models.Model):" instead.

 

Errata type: Code | Page number: 48 |

The line "defshopping_cart(..." should read "def shopping_cart(..." instead.

 

Errata type: Code | Page number: 73 |

The line "transaction = AmazonTransacion.objects.get(order=order)" should read "transaction = AmazonTransaction.objects.get(order=order)" instead.

 

Errata type: Code | Page number: 78 |

The line "status_code=get_status_code('NEW') for item in cart:" should read "status_code=get_status_code('NEW')" instead. The for loop should be separated from the line.

 

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Django 1.2 E-commerce +    SproutCore Web Application Development =
50% Off
the second eBook
Price for both: $34.95

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Leverage Django's strengths to build powerful applications quickly
  • Employ Django Models and Views to create a product catalog
  • Build a flexible categorization system to organize products
  • Create XML templates for selling products through the Google Checkout API
  • Employ advanced Django techniques like class-based and generic views, pluggable resources, and reusable applications
  • Simplify the development process using community projects like django-registration and django-profiles
  • Create fully-featured search engines to index and categorize a product catalog
  • Create integrations with leading web services and technologies like JSON, Salesforce, Amazon Aggregated Payments, and jQuery
  • Explore advanced Django and Python design concepts like class-based generic views and pluggable backends
  • Enhance your e-commerce site's UI with Javascript-Django integration
  • Utilize Django's storage backend to support content storage on Amazon S3
  • Sell digital goods and media using Amazon's FPS micropayments service

In Detail

Django is a high-level Python web framework that was developed by a fast-moving online-news operation to meet the stringent twin challenges of newsroom deadlines and the needs of web developers. It provides an excellent basis to build e-commerce websites because it can be deployed fast and it responds quickly to changes due to its ability to handle content problems. Django with its proven strengths is all you need to build powerful e-commerce applications with a competitive edge.

This book explores how the Django web framework and its related technologies can power the next leap forward for e-commerce and business on the Web. It shows you how to build real-world applications using this rapid and powerful development tool.

The book will enable you to build a high quality e-commerce site quickly and start making money. It starts with the ambitious task of using Django to build a functional e-commerce store in less than 30 minutes, and then proceeds to enhance this design through the rest of the book. The book covers the basics of an e-commerce platform like product catalogs, shopping carts, and payment processing. By the end of the book, you will be able to enhance the application by adding a fully-functional search engine, generating PDF-based reports, adding interactivity to the user-interface, selling digital goods with micropayments, and managing deployment and maintenance tasks.

Explore Django and related web technologies to learn how they can power the next leap forward in e-commerce and business on the Web

Approach

Packed with code examples and configuration hints for related web technologies, the book helps you add a new feature to your store in each chapter. It also provides additional documentation and comments for popular web APIs.

Who this book is for

If you are a Django developer and wish to build an e-commerce application, then this book is for you. You need to be familiar with the basics of developing in Django.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software