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_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


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.17.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_shopify_app-1.1.17-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_shopify_app-1.1.17.tar.gz
  • Upload date:
  • Size: 8.3 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.17.tar.gz
Algorithm Hash digest
SHA256 0f3f4952fb4c48cb3425c9b51b7897019470b6dad433979bf7cf36424f0cd689
MD5 4be8a642db80b4afad1a30b2761ca775
BLAKE2b-256 d625ab13fd14dcf6ca71bd1d59a48525c6bf8fd5bd918cfe3b914c1e94245d38

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_shopify_app-1.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 d176cca0f1b5c7305919454d12fe09f4af2d14acd7b87ddcbae7f70fbad31ecc
MD5 609d9e7160198a5c16c62c54c9a951d2
BLAKE2b-256 4df915e74a4ab2289bae06d68cec930ae8b9ce653afb715c6a112374e00296d1

See more details on using hashes here.

Supported by

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