ADD: Api endpoint for search suggestions

This commit is contained in:
david
2023-05-18 22:42:07 +02:00
parent 0ac29fd7d5
commit 468fb338f1
9 changed files with 29 additions and 8 deletions

View File

@@ -1,6 +1,4 @@
from django.contrib import admin
from .models import Video
@admin.register(Video)

7
core/serializers.py Normal file
View File

@@ -0,0 +1,7 @@
from rest_framework import serializers
from .models import Video
class VideoSerializer(serializers.ModelSerializer):
class Meta:
model = Video
fields = ['id', 'name']

View File

@@ -1,11 +1,10 @@
from django.urls import path
from . import views
urlpatterns = [
path('', views.core, name='core'),
path('status/', views.status, name='status'),
path('about/', views.about, name='about'),
path('random/', views.random, name='random'),
path('view/<int:id>', views.view, name='view'),
]
]