A django app with all the tools required to make a Shopify app
Project description
django-shopify-app
Add the app in settings.py
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'shopify_app',
'shops',
]
Add the required configurations in settings.py
SHOPIFY_API_KEY = config('SHOPIFY_API_KEY')
SHOPIFY_API_SECRET = config('SHOPIFY_API_SECRET')
SHOPIFY_APP_SCOPES = ['read_products', 'read_orders']
SHOPIFY_APP_HOST = 'https://moship.ngrok.io'
SHOPIFY_SHOP_MODEL = 'shops.Shop'
SHOPIFY_WEBHOOK_TOPICS = [
'products/update',
'orders/updated',
'app/uninstalled'
]
SHOPIFY_WEBHOOK_CALLBACK = 'shops.webhooks.webhook_entry'
SHOPIFY_GOOGLE_PUBSUB_PROJECT_ID = config('SHOPIFY_GOOGLE_PUBSUB_PROJECT_ID')
SHOPIFY_GOOGLE_PUBSUB_TOPIC_ID = config('SHOPIFY_GOOGLE_PUBSUB_TOPIC_ID')
SHOPIFY_GOOGLE_PUBSUB_SUB_NAME = config('SHOPIFY_GOOGLE_PUBSUB_SUB_NAME')
SHOPIFY_GOOGLE_PUBSUB_SERVICE_ACCOUNT_STRING = config(
'SHOPIFY_GOOGLE_PUBSUB_SERVICE_ACCOUNT_STRING'
)
Create a path to init the access token request and another path to end the token request
from django.urls import path
from shopify_app.views import InitTokenRequestView, EndTokenRequestView
app_name = 'my_shopify_app'
urlpatterns = [
path(
'login-online/',
InitTokenRequestView.as_view(
redirect_path_name='my_shopify_app:end-token-request',
),
),
path(
'confirm/',
EndTokenRequestView.as_view(
redirect_path_name='embed_admin:dashboard',
),
name='end-token-request'
),
]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django_shopify_app-1.0.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d29c5d21c926143ec1084fc06c800e9beb2639bdda5eb68c9e7d72e131e1a2b8 |
|
MD5 | 7a3f4157a3e49899666e8d9815ae5d51 |
|
BLAKE2b-256 | d262d28c179774d45d73a2a36f91b73d9fc6f6c4ff8e72c50fe00291e6bad0e5 |
Close
Hashes for django_shopify_app-1.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c28100ce70819049246e5ea67a2e35d00d91ed07501aaf29a6dd95e44136b5c |
|
MD5 | 8e0849041ce42737c9caf02a84dd3ec8 |
|
BLAKE2b-256 | cbed12d1fa49b4b37b82c2a3c452a5c122eed57dc651edbdcb2a259e32117b6d |