mirror of
https://github.com/bspeice/Melodia
synced 2026-06-11 15:51:46 -04:00
Enable playlist listing, fix various javascript errors
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
from django.utils import simplejson
|
||||
from django.http import HttpResponse
|
||||
|
||||
from archiver.playlist import Playlist
|
||||
|
||||
def json_response(**kwargs):
|
||||
#This is used to make sure that we have a standard json response
|
||||
response = {}
|
||||
@@ -13,3 +15,12 @@ def json_response(**kwargs):
|
||||
response["success"] = True
|
||||
|
||||
return HttpResponse(simplejson.dumps(response))
|
||||
|
||||
def template_resources():
|
||||
"Return a dictionary of resources templates will need"
|
||||
#For example, giving templates a reference to all playlists.
|
||||
resource_dict = {}
|
||||
|
||||
resource_dict.update({"playlist_list": Playlist.objects.all()})
|
||||
|
||||
return resource_dict
|
||||
|
||||
Reference in New Issue
Block a user