SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 835b7270 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Mail messages list: login required

parent eec3f2a9
No related branches found
No related tags found
No related merge requests found
...@@ -104,7 +104,7 @@ urlpatterns = [ ...@@ -104,7 +104,7 @@ urlpatterns = [
path( # /mail/messages path( # /mail/messages
'messages', 'messages',
TemplateView.as_view(template_name='apimail/message_list.html'), views.message_list,
name='message_list' name='message_list'
), ),
path( # /mail/attachment_file/<uuid> path( # /mail/attachment_file/<uuid>
......
...@@ -4,12 +4,19 @@ __license__ = "AGPL v3" ...@@ -4,12 +4,19 @@ __license__ = "AGPL v3"
import mimetypes import mimetypes
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse from django.http import HttpResponse
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404, render
from .models import AttachmentFile from .models import AttachmentFile
@login_required
def message_list(request):
return render(request, 'apimail/message_list.html')
@login_required
def attachment_file(request, uuid): def attachment_file(request, uuid):
""" """
Return an attachment file. Return an attachment file.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment