Commit fef40331 authored by Ilya Simonov's avatar Ilya Simonov

add url for mrss playlist

parent 129561db
from django.contrib import admin
from django.conf import settings
from django.contrib.contenttypes.admin import GenericTabularInline
from . import models, forms
......@@ -62,6 +63,10 @@ class PlayListAdmin(admin.ModelAdmin):
return [TagInline]
return []
def save_model(self, request, obj, form, change):
obj.mrss = f'{settings.DOMAIN_NAME}/api/playlist/{obj.id}/mrss'
super().save_model(request, obj, form, change)
class CategoryAdmin(admin.ModelAdmin):
list_display = ['id', 'name', ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment