Skip to main content

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_HOST = 'https://moship.ngrok.io'
    SHOPIFY_WEBHOOK_TOPICS = [
        'products/update',
        'orders/updated',
        'app/uninstalled'
    ]

    SHOPIFY_WEBHOOK_CALLBACK = 'shops.webhooks.webhook_entry'
    SHOPIFY_GDPR_WEBHOOK_CALLBACK = 'shops.webhooks.gdpr_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'
    )

    SHOPIFY_DEV_SHOPIFY_DOMAIN = None

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_shopify_app-1.1.11.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

django_shopify_app-1.1.11-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file django_shopify_app-1.1.11.tar.gz.

File metadata

  • Download URL: django_shopify_app-1.1.11.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for django_shopify_app-1.1.11.tar.gz
Algorithm Hash digest
SHA256 166234989a1e197c89e8dedef4fe0d2c43285bd158b2a105bb4c34282c30daf5
MD5 84f9c0bb055d8e8a0cc257a444120abb
BLAKE2b-256 316db38b4df5cfa87cd6d05172d4ca32478625fb2129b2e7056c83d2cb91e65e

See more details on using hashes here.

Provenance

File details

Details for the file django_shopify_app-1.1.11-py3-none-any.whl.

File metadata

File hashes

Hashes for django_shopify_app-1.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 9a12f779ea6ece1f404ff09e3ca513fc679b488f7708d0c40e6b05bd745e4833
MD5 2e1b84b98b6fb2440fa7d82ec401a2b5
BLAKE2b-256 783ff231357900aae91939796c2ba0d001eab9a9ead9cfe94767a4f04a18c9f3

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page