You are previewing Django 1.2 e-commerce.
O'Reilly logo
Django 1.2 e-commerce

Book Description

Build powerful e-commerce applications using Django, a leading Python web framework

  • 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

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

Table of Contents

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