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.3.tar.gz (15.1 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.3-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dj-flexi-tag-1.0.3.tar.gz
  • Upload date:
  • Size: 15.1 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.3.tar.gz
Algorithm Hash digest
SHA256 8f3f15e10ffce95ee749b69b6ebede36c4eb77c2a2b48203ad0e9a4167681a9e
MD5 3d9d843ae55713f8b5526b302b7917ee
BLAKE2b-256 2c9e86cf0b2e090c7db1f4c6a1a5609d044ab2a2438760910c64d5cf4b591204

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dj_flexi_tag-1.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 86ebdb258cd9a97f7420039953ac1006b586d74f1ca89ce463c285b72c7842fe
MD5 cfb1337e20632bbdd89f0716db87c672
BLAKE2b-256 21103e71a82ee71a750e056ab34f785aac2a87c72e0993a5d7831e1266525953

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