Fixes to the gallery and for developers pages.

Fixes https://github.com/GeoNode/geonode/issues/1114 and https://github.com/GeoNode/geonode/issues/1115.