]> git.parisson.com Git - telemeta.git/commitdiff
fix wrong login url, add internal id to dublincore, fix OAI identifiers
authoryomguy <yomguy@parisson.com>
Tue, 18 Oct 2011 18:21:22 +0000 (11:21 -0700)
committeryomguy <yomguy@parisson.com>
Tue, 18 Oct 2011 18:21:22 +0000 (11:21 -0700)
telemeta/interop/oai.py
telemeta/models/dublincore.py
telemeta/urls.py

index 8d3973a65a726ff35ec5874840ade2be4ed4ac12..1966a63f54c8fbe915c565ba04d0faf5d4a4300a 100644 (file)
@@ -411,9 +411,8 @@ class Response(object):
     def format_id_header(self, id):
         organization = self.identity[0][1] 
         if 'http' in id:
-            return ':'.join(['oai', organization.lower(), 'items', id.split('/')[-1]])
-        else:
-            return id
+            id = id.split('/')[-1]
+        return ':'.join(['oai', organization.lower(), 'items', id])
     
     def list_records(self, from_time, until_time, token = None, ids_only = False):
         """Append ListIdentifiers or ListRecords result"""
index 19fea1c66839cf053f2321991c9b0aa3a50be22e..3df15be61cfc1cd48f274d3b3261b22f966d5367 100644 (file)
@@ -162,8 +162,8 @@ def express_collection(collection):
             parts.append(Element('relation', id, 'hasPart', item))
 
     resource = Resource(
-        Element('record_identifier', collection.public_id, related=collection),
         Element('identifier',       media_identifier(collection), related=collection),
+        Element('identifier',       collection.public_id, related=collection),
         Element('type',             'Collection'),
         Element('title',            collection.title),
         Element('title',            collection.alt_title),
@@ -214,8 +214,8 @@ def express_item(item):
         mime_type = ''
 
     resource = Resource(
-        Element('record_identifier', item.public_id, related=item),
         Element('identifier',       media_identifier(item), related=item),
+        Element('identifier',       item.public_id, related=item),
         Element('type',             'Sound'),
         Element('title',            title),
         Element('title',            item.alt_title),
index b4f09079d5dc6dfa0292e8b9dc740fcb07f8ff4a..34413871ce79612d375f1048c28302a953773cfe 100644 (file)
@@ -237,7 +237,7 @@ urlpatterns = patterns('',
     url(r'^oai/.*$', general_view.handle_oai_request, name="telemeta-oai"),
 
     # Authentication
-    url(r'^login/$', 'django.contrib.views.login', {'template_name': 'telemeta/login.html'},
+    url(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'telemeta/login.html'},
         name="telemeta-login"),
     #url(r'^login/$', 'ipauth.views.login', {'template_name': 'telemeta/login.html'},
     #    name="telemeta-login"),