[GeoNode-devel] Problem with Keywords in metadata

Antoine ROLLAND antoine.rolland at cirad.fr
Wed Aug 3 00:00:46 PDT 2016


Hi everyone, 

I have a problem when filling resources metadata :
When someone adds keywords, they are sometimes splitted in several distinct words. For example : 

Mountains, Lakes --> No problem, will give "Mountains", "Lakes"
Urban Environment, Lakes --> No problem, will give "Urban Environment", "Lakes". This is because there is at least one comma, so I suppose Python understands that the separator is the comma. The problem comes either if there is only one multi-words keyword, or if the last keyword of a list is a multi-words keyword. The only trick I found is to ask the user to always end his list of keywords by a comma, even if there is only one keyword. This really works, but it's not comfortable for the user. So :

Urban Environment --> Will give "Urban", "Environment" which is not good at all
Lakes, Mountains, Urban Environment --> Will give "Lakes", "Mountains", "Urban", "Environment".
BUT
Urban Environment, --> Will give "Urban Environment", no problem
Lakes, Mountains, Urban Environment, --> Will give "Lakes", "Mountains", "Urban Environment" : perfect.


My question is : could it be possible to automatically set a comma at the end of the keywords list, when the user clicks on "Submit" ? This will sure fix the problem. I tried to find where I can do that, but really I cannot find...

Thanks a lot !

Antoine Rolland, Cirad - Reunion Island


More information about the geonode-devel mailing list