X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/c6c168511f18d8984901b2c828a47310a2d54d64..e0d5c785d7c2635a16b48cad54151b732c1842ea:/forum/views/commands.py diff --git a/forum/views/commands.py b/forum/views/commands.py index af6ad64..3d2f9d3 100644 --- a/forum/views/commands.py +++ b/forum/views/commands.py @@ -570,9 +570,13 @@ def related_questions(request): else: raise Http404() +@decorate.withfn(command) +def answer_permanent_link(request, id): + # Getting the current answer object + answer = get_object_or_404(Answer, id=id) + # Getting the current object URL -- the Application URL + the object relative URL + url = '%s%s' % (settings.APP_BASE_URL, answer.get_absolute_url()) - - - - + # Display the template + return render_to_response('node/permanent_link.html', { 'url' : url, })