Skip to main content

Add tags to any model in Django via ModelViewSet

Project description

Django Flexi Tag

Build status Documentation status PyPI PyPI - Django version PyPI - Python version PyPI - License

Flexi tag informs subscribed users via an URL when a specific event occurs.

Installation

Installation using pip:

pip install dj-flexi-tag

flexi-tag package has to be added to INSTALLED_APPS and migrate command has to be run.

INSTALLED_APPS = (
    # other apps here...
    'flexi_tag',
)

After that, need to add to show Tag and TaggedItem in ModelViewSet.

urlpatterns = [
...
    re_path(
        r'^v1/whisperer/',
        include('flexi_tag.urls', namespace='flexi_tag')
    ),
...
]

So, Implementation to the desired ModelViewSet is done as follows;

    from rest_framework import viewsets
    from flexi_tag.utils.viewset import TaggableViewSetMixin


    class DummyTaggableViewSet(viewsets.ModelViewSet, TaggableViewSetMixin):
    ...

Download files

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

Source Distribution

dj-flexi-tag-1.0.1.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

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

dj_flexi_tag-1.0.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file dj-flexi-tag-1.0.1.tar.gz.

File metadata

  • Download URL: dj-flexi-tag-1.0.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for dj-flexi-tag-1.0.1.tar.gz
Algorithm Hash digest
SHA256 61e0c28e536a8f05f22d4e5f088503fe0082434bd2d4468673445370db8ce92b
MD5 f0e398465a978ee10abcaff38a0fd83b
BLAKE2b-256 fd4b7a04ef90667c28c70fe4d526f0badc3968013ec83b9551a00f92b8b217d9

See more details on using hashes here.

File details

Details for the file dj_flexi_tag-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: dj_flexi_tag-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for dj_flexi_tag-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a53d32dab6f3f5a670f163c4cede8525b58acb81777a1ecb73bbbf577310c2ec
MD5 9facb5341ae27e504ab5aa8758a16fea
BLAKE2b-256 1e751e3e57944262020f6eebc2a28872a463a4776c3ccc64bb18ed4a8e97a55e

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