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-1.1.20.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c40ce0c4462f063f686f6fefb8aa54ef2056630b44aeb756ccbd262e71383f5 |
|
MD5 | 5b8283edcec10fa1a357b4b1c165711c |
|
BLAKE2b-256 | fd375711fd7269dfe7a581b0a2f019f30f98460a96bbdb7bbbe75daafd7e18bd |
Close
Hashes for django_shopify_app-1.1.20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75dfc109154d5f7b570c26bdc1c1de2ee758f21694c64d85aa83ad6d23d7da93 |
|
MD5 | cee3429678a4fcb88b5a92969ae613ff |
|
BLAKE2b-256 | eb6025eb0c921c573b6e8bcc2101385b1f48dc1e3ba8c876313560ca55a519d8 |