Skip to content
Daniel Valverde edited this page Dec 30, 2013 · 3 revisions

Installation

To install this library as a python package just run:

sudo python setup.py install

or from pip:

sudo pip install django-shopify

Basic Usage

Once you install the library you'll get a console command called start_shopify_app. In order to create a new shopify-django app you must run:

start_shopify_app [project_name] [project_type (optional, could be 'public' and 'private', 'private' its default)]

Generated Code and Directories Structure

The command above will setup a django project with the following directories structure:

  • [project_name]:

    • settings.py
    • urls.py
    • wsgi.py
  • [project_name]_app:

    • models.py
    • tests.py
    • views
      • index.py
  • templates:

    • index * index.html
  • media:

    • js
    • css
    • img
  • manage.py


Running the server

It's as simple as running the django dev server

python manage.py runserver

Django Development

The library uses some standards described here:

urls.py

It adds django_conventions for urls routing and templates names conventions.

views

Django class based views it's being used to handle and response to http requests.

services

Read more about the shopify service here.