diff options
author | luxagraf <sng@luxagraf.net> | 2020-08-06 15:09:05 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2020-08-06 15:09:05 -0400 |
commit | 647176b83d2316a8f68613adac18e579dac6e2b1 (patch) | |
tree | 0791939ca747a4ee31f8bd057985a33997591aba /app/projects/views.py | |
parent | 5a29df9e2ab7c0d80296907fcb61dccfff1fd008 (diff) |
updated to Django 3.1
Diffstat (limited to 'app/projects/views.py')
-rw-r--r-- | app/projects/views.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/projects/views.py b/app/projects/views.py index 23500e0..ad5f167 100644 --- a/app/projects/views.py +++ b/app/projects/views.py @@ -1,4 +1,4 @@ -from django.shortcuts import render_to_response, get_object_or_404 +from django.shortcuts import render, get_object_or_404 from django.template import RequestContext from django.apps import apps @@ -26,12 +26,12 @@ def detail(request, slug): "object_list": qs, } template = 'details/%s.html' % (slug) - return render_to_response(template, context, context_instance=RequestContext(request)) + return render(request, template, context) def gif_detail(request, slug): obj = get_object_or_404(AnimatedGif, slug__exact=slug) - return render_to_response('details/gifs.html', {'object': obj}, context_instance=RequestContext(request)) + return render(request, 'details/gifs.html', {'object': obj}) def data_json(request, id): |