Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

message view view.

  • Loading branch information...
commit 91b500695a65c3feca8d8a171dc8c887d0d8b892 1 parent 7e9347d
@chrisjones-brack3t chrisjones-brack3t authored
Showing with 12 additions and 2 deletions.
  1. +3 −1 dp/carrier_pigeon/urls.py
  2. +9 −1 dp/carrier_pigeon/views.py
View
4 dp/carrier_pigeon/urls.py
@@ -1,8 +1,10 @@
from django.conf.urls import patterns, url
-from carrier_pigeon.views import (InboxListView, ArchiveListView)
+from carrier_pigeon.views import (InboxListView, ArchiveListView,
+ MessageDetailView)
urlpatterns = patterns('',
url(r"^$", InboxListView.as_view(), name="inbox"),
url(r"^archive/$", ArchiveListView.as_view(), name="archive"),
+ url(r"^view/(?P<pk>\d+)/$", MessageDetailView.as_view(), name="detail"),
)
View
10 dp/carrier_pigeon/views.py
@@ -1,4 +1,4 @@
-from django.views.generic import ListView
+from django.views.generic import ListView, DetailView
from braces.views import LoginRequiredMixin, SetHeadlineMixin
@@ -29,3 +29,11 @@ def get_queryset(self):
return self.request.user.received_messages.filter(
recipient_archived=True
)
+
+
+class MessageDetailView(LoginRequiredMixin, SetHeadlineMixin, DetailView):
+ model = Message
+ template_name = "carrier_pigeon/detail.html"
+
+ def get_headline(self):
+ return u"Set This Shit"
Please sign in to comment.
Something went wrong with that request. Please try again.