fnp
/
edumed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use Django flatpages mechanism for mil home page
[edumed.git]
/
comment
/
views.py
diff --git
a/comment/views.py
b/comment/views.py
index
748f9c4
..
e494828
100644
(file)
--- a/
comment/views.py
+++ b/
comment/views.py
@@
-1,5
+1,6
@@
from django.views.generic import ListView, DetailView
from django.conf import settings
from django.views.generic import ListView, DetailView
from django.conf import settings
+from django.utils.translation import get_language
from .models import CommentDocument
from .models import CommentDocument
@@
-7,6
+8,9
@@
from .models import CommentDocument
class CommentDocumentList(ListView):
model = CommentDocument
class CommentDocumentList(ListView):
model = CommentDocument
+ def get_queryset(self, **kwargs):
+ return super(CommentDocumentList, self).get_queryset(**kwargs).filter(language_code = get_language())
+
class CommentDocument(DetailView):
model = CommentDocument
class CommentDocument(DetailView):
model = CommentDocument