Skip to main content

OptIn

OptIn is a simple Django app to manage User Preferences. For each Category, Users can select Yes or No.

You set the Categories through the Admin panel

Detailed documentation is needs writing.

Quick start

  1. Add “optin” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'optin',
    ]
  2. Include the polls URLconf in your project urls.py like this:

    path('optin/', include('optin.urls')),
  3. Run python manage.py migrate to create the polls models.

  4. Start the development server and visit http://127.0.0.1:8000/admin/ to create a Category (you’ll need the Admin app enabled).

  5. Add <a href=”{% url ‘optin:user_opt_selection’ user.id %}”>OptIns</a> to a template to provide a link. Please note, User must be logged in.

  6. Visit http://127.0.0.1:8000/, Login and click link to set preferences.

Settings

OptIn uses AUTH_USER_MODEL as the default user model. It will default to the Django User model if AUTH_USER_MODEL is not set in settings.py

OPTIN_SETTINGS_UPDATE_MESSAGE_BOOLEAN: If True, on successful update of preferences the OPTIN_SETTINGS_UPDATE_MESSAGE is presented to User (via django messages). Default = True

OPTIN_SETTINGS_UPDATE_MESSAGE: Message displayed to User if OPTIN_SETTINGS_UPDATE_MESSAGE_BOOLEAN set to True. Default = ‘Preferences Updated’

Metadata

Release files for django-optin 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-optin 1.0.0
File Size Uploaded
django-optin-1.0.0.tar.gz 5.7 kB Details

Release files / django-optin-1.0.0.tar.gz

Download URL django-optin-1.0.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
77e94ab7253c9846746fbe288e2dfe924da1fc9cf70f115fbd523c44b8393924
BLAKE2b-256 checksum
How to use checksums
2ecf424bc60d65df6dbfbe870192d1d780bc161681eddcd95c9dfa6c604471fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page