Giter VIP home page Giter VIP logo

bookstore's Introduction

Bookstore

A web bookstore implemention built for django.

Setup

  • Clone the latest copy from github into your django project. Don't do this yet unless you are masochistic, because it's not usable.

  • Add the bookstore to your INSTALLED_APPS in settings.py:

      'bookstore',
    
  • Add a url mapping to your project's urls.py file (an empty prefix instead of bookstore/ will work, but put it last):

      (r'^bookstore/$', include('bookstore.urls')),
    
  • If you don't have them already, consider adding error handlers to your project's urls.py file as well:

      handler403 = 'bookstore.views.page_access_denied'
      handler404 = 'bookstore.views.page_not_found'
      handler500 = 'bookstore.views.page_server_error'
    
  • Make sure you have a MEDIA_ROOT and MEDIA_URL set up in your settings.py:

      MEDIA_ROOT = '/home/www/mydjango-project/media/'
    
  • Consider adding openid support. This requires python-openid and django_openid_auth, with additional urls and settings. The quick and dirty options follow; see their installation instructions for full details.

      # in settings
      INSTALLED_APPS += 'django_openid_auth',
      
      AUTHENTICATION_BACKENDS = (
          'django_openid_auth.auth.OpenIDBackend',
          'django.contrib.auth.backends.ModelBackend',
      )
      
      OPENID_CREATE_USERS = True
      OPENID_UPDATE_DETAILS_FROM_SREG = True
      OPENID_UPDATE_DETAILS_FROM_AX = True
      LOGIN_URL = '/bookstore/signin/' # note, use the same prefix as for bookstore's url mapping
      LOGIN_REDIRECT_URL = '/'
      # OPENID_USE_AS_ADMIN_LOGIN = True # optional; use only once an openid has admin access
    
  • Sync the database:

      % manage.py syncdb
    
  • Provide css and images at {{MEDIA_URL}}bookstore/style. The files include site.css, site_ie6.css, banner.jpg, and texel.png. There's gotta be a better way for me to provide base versions of these, though...

Administration

Administration is easiest through the django admin interface. Start by adding an Author, a Genre, and a Title.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.