Esempio n. 1
0
def index(request):
    recentFiles = ComicFile.objects.all().order_by("-id")[:4].values()
    # recentFiles = ComicFile.objects.filter(rootFolder=3).values()
    rtn_thumbs_list = json_encoder.serialize_to_json(recentFiles)
    pull_list = PullList.objects.filter(user=request.user).values("series__name", "id", "series")
    rtn_pulls_list = json_encoder.serialize_to_json(pull_list)
    return render(request,
                  "dashboard/index_react.html",
                  {
                    "recentFiles": recentFiles,
                    "series_list": pull_list,
                    "json_thumbs": rtn_thumbs_list,
                    "json_pulls": rtn_pulls_list
                  },
                  )
Esempio n. 2
0
def get_current_pull_list_for_request_user(request):
    pulllist = PullList.objects.filter(user=request.user).values("series__name", "id", "series")
    rtn_list = json_encoder.serialize_to_json(pulllist)
    return rtn_list
Esempio n. 3
0
def api_thumbnail_strip(request):
    recentFiles = ComicFile.objects.all().order_by("-id")[:4].values()
    rtn_list = json_encoder.serialize_to_json(recentFiles)
    return HttpResponse(rtn_list, content_type="application/json")