- [![Build Status](https://travis-ci.org/elbaschid/django-oscar-stores.png)]
- (https://travis-ci.org/elbaschid/django-oscar-stores)
NOTE: This project is currently a work in progress. It works for the most part but there's most likely unfixed issues in there. If you feel the need to try it out, use with care. Feedback welcome :)
This package is an extension to django-oscar that provides an interface to add and update store location and group them together. An address, a geographical location and an arbitrary number of opening times can be specified for each store location. Creating and editting of stores is done in the dashboard and requires the corresponding permission.
All stores are diplayed on the website in an overview map followed by a listing of each store ordered by store groups. For each store the address and opening times are displayed and a link to an individual store page is provided that shows additional information: such as a picture and a description.
django-oscar-store
is using geodjango which is part of the
regular Django installation but has additional installation
requirements for a GIS-enabled database. GIS extensions are
available for all the database backends shipped with Django (with
some limitations) for more details on setting them up please
refer to the geodjango's installation guide.
Setting up django-oscar-stores
with Oscar is fairly simple and
straight forward. If you don't have an Oscar project up and running
please refer to its documentation to set it up. With your Oscar
project ready to go, you can install django-oscar-stores
simply
by running:
pip install django-oscar-stores
Now that you have the stores app installed, all you need to do
add it to your INSTALLED_APPS
settings:
INSTALLED_APPS = [ .... 'stores', .... ]
and update your urls.py
to be able to access the stores section
in the dashboard and see the overview and detail pages for stores. A
sample configuration (as used in the sandbox) might look similar to
this:
urlpatterns = patterns('', # basic configuration for Oscar url(r'', include(shop.urls)), # adds URLs for the dashboard store manager url(r'^dashboard/stores/', include(dashboard_app.urls)), # adds URLs for overview and detail pages url(r'^stores/', include(stores_app.urls)), )
And that's all you need to do. Running the server of your Oscar project, you should now have access to the store manager in the dashboard as well as a overview page displayed to your customers.
I am using spatialite for local development and found the install instructions on geodjango a bit too much as most of the required libaries come packed for Ubuntu. In general, all you have to do to setup spatialite is run:
$ sudo apt-get install spatialite-bin libspatialite3 libgeos++-dev libgdal-dev libproj0
I am assuming that you want to setup the actual python package
pysqlite in virtualenv
instead of installing globally. This
is it a bit tricky because pysqlite has extension support
disabled by default (installing through pip). One way is to download
the source, enable the extension support and install it manually.
The nicer solution is to use a pysqlite clone that has the support
enabled by default and can be installed from github using pip. You
can do it by either installing:
$ pip install git+git://github.com/tinio/pysqlite.git@extension-enabled#egg=pysqlite
Or by installing all the development-specific requirements for
django-oscar-stores
in the requirements.txt
file in the
project root:
$ pip install -r requirements.txt
django-oscar-stores
is released under the permissive New BSD license.