Skip to content

dan1229/django_dans_waitlist

Repository files navigation

Django Dans Waitlist

Lint Test Python codecov

Description

A Django app to handle waitlist and basic functionality.

Support for Waitlist and WaitlistEntry models, as well as a WaitlistManager to handle common operations.

Quick start

  1. Install the package via pip:
pip install django-dans-waitlist
  1. Add "django_dans_waitlist" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
	...
	'django_dans_waitlist',
]
  1. Include the URL configs in your project urls.py for the REST API endpoints like this:
path("api/waitlist/", include("django_dans_waitlist.urls")),
  1. Run python manage.py migrate to update your database schema.

  2. Use the API endpoints, in code or your Django admin portal.

Requirements

  • Python 3.10 - 3.11
  • Django 3.1 or higher
  • Django Rest Framework
    • NOTE: not only must you have this installed, you must have set DEFAULT_AUTHENTICATION_CLASSES and DEFAULT_PAGINATION_CLASS in your settings.py to work with the APIs properly. An example config would be:
REST_FRAMEWORK = {
    "DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.PageNumberPagination",
    "PAGE_SIZE": 20,
    "DEFAULT_AUTHENTICATION_CLASSES": (
        "rest_framework.authentication.TokenAuthentication",
    ),
}

Available Settings

Currently all available settings are optional:

  • TEAM_NAME - Default team name to use for emails, can be added to message context manually as well still.

Add these to your settings.py file to customize the app's behavior like so:

TEAM_NAME = "My Team"

Docs


Copyright 2024 © Daniel Nazarian.

About

A Django app to help handle and manage waitlists via basic models, APIs and helper functions

Resources

License

Stars

Watchers

Forks

Packages

No packages published