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
2dd966b5e2
commit
ec5a385ada
@ -28,7 +28,9 @@ _log = logging.getLogger(__name__)
|
|||||||
def get_url_map():
|
def get_url_map():
|
||||||
add_route('index', '/', 'mediagoblin.views:root_view')
|
add_route('index', '/', 'mediagoblin.views:root_view')
|
||||||
add_route('terms_of_service','/terms_of_service',
|
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('/auth', auth_routes)
|
||||||
mount('/mod', moderation_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,
|
return render_to_response(request,
|
||||||
'mediagoblin/terms_of_service.html', {})
|
'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), {})
|
||||||
|
2
setup.py
2
setup.py
@ -66,8 +66,10 @@ try:
|
|||||||
'mock',
|
'mock',
|
||||||
'itsdangerous',
|
'itsdangerous',
|
||||||
'pytz',
|
'pytz',
|
||||||
|
'six>=1.4.1',
|
||||||
'oauthlib==0.5.0',
|
'oauthlib==0.5.0',
|
||||||
'unidecode',
|
'unidecode',
|
||||||
|
'jsonschema',
|
||||||
'ExifRead',
|
'ExifRead',
|
||||||
|
|
||||||
# PLEASE change this when we can; a dependency is forcing us to set this
|
# PLEASE change this when we can; a dependency is forcing us to set this
|
||||||
|
Loading…
x
Reference in New Issue
Block a user