a little and fast reusable shop application ajax based
Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
e_commerce
README

README

django-ajax-shop is a little and fast reusable shop application ajax based.
This application is to be understood as a base, not to be used as it is.
The files that need to be changed are ajax.py and templates/first.html.
The template inherit a file called base.html, which must have a {% block content%} {% endblock%}

View an example on: http://acquista.dolcericordo.it

Functionality:
_ management product in admin with thumbnails and put in the foreground;
_ discounts for selected products with automatic price;
_ very fast ajax interface;
_ managing user friendly shopping cart;
_ proof of payment via paypal.

Requirements:

django >= 1.3
django-dajax
django-dajaxice


Configuration:

in settings.py:

optionals:
SESSION_COOKIE_AGE = 3600
SESSION_EXPIRE_AT_BROWSER_CLOSE = True

required:  #for the cart objects
SESSION_SAVE_EVERY_REQUEST = True

INSTALLED_APPS += (
    'dajaxice',
    'dajax',
    ...
    'e_commerce',
    ...
)

DAJAXICE_MEDIA_PREFIX="dajaxice"
PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))

# TODO for payment paypal configuration
RESOURCES_DIR = ''
PAYPAL_PDT_TOKEN = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
PAYPAL_EMAIL = 'XXXXXXXXXXX'
PAYPAL_RETURN_URL = 'XXXXXXXXXXXXXXX'

# sandbox
PAYPAL_URL = 'https://www.sandbox.paypal.com/au/cgi-bin/webscr'
PAYPAL_PDT_URL = 'https://www.sandbox.paypal.com/au/cgi-bin/webscr'


##############################
in urls.py:

from dajaxice.core import dajaxice_autodiscover
dajaxice_autodiscover()

urlpatterns = ...
...
    (r'^', include('e_commerce.urls')),
    (r'^%s/' % settings.DAJAXICE_MEDIA_PREFIX, include('dajaxice.urls')),
...


In the bottom of ajax.py there is a draft using paypal; is not necessary, but it is only an idea of a method of payment.

As a method of research of products were used tags, but it is not to exclude a new type of model for various types: sizes, sex, brand etc...

#TODO
_ greater configurability;
_ other models to select objects;