skip to navigation
skip to content

Not Logged In

django-oscar-stores 0.8

An extension for Oscar to include stores

Oscar stores

.. image::

.. image::
:alt: Coverage

This is an extension for django-oscar_ that adds support for stores. It

.. _django-oscar:

* A store locator page using Google maps for geocoding. It also supports using
the browser's location to show the nearest stores.
* Store detail pages including opening hours
* Store groups
* A dashboard for managing stores

It's highly extensible and can be used as a foundation for building sophisticated
stores functionality within Oscar sites.


Customer-facing pages:

.. image::

.. image::

Dashboard pages:

.. image::

.. image::


GeoDjango_ is used so a spatial database is required. We recommend PostGIS.
Django's docs include some `installation instructions`_ although it is renowned
for being tricky.

.. _GeoDjango:
.. _`installation instructions`:

Spatialite is another option although it can be tricky to set up. On Ubuntu,
you can do the following:

.. code:: bash

$ sudo apt-get install spatialite-bin libspatialite3 libgeos++-dev libgdal-dev libproj0

The ``pysqlite`` python package is also required although it doesn't support C
extensions by default. To work-around this, there are two options:

1. Download the package, edit ``setup.cfg`` to enable C extensions and install:

.. code:: bash

$ pip install pysqlite --no-install
$ vim $VIRTUAL_ENV/build/pysqlite/setup.cfg
$ pip install pysqlite

2. Use a custom branch:

.. code:: bash

$ pip install git+git://

.. _`pysqlite`:


First, ensure you are using a spatial database and have django-oscar installed.

Install package:

.. code:: bash
$ pip install django-oscar-stores

then add ``stores`` to ``INSTALLED_APPS``. Now update your root ````:

.. code:: python

from import shop
from import application as stores_app
from import application as dashboard_app

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)),

# adds internationalization URLs
(r'^jsi18n/$', 'django.views.i18n.javascript_catalog'),

You also need to download the `GeoIP data files`_ and set ``GEOIP_PATH`` to point to the
appropriate directory.

.. _`GeoIP data files`:


* ``STORES_GEOGRAPHIC_SRID`` (default: ``3577``). This is used for distance
calculations. See for more details.

* ``STORES_GEODETIC_SRID`` (default: ``4326``).

* ``STORES_MAX_SEARCH_DISTANCE`` (default: None). This filters stores
in queries by distance. Units can be set using distance object:

.. code:: python

from django.contrib.gis.measure import D
# Maximal distance of 150 miles
# Maximal distance of 150 kilometers


There is sandbox site within the repo which is a sample Oscar project that uses
the stores extension. Set this up with:

.. code:: bash

$ make sandbox

then fetch the GeoIP files with:

.. code:: bash

$ make geoip

This loads a fixture which provides a superuser to test the dashboard with::

username: superuser
password: testing

Run tests with:

.. code:: bash

$ ./


``django-oscar-stores`` is released under the permissive `New BSD license`_.

.. _`New BSD license`:  
File Type Py Version Uploaded on Size
django-oscar-stores-0.8.tar.gz (md5) Source 2015-01-22 27KB
  • Downloads (All Versions):
  • 65 downloads in the last day
  • 436 downloads in the last week
  • 1534 downloads in the last month