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).
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".
-
Obtain your applications API Key and Shared Secret, and modify
shopify_settings.py
to use these values. You can also modify the permissions that your app needs in this settings file. -
Install or upgrade the pre-requisites:
pip install --upgrade Django ShopifyAPI
or
easy_install -U Django ShopifyAPI
-
Create the database
python manage.py makemigrations python manage.py migrate
-
Start the server
python manage.py runserver
-
Visit http://localhost:8000 to view the example.
-
Applications for the App Engine need to be self-contained, so the required libraries need to be included along with the projects source code.
Follow the links to download the source code for these of the dependant libraries, and run
python setup.py build
in the projects root directory, then movebuild/lib/*
into the root of this project. -
Create an application with Google App Engine, and modify the application line in
app.yaml
with the application ID registered with Google App Engine. -
Install the App Engine SDK
-
Obtain your applications API Key and Shared Secret, and modify
shopify_settings.py
to use these values. -
Start the server
python manage.py runserver
-
Visit http://localhost:8000 to view the example.
-
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).
Then upload the application:
appcfg.py update .
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