fnp
/
edumed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Deannoy.
[edumed.git]
/
comment
/
views.py
diff --git
a/comment/views.py
b/comment/views.py
index
e494828
..
1471029
100644
(file)
--- a/
comment/views.py
+++ b/
comment/views.py
@@
-2,6
+2,8
@@
from django.views.generic import ListView, DetailView
from django.conf import settings
from django.utils.translation import get_language
from django.conf import settings
from django.utils.translation import get_language
+from django.core.urlresolvers import reverse
+
from .models import CommentDocument
from .models import CommentDocument
@@
-11,6
+13,11
@@
class CommentDocumentList(ListView):
def get_queryset(self, **kwargs):
return super(CommentDocumentList, self).get_queryset(**kwargs).filter(language_code = get_language())
def get_queryset(self, **kwargs):
return super(CommentDocumentList, self).get_queryset(**kwargs).filter(language_code = get_language())
+ def get_context_data(self, **kwargs):
+ context = super(CommentDocumentList, self).get_context_data(**kwargs)
+ context['form_href'] = reverse('contact_form', kwargs = dict(form_tag = 'mil'))
+ return context
+
class CommentDocument(DetailView):
model = CommentDocument
class CommentDocument(DetailView):
model = CommentDocument