Open Andrelamor opened 2 years ago
Independentemente do esforço, acho que somente vale a pena fazer essa alteração se o CKAN oferecer um mecanismo de extensão que permita isso, sem que seja necessário alterações no código fonte do CKAN.
Relendo a pergunta e a resposta acho que a chave pode estar na IDatasetForm interface
:
[Q]: I want to change
mysite.org/organization/someinstitution
tomysite.org/institution/someinstitution
. Is there a way to change this using an extension or by any other means?[A]: It is not as straight-forward as datasets with the IDatasetForm interface [...]
A documentação referencia ckanext/example_idatasetform
como um exemplo de plugin que utiliza essa interface e o arquivo plugin_v6.py parece ser relevante pois utiliza a função prepare_dataset_blueprint
que possui a seguinte documentação.
Update or replace dataset blueprint for given package type.
Internally CKAN registers blueprint for every custom dataset type. Before default routes added to this blueprint and it registered inside application this method is called. It can be used either for registration of the view function under new path or under existing path(like /new), in which case this new function will be used instead of default one.
Note, this blueprint has prefix /{package_type}.
Mas não consigo entender o que isso significa. @gabrielbdornas você fala essa lingua?
O que?
Investigar como e por que as rotas das URLs são pensadas da forma em que estão.
Por que?
Modificar a estrutura das rotas pode influenciar em atualizações futuras do CKAN; avaliar até que ponto vale a pena as modificações.
Referência
stack overflow