add back accidentally removed code with https://github.com/GeoNode/geonode/pull/815 cc @jj0hns0n
merge with master to get clean diff again