Big update. I added in a json-ld context file which will be used in all our
metadata columns in the future. The context describes the dublin core elements. It still has not been finalized however.
This commit is contained in:
parent
7a29c67bf9
commit
74d7ff9614
@ -28,7 +28,9 @@ _log = logging.getLogger(__name__)
|
||||
def get_url_map():
|
||||
add_route('index', '/', 'mediagoblin.views:root_view')
|
||||
add_route('terms_of_service','/terms_of_service',
|
||||
'mediagoblin.views:terms_of_service')
|
||||
'mediagoblin.views:terms_of_service'),
|
||||
add_route('metadata_context','/metadata_context/v<int:version_number>/',
|
||||
'mediagoblin.views:metadata_context_view'),
|
||||
mount('/auth', auth_routes)
|
||||
mount('/mod', moderation_routes)
|
||||
|
||||
|
70
mediagoblin/templates/mediagoblin/metadata_contexts/v1
Normal file
70
mediagoblin/templates/mediagoblin/metadata_contexts/v1
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
"@context": {
|
||||
"dc": "http://purl.org/dc/elements/1.1/",
|
||||
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
||||
"contributor":{
|
||||
"@id":"dc:title",
|
||||
"@type":"xsd:string"
|
||||
},
|
||||
"coverage":{
|
||||
"@id":"dc:coverage",
|
||||
"@type":"xsd:string"
|
||||
},
|
||||
"created":{
|
||||
"@id":"dc:created",
|
||||
"@type":"xsd:date"
|
||||
},
|
||||
"creator":{
|
||||
"@id":"dc:created",
|
||||
"@type":"xsd:date"
|
||||
},
|
||||
"date":{
|
||||
"@id":"dc:date",
|
||||
"@type":"xsd:date"
|
||||
},
|
||||
"description":{
|
||||
"@id":"dc:description",
|
||||
"@type":"xsd:string"
|
||||
},
|
||||
"format":{
|
||||
"@id":"dc:format",
|
||||
"@type":"xsd:string"
|
||||
},
|
||||
"identifier":{
|
||||
"@id":"dc:identifier",
|
||||
"@type":"xsd:string"
|
||||
},
|
||||
"language":{
|
||||
"@id":"dc:language",
|
||||
"@type":"xsd:string"
|
||||
},
|
||||
"publisher":{
|
||||
"@id":"dc:publisher",
|
||||
"@type":"xsd:string"
|
||||
},
|
||||
"relation":{
|
||||
"@id":"dc:relation",
|
||||
"@type":"xsd:string"
|
||||
},
|
||||
"rights":{
|
||||
"@id":"dc:rights",
|
||||
"@type":"xsd:anyURI"
|
||||
},
|
||||
"source":{
|
||||
"@id":"dc:source",
|
||||
"@type":"xsd:string"
|
||||
},
|
||||
"subject":{
|
||||
"@id":"dc:subject",
|
||||
"@type":"xsd:string"
|
||||
},
|
||||
"title": {
|
||||
"@id":"dc:title",
|
||||
"@type":"xsd:string"
|
||||
},
|
||||
"type":{
|
||||
"@id":"dc:type",
|
||||
"@type":"xsd:string"
|
||||
}
|
||||
}
|
||||
}
|
@ -62,3 +62,9 @@ def terms_of_service(request):
|
||||
|
||||
return render_to_response(request,
|
||||
'mediagoblin/terms_of_service.html', {})
|
||||
|
||||
def metadata_context_view(request):
|
||||
version = request.matchdict['version_number']
|
||||
return render_to_response(request,
|
||||
'mediagoblin/metadata_contexts/v{version}'.format(
|
||||
version=version), {})
|
||||
|
Loading…
x
Reference in New Issue
Block a user