Skip to main content

Simple url-paths based api to add and remove tags.

Project description

python: 3.8, 3.9, 3.10,3.11, 3.12, 3.13 django: 3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 6.0 Run tests for django-taggit-api Coveralls

Description

This application provides a simple url-path based api for django-taggit to add or remove tags.

The api is best described by the url-patterns itself:

Remove a tag from all objects of a model using the tag-id or -slug:

'remove-tag/<int:tag_id>/from/<slug:app_label>/<slug:model_name>/'
'remove-tag/<slug:tag_slug>/from/<slug:app_label>/<slug:model_name>/'

Remove a tag from a single object using the tag-id or -slug:

'remove-tag/<int:tag_id>/from/<slug:app_label>/<slug:model_name>/<int:obj_id>/'
'remove-tag/<slug:tag_slug>/from/<slug:app_label>/<slug:model_name>/<int:obj_id>/'

Add a tag to an object using the tag-id or -slug:

'add-tag/<int:tag_id>/to/<slug:app_label>/<slug:model_name>/<int:obj_id>/'
'add-tag/<slug:tag_slug>/to/<slug:app_label>/<slug:model_name>/<int:obj_id>/'

Installation

Install from pypi.org:

pip install django-taggit-api

Setup

Add taggit_api to your installed apps:

INSTALLED_APPS = [
    'taggit_api',
    ...
]

Extend your url_patterns in urls.py:

urlpatterns = [
    ...
    path('api/', include('taggit_api.urls')),
]

Download files

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

Source Distribution

django_taggit_api-1.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

django_taggit_api-1.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file django_taggit_api-1.1.tar.gz.

File metadata

  • Download URL: django_taggit_api-1.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for django_taggit_api-1.1.tar.gz
Algorithm Hash digest
SHA256 7f66e2eeba0f37a60c1e7d001ca2e2fe5a64222375ebdff44bf68eade67f97cf
MD5 832f05e838c680f6f6e1f1f150f2decb
BLAKE2b-256 8a736c54f4b5a9f5b8c0c1a5a4a4a7ac836f1b62564fce35b3a66f344acff25d

See more details on using hashes here.

File details

Details for the file django_taggit_api-1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_taggit_api-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2d000f7de0d99549c1a7cd312a746ea408fbf62c8e7db0e556e45fea170912dd
MD5 9d599e3c23e3566cc49ce2e42262aec6
BLAKE2b-256 e59d4386b545fcb869e49e183c6f573343185e007e570c88aa820f10bf35c493

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