Enhance Content Management with New Taxonomy and Attribute Models
- Introduced `ContentTaxonomy` and `ContentAttribute` models for improved content categorization and attribute management. - Updated `Content` model to support new fields for content format, cluster role, and external type. - Refactored serializers and views to accommodate new models, including `ContentTaxonomySerializer` and `ContentAttributeSerializer`. - Added new API endpoints for managing taxonomies and attributes, enhancing the content management capabilities. - Updated admin interfaces for `Content`, `ContentTaxonomy`, and `ContentAttribute` to reflect new structures and improve usability. - Implemented backward compatibility for existing attribute mappings. - Enhanced filtering and search capabilities in the API for better content retrieval.
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
from django.urls import path, include
|
||||
from rest_framework.routers import DefaultRouter
|
||||
from .views import TasksViewSet, ImagesViewSet, ContentViewSet
|
||||
from .views import (
|
||||
TasksViewSet,
|
||||
ImagesViewSet,
|
||||
ContentViewSet,
|
||||
ContentTaxonomyViewSet,
|
||||
ContentAttributeViewSet,
|
||||
)
|
||||
|
||||
router = DefaultRouter()
|
||||
router.register(r'tasks', TasksViewSet, basename='task')
|
||||
router.register(r'images', ImagesViewSet, basename='image')
|
||||
router.register(r'content', ContentViewSet, basename='content')
|
||||
router.register(r'taxonomies', ContentTaxonomyViewSet, basename='taxonomy')
|
||||
router.register(r'attributes', ContentAttributeViewSet, basename='attribute')
|
||||
|
||||
urlpatterns = [
|
||||
path('', include(router.urls)),
|
||||
|
||||
Reference in New Issue
Block a user