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.19.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 938b76c23799a22f47d6ee936a74c5f28d5df35b1a2da05b8e7a7ba710043c0f |
|
MD5 | 0fe849d5a05ffc63bd79238ccae447ca |
|
BLAKE2b-256 | 5761a939eb8a40c56f5c1e16f86960da4b79cd64d3244d25557ab8da21f3ff7a |
Close
Hashes for django_shopify_app-1.1.19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6abcb13a3111da55909c9e2e508bf7accf14b22a6bef73a53e6f28e9021a9227 |
|
MD5 | 3141a89a62a36c892432dc2566e9e250 |
|
BLAKE2b-256 | a7e89f6cfdb44820c7a0f3372415d111e2559bfe2ebcfdb00ce0d3bb63ce4dcc |