diff options
author | Jayaram Pai | 2013-12-10 22:43:00 +0530 |
---|---|---|
committer | Jayaram Pai | 2013-12-10 22:43:00 +0530 |
commit | 5106c7fbfc2f206f422d258c694f0a69db4d7a1e (patch) | |
tree | 901b44d45ee69aa0f7213341d28de5ac25400797 /website/views.py | |
parent | 8d04ce1bda438a00e9fa62d2e8fda8ce58a152dc (diff) | |
download | SciPy2013-5106c7fbfc2f206f422d258c694f0a69db4d7a1e.tar.gz SciPy2013-5106c7fbfc2f206f422d258c694f0a69db4d7a1e.tar.bz2 SciPy2013-5106c7fbfc2f206f422d258c694f0a69db4d7a1e.zip |
ajax display abstracts
Diffstat (limited to 'website/views.py')
-rw-r--r-- | website/views.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/website/views.py b/website/views.py index 32060d5..d2c5bd4 100644 --- a/website/views.py +++ b/website/views.py @@ -1,5 +1,6 @@ from django.http import HttpResponse, HttpResponseRedirect from django.core.context_processors import csrf +from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render_to_response from models import * @@ -103,3 +104,14 @@ def register_page(request): # Sponsors def sponsors_page(request): return render_to_response('sponsors.html') + +@csrf_exempt +def ajax_get_abstract(request): + if request.method == 'POST': + pid = request.POST['pid'] + paper = Paper.objects.get(pk=pid) + context = { + 'paper': paper + } + return render_to_response('get-abstract.html', context) + |