This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from boto.s3.connection import S3Connection | |
from boto.s3.key import Key | |
import sys | |
import os | |
conn = S3Connection('XXX', 'XXXXXXXXX') | |
bucket = conn.get_bucket('mydata') | |
rs = bucket.list() | |
SHP_DIR="haitiwbdata/zips" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf.urls.defaults import * | |
from django.conf import settings | |
from staticfiles.urls import staticfiles_urlpatterns | |
# Uncomment the next two lines to enable the admin: | |
from django.contrib import admin | |
admin.autodiscover() | |
js_info_dict = { | |
'packages': ('geonode.maps',), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import cycle, izip | |
import logging | |
import re | |
from django.db import transaction | |
from django.utils.translation import ugettext as _ | |
from django.contrib.auth.models import User | |
from geonode.maps.models import Map, Layer, MapLayer, Contact, ContactRole, Role, get_csw | |
from geonode.maps.gs_helpers import fixup_style | |
import geoserver | |
from geoserver.resource import FeatureType, Coverage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello from Jakarta, Indonesia. | |
I have spent the last two weeks working with very bright minds of a project called Risk In a Box that uses GeoNode as it's core. The GeoNode demo server has been down a couple of times just before important meetings with local organizations and government officials. We also spent an entire day debugging the upload code in GeoNode for the automatically generated layers and my friend Ole pointed out the fact that there are big try/except blocks that eat up exceptions and fail silently in our upload handling code. | |
These situations made us take a step back from Risk In a Box development and realize that we need to invest some time bringing up GeoNode to the standards of quality of it's parent projects: GeoServer and Django. | |
We love GeoNode for what it could be, and will be, but we need to be fair with ourselves, and our users, look at the current status of the project and decide what actions should be taken. This is not the time to point fingers, but I would be the first to admit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import env, sudo, run, cd, local, put | |
import os | |
GEONODE_HOST = os.environ['GEONODE_HOST'] | |
GEONODE_USER = os.environ['GEONODE_USER'] | |
GEONODE_PASSWORD = os.environ['GEONODE_PASSWORD'] | |
env.hosts = ['%s@%s' % (GEONODE_USER, GEONODE_HOST)] | |
env.password = GEONODE_PASSWORD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" | |
sudo apt-get -y update | |
sudo echo "sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true" | sudo debconf-set-selections | |
sudo echo "sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true" | sudo debconf-set-selections | |
sudo echo "sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true" | sudo debconf-set-selections | |
sudo echo "sun-java6-jre sun-java6-jre/stopthread boolean true" | sudo debconf-set-selections | |
sudo echo "sun-java6-jre sun-java6-jre/jcepolicy note" | sudo debconf-set-selections | |
sudo echo "sun-java6-bin shared/present-sun-dlj-v1-1 note" | sudo debconf-set-selections | |
sudo echo "sun-java6-jdk shared/present-sun-dlj-v1-1 note" | sudo debconf-set-selections | |
sudo echo "sun-java6-jre shared/present-sun-dlj-v1-1 note" | sudo debconf-set-selections |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- config.xml.orig 2011-08-11 15:15:19.702395855 +0700 | |
+++ config.xml 2011-01-12 23:42:12.000000000 +0700 | |
@@ -93,7 +93,7 @@ | |
<!-- mckoi standalone --> | |
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> | |
- <resource enabled="false"> | |
+ <resource enabled="true"> | |
<name>main-db</name> | |
<provider>jeeves.resources.dbms.DbmsPool</provider> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install -y --force-yes openjdk-6-jdk | |
udo apt-get install -y vim zip unzip subversion git-core binutils build-essential python-dev python-setuptools python-imaging python-reportlab gdal-bin libproj-dev libgeos-dev python-urlgrabber python-scipy python-nose python-virtualenv python-pastescript postgresql-contrib libpq-dev gettext python-psycopg2 | |
sudo apt-get install maven2 --no-install-recommends | |
# geonode dev setup | |
git clone git://github.com/GeoNode/geonode.git | |
cd geonode | |
python bootstrap.py | |
source bin/activate | |
paver build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from geonode.core.models import AUTHENTICATED_USERS, ANONYMOUS_USERS | |
def restrict(item): | |
"""Works with GeoNode Map and Layer objects to disable unauthenticated access. | |
""" | |
item.set_gen_level(ANONYMOUS_USERS, item.LEVEL_NONE) | |
item.set_gen_level(AUTHENTICATED_USERS, item.LEVEL_READ) | |
def publish(item): | |
"""Works with GeoNode Map and Layer objects to enable unauthenticated access. |