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_WEBHOOK_TOPICS = [
'products/update',
'app/uninstalled',
]
SHOPIFY_SHOP_MODEL = 'shops.Shop'
SHOPIFY_WEBHOOK_HOST = 'https://moship.ngrok.io'
SHOPIFY_APP_HOST = 'https://moship.ngrok.io'
SHOPIFY_WEBHOOK_CALLBACK = 'shops.webhooks.webhook_entry'
SHOPIFY_GDPR_WEBHOOK_CALLBACK = 'shops.webhooks.webhook_entry'
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'
),
]
Add the url patterns for the app
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('shopify/', include('shopify_app.urls')),
]
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-2.0.15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78442a4003ba044f8fee270b75fbe153180a610a9871855b22b316769d2a596b |
|
MD5 | 820e30c7fab8e0aa27824fd88dd3e8b2 |
|
BLAKE2b-256 | 3d75f6a7d98dde75c1f92a1b73fd36fd1d332556467ccae304b0c0ffe2b4bb72 |
Close
Hashes for django_shopify_app-2.0.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd7f1c1a4025386516d4eabe86b996215467d70fd31f0be78b69bc2aad68baef |
|
MD5 | f675f4b7f577d8934d405e81b0e5ca3c |
|
BLAKE2b-256 | 9650ff2703baa0f1396b06b47c4bed803fe7f8fb8037abb3329b7b161179dc80 |