Package release

ocyan-plugin-google

mandel/testing ยท Version 0.1.2

Shared Google configuration and reCAPTCHA integration support

Metadata

author MandelBlog
classifiers
  • Framework :: Django
  • Programming Language :: Python :: 3 :: Only
  • Programming Language :: Python :: 3.12
  • Programming Language :: Python :: 3.13
description_content_type text/markdown
license_expression LicenseRef-Proprietary
requires_dist
  • Django<5.3,>=5.2
  • ocyan.core<2,>=1.2.14
  • ocyan.plugin.oscar<3,>=2.0.5
  • python-stdnum
  • django-recaptcha
requires_python <3.14,>=3.12

Release files

FileTest resultsHistory
ocyan_plugin_google-0.1.2-py3-none-any.whl
Size
13 KB
Type
Python Wheel
Python
3
ocyan_plugin_google-0.1.2.tar.gz
Size
10 KB
Type
Source

Ocyan plugin Google

Installation

Add ocyan.plugin.google to your projects dependencies.

Follow configuration below.

About & Usage of the Google plugin

Every duplicate config options and utils between the google plugins (google_shopping, google_rich_snippets) should be added in this plugin. This way we keep it clean. If in the future something new is moved/added, please write unit tests if this a breaking change!

Product type

By default the google shopping product type is based on the oscar product class name. For sites having a LOT if product types, this is not feasable and it is possible to store the product type on a product attribute instead. If so required, specify the product_type_attribute in ocyan.json

Configuration

Settings you need to configure in config.json

For deployments, prefer the environment variables RECAPTCHA_SITE_KEY, RECAPTCHA_SECRET_KEY, and RECAPTCHA_VERSION. Environment values override the legacy JSON settings, so secret material does not need to be committed.

Example:

    "google": {
        "gtin_attribute": "custom_gtin",
        "mpn_attribute": "custom_mpn",
        "brand_attribute": "custom_brand",
        "recaptcha_public_key": "xxxx",
        "recaptcha_private_key": "xxxx",
        "recaptcha_version": "v3"
    }