<div dir="ltr">Thanks for the information, Tom! To clarify my intent, I was hacking to use these fields to drive a different front-end for publishing maps with GeoNode, and here's how I was using the fields in that front-end:<div><br></div><div><a href="https://drive.google.com/file/d/0B78jsyYUsdOaSnJZbWUtS0RkWjQ/view?usp=sharing">https://drive.google.com/file/d/0B78jsyYUsdOaSnJZbWUtS0RkWjQ/view?usp=sharing</a><br></div><div><br></div><div>What I need is two key/value pairs with a known key in each case that I can reference in an API request for the layer (in our case, we're extending the API with pull request [1] below). I'm unclear on where, via GeoNode's layer editor (Home > Layers > Pick a layer > Edit > Metadata), I could add that type of information -- or where, in general, to interact via the GUI with the "rich metadata links model"?</div><div><br></div><div>Any guidance would be appreciated!</div><div><br></div><div>[1] <a href="https://github.com/GeoNode/geonode/pull/2305">https://github.com/GeoNode/geonode/pull/2305</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 10, 2016 at 5:38 PM, Tom Kralidis <span dir="ltr"><<a href="mailto:tomkralidis@gmail.com" target="_blank">tomkralidis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Bruce: sorry for the delayed response, comments interleaved:<br>
<span class=""><br>
On Fri, Feb 5, 2016 at 6:42 PM, Bruce Crevensten<br>
<<a href="mailto:becrevensten@alaska.edu">becrevensten@alaska.edu</a>> wrote:<br>
> I'm curious about the intended (and actual) behavior of the distribution_url<br>
> and distribution_description metadata properties for layers.<br>
><br>
> I expected to be able to use GeoNode's layer editor (Layer > pick a layer ><br>
> Edit Layer > Metadata) in order to manage those fields, but I found that the<br>
> behavior was somewhat unpredictable -- either it always reset the<br>
> distribution_url to a default GeoNode point, and the url_description field<br>
> to "Web address (URL)", _or_ for some layers it's worked fine to edit them!<br>
> I can't discern the difference layers that I can edit and those I cannot,<br>
> and a colleague gets different behavior with the same layers I'm using.<br>
><br>
> I traced the relevant code to:<br>
><br>
> geonode/geonode/catalogue/models.py:<br>
> 112 if len(onlineresources) == 1:<br>
> 113 res = onlineresources[0]<br>
> 114: instance.distribution_url = res.url<br>
> 115 instance.distribution_description = res.description<br>
><br>
> I'm unclear on how this `onlineresource` is getting set (appears to happen<br>
> by default, but not always?) and/or if the intent of the Metadata editor is<br>
> to allow this to be overwritten -- and if so, is this a bug?<br>
><br>
<br>
</span>distribution_url and distribution_description are autopopulated [1] from either<br>
[a] GeoNode's metadata link objects or [b] derived from combining<br>
other objects in<br>
the absence of [a].<br>
<br>
Having said this, I believe these fields were in the codebase prior to GeoNode's<br>
rich metadata links model [2], and as such we should probably remove them. I've<br>
opened a ticket [3] to track this.<br>
<br>
Thanks<br>
<br>
..Tom<br>
<br>
[1] <a href="https://github.com/GeoNode/geonode/blob/master/geonode/catalogue/models.py#L109-L123" rel="noreferrer" target="_blank">https://github.com/GeoNode/geonode/blob/master/geonode/catalogue/models.py#L109-L123</a><br>
[2] <a href="https://github.com/GeoNode/geonode/blob/master/geonode/base/models.py#L689" rel="noreferrer" target="_blank">https://github.com/GeoNode/geonode/blob/master/geonode/base/models.py#L689</a><br>
[3] <a href="https://github.com/GeoNode/geonode/issues/2422" rel="noreferrer" target="_blank">https://github.com/GeoNode/geonode/issues/2422</a><br>
<br>
<br>
> Thanks!<br>
<span class="HOEnZb"><font color="#888888">><br>
> --<br>
> Bruce Crevensten<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><b>Bruce Crevensten</b></div><div><b><br></b></div><div><b>Senior Software Engineer<br></b></div><div><div>(SNAP) Scenarios Network for Alaska & Arctic Planning<br></div></div><div><div><a href="http://www.snap.uaf.edu/" target="_blank">www.snap.uaf.edu</a></div>
</div></div></div>
</div>