src/p4l/views.py
changeset 40 cc7149ca6863
parent 38 c4e5bb735ec1
child 43 829d9d4111da
--- a/src/p4l/views.py	Thu Sep 05 13:25:32 2013 +0200
+++ b/src/p4l/views.py	Thu Sep 05 14:53:00 2013 +0200
@@ -6,7 +6,6 @@
 '''
 
 from django.conf import settings
-from django.contrib.auth.decorators import login_required
 from django.utils.decorators import method_decorator
 from django.views.generic import ListView, DetailView
 from p4l.forms import RecordFilterForm
@@ -14,8 +13,6 @@
 from p4l.utils import get_labels_for_uris
 import json
 import logging
-from p4l.semantictree.forms.forms import SubjectForm
-from django.utils.safestring import mark_safe
 
 
 logger = logging.getLogger(__name__)
@@ -27,10 +24,6 @@
     template_name = "p4l/p4l_home.html"
     form_class = RecordFilterForm
     
-    @method_decorator(login_required)
-    def dispatch(self, *args, **kwargs):
-        return super(RecordListView, self).dispatch(*args, **kwargs)
-    
     def get_context_data(self, **kwargs):
         context = ListView.get_context_data(self, **kwargs)
         context['filter_form'] = self.form_class()
@@ -56,10 +49,6 @@
     template_name = "p4l/p4l_record_view.html"
     slug_field = "identifier"
     
-    @method_decorator(login_required)
-    def dispatch(self, *args, **kwargs):
-        return super(RecordDetailView, self).dispatch(*args, **kwargs)
-    
     def get_context_data(self, **kwargs):
         context = DetailView.get_context_data(self, **kwargs)
         # We get the language, "fr" by default
@@ -168,7 +157,7 @@
 WHERE {
     ?uri a skos:Collection ;
     skos:inScheme <http://skos.um.es/unescothes/CS000> ;    
-    rdfs:label ?label .
+    skos:prefLabel|rdfs:label ?label .
     FILTER (lang(?label) = ?language). 
     FILTER NOT EXISTS { [skos:member ?uri] }
 }