Skip to content

Latest commit

 

History

History
123 lines (87 loc) · 3.8 KB

README.md

File metadata and controls

123 lines (87 loc) · 3.8 KB

Shopify Django App Example

This project makes it easy to get a Shopify app up and running with Django and the Python Shopify API.

This project contains this example Shopify app, which simply displays basic information about the shop's products and orders. This project contains two django apps, shopify_app which handles authentication (meant to be reusable) and home which contains the example code to demonstrate how to use the API (meant to be modified or replaced to create your Shopify App).

Requirements

If you don't have an API key yet, create a Shopify Partner account and create an app. You can also create test shops once you're logged in as a partner.

When you create your app in the Shopify Partner Account, set the return URL to http://localhost:8000/login/finalize

Regular Django Application

  1. Obtain your applications API Key and Shared Secret, and modify shopify_settings.py to use these values.

  2. Install the pre-requisites:

    pip install Django ShopifyAPI

    or

    easy_install Django ShopifyAPI
  3. Create the database

    python manage.py syncdb
  4. Start the server

    python manage.py runserver
  5. Visit http://localhost:8000 to view the example.

Google App Engine

  1. Download and unzip the pre-configured zip file for App Engine.

    Applications for the App Engine need to be self-contained, so the required libraries are included in the zip file along with the projects source code.

    To migrate an existing project to App Engine, just copy the following directories from zip file to your projects root directory:

    Or follow the links to download the source code for any of the projects, and run python setup.py build in the projects root directory, then move build/lib/* into the root of this project.

  2. Create an application with Google App Engine, and modify the application line in app.yaml with the application ID registered with Google App Engine.

  3. Install the App Engine SDK

  4. Obtain your applications API Key and Shared Secret, and modify shopify_settings.py to use these values.

  5. Start the server

    python manage.py runserver
  6. Visit http://localhost:8000 to view the example.

  7. When you are ready to deploy your application, update the return URL on Shopify to point to your App Engine domain name (e.g. https://APPLICATION-ID.appspot.com/login/finalize).

    Then upload the application:

    appcfg.py update .

Questions or problems?

Read up on the possible API calls: http://api.shopify.com

Learn how to use the shopify_python_api library: http://wiki.shopify.com/Using_the_shopify_python_api

Ask technical questions on Stack Overflow: http://stackoverflow.com/questions/tagged/shopify

Read and edit the wiki on Shopify App Developement: http://wiki.shopify.com/Shopify_App_Development