Run a django shell
DJANGO_SETTINGS_MODULE=geonode.settings manage.py shell
from geonode.people.models import Profile
p = Profile.objects.get(username="admin")
p.set_password("adminxxx")
p.save()
Run a django shell
DJANGO_SETTINGS_MODULE=geonode.settings manage.py shell
from geonode.people.models import Profile
p = Profile.objects.get(username="admin")
p.set_password("adminxxx")
p.save()
The local setup will allow you to run GeoNode locally, and all other services in docker containers.
These are the involved files:
docker-compose-local.yml
: this file is as similar as possible to the docker-compose.yml
file.
Probably it only has the django container commented out
docker-compose-local-override.yml
: all the local customizations go here
.env-local
: the env file
'.env-local-geonode': some env vars, modified in order to make GeoNode run locally
import requests | |
import json | |
import sys | |
def usage(): | |
print("Bad number of args given.\n\nUsage:") | |
print (f" {sys.argv[0]} GEOSERVER_URL USERNAME PASSWORD\n") | |
if len(sys.argv) != 4: | |
usage() |
import requests | |
import json | |
import sys | |
def usage(): | |
print("Bad number of args given.\n\nUsage:") | |
print (f" {sys.argv[0]} GEOSERVER_URL USERNAME PASSWORD\n") | |
if len(sys.argv) != 4: | |
usage() |
USERNAME=admin | |
PW=YOUR_PASSWORD | |
BASEURL=THE_BASE_URL_OF_YOUR_SERVER | |
echo CHECKING SERVER $BASEURL | |
LAYERS=$(curl -s -u $USERNAME:$PW $BASEURL/geoserver/rest/layers.json) | |
for LAYERNAME in $(echo $LAYERS | jq ".layers.layer[] | .name" ) ; do | |
# echo LAYER is "$LAYERNAME" |
<gmd:MD_Metadata | |
xmlns:gmd="http://www.isotc211.org/2005/gmd" | |
xmlns:gml="http://www.opengis.net/gml" | |
xmlns:xlink="http://www.w3.org/1999/xlink" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:gco="http://www.isotc211.org/2005/gco" | |
xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://www.isotc211.org/2005/gmd/gmd.xsd"> | |
<gmd:fileIdentifier> | |
<gco:CharacterString>{{layer.uuid}}</gco:CharacterString> |
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<!--https://www.geoportal.de/gds/xml.php?uuid=C3B4183D-1F70-0001-3BFA-AF761F001BF0--> | |
<ns4:MD_Metadata xmlns:ns4="http://www.isotc211.org/2005/gmd" xmlns="http://www.isotc211.org/2005/gmd" xmlns:ns2="http://www.isotc211.org/2005/gco" xmlns:ns3="http://www.isotc211.org/2005/srv" xmlns:ns5="http://www.opengis.net/gml" xmlns:ns6="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.isotc211.org/2005/gmd http://schemas.opengis.net/csw/2.0.2/profiles/apiso/1.0.0/apiso.xsd"> | |
<ns4:fileIdentifier> | |
<ns2:CharacterString>C3B4183D-1F70-0001-3BFA-AF761F001BF0</ns2:CharacterString> | |
</ns4:fileIdentifier> | |
<ns4:language> | |
<ns4:LanguageCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/ML_gmxCodelists.xml#LanguageCode" codeListValue="ger">ger</ns4:LanguageCode> | |
</ns4:language> | |
<ns4:characterSet> |
<!-- | |
~ $Id:$ ~ ~ This file is part of Hibernate Spatial, an extension to | |
the ~ hibernate ORM solution for geographic data. ~ ~ Copyright 2010 | |
Geodan IT b.v. ~ ~ This library is free software; you can redistribute | |
it and/or ~ modify it under the terms of the GNU Lesser General Public | |
~ License as published by the Free Software Foundation; either ~ | |
version 2.1 of the License, or (at your option) any later version. ~ ~ | |
This library is distributed in the hope that it will be useful, ~ but | |
WITHOUT ANY WARRANTY; without even the implied warranty of ~ | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~ |