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:
tilly-Q 2014-03-18 16:49:48 -04:00
parent 2dd966b5e2
commit ec5a385ada
4 changed files with 81 additions and 1 deletions

View File

@ -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)

View 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"
}
}
}

View File

@ -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), {})

View File

@ -66,8 +66,10 @@ try:
'mock',
'itsdangerous',
'pytz',
'six>=1.4.1',
'oauthlib==0.5.0',
'unidecode',
'jsonschema',
'ExifRead',
# PLEASE change this when we can; a dependency is forcing us to set this