Skip to content

Instantly share code, notes, and snippets.

View ingenieroariel's full-sized avatar

Ariel Núñez ingenieroariel

View GitHub Profile
django
pycrypto
http://www.satchmoproject.com/snapshots/trml2pdf-1.2.tar.gz
django-registration
PyYAML
docutils #optional
-e svn+http://django-app-plugins.googlecode.com/svn/trunk/#egg=django-app-plugins
-e hg+https://sorl-thumbnail.googlecode.com/hg/#egg=sorl-thumbnail
-e hg+http://bitbucket.org/bkroeze/django-threaded-multihost/#egg=django-threaded-multihost
-e hg+http://bitbucket.org/chris1610/satchmo/#egg=satchmo
@ingenieroariel
ingenieroariel / emmitters.py
Created August 28, 2009 18:37
BME piston api for Remco
#!/usr/bin/env python
# encoding: utf-8
"""
emitters.py
Created by Ariel Nunez on 2009-05-24.
Copyright (c) 2009 Burning Man Earth. All rights reserved.
"""
from __future__ import generators
import types, decimal, types, re, inspect
from piston.emitters import JSONEmitter
from django.test.simple import DjangoTestSuiteRunner, TestCase
from django.test.simple import reorder_suite, build_test, build_suite
from django.db.models import get_app, get_apps
import unittest
class GeoNodeTestRunner(DjangoTestSuiteRunner):
""" This test runner allows the exclusion of some
of the apps from the test suite
"""
EXCLUDED_APPS = [
import redis
import json
cache = redis.Redis(host='localhost', port=6379, db=0)
keys = cache.keys().split(" ")
out = {}
bogota = open('bogota.txt', 'w')
for key in keys:
from geonode.maps.models import Map, Layer
from django.contrib.auth.models import User
default_user = User.objects.all()[0]
for m in Map.objects.all():
m.owner = default_user
m.save()
for l in Layer.objects.all():
diff --git a/src/GeoNodePy/geonode/maps/models.py b/src/GeoNodePy/geonode/maps/models.py
index c44abe0..762669e 100755
--- a/src/GeoNodePy/geonode/maps/models.py
+++ b/src/GeoNodePy/geonode/maps/models.py
@@ -167,24 +167,36 @@ class Layer(models.Model):
}).get(self.storeType, "Data")
def delete_from_geoserver(self):
- layerURL = "%srest/layers/%s.xml" % (settings.GEOSERVER_BASE_URL,self.name)
+ if self.name == '':
class Layer(models.Model):
...
contacts = models.ManyToManyField('Contact') #using the role field to tell the different type of contacts apart
ROLE_VALUES = [
'datasetProvider',
'custodian',
'owner',
'user',
#!/bin/bash
#s3togs.sh
# This script takes a list of zipfiles on a plain text file, downloads them and pushes
# them to geoserver.
LINKSFILE=whitelist.txt
BUCKET_URL=https://s3.amazonaws.com/haitidata/
GEOSERVER_CREDENTIALS=adminuser:supersecretpass
GEOSERVER_BASE_URL=http://geonode.mycompany.com/geoserver/
DEFAULT_WORKSPACE=base
if [ -f "$LINKSFILE" ]
diff --git a/src/GeoNodePy/geonode/maps/views.py b/src/GeoNodePy/geonode/maps/views.py
index 246b69c..5d0353f 100755
--- a/src/GeoNodePy/geonode/maps/views.py
+++ b/src/GeoNodePy/geonode/maps/views.py
@@ -660,6 +660,11 @@ def _describe_layer(request, layer):
poc_role = ContactRole.objects.get(layer=layer, role=layer.poc_role)
metadata_author_role = ContactRole.objects.get(layer=layer, role=layer.metadata_author_role)
+ poc_form = ContactForm(prefix="poc")
+ author_form = ContactForm(prefix="author")
@ingenieroariel
ingenieroariel / models.py
Created October 15, 2010 17:56
proyecto/models
# -*- coding: utf-8 -*-
from django.db import models
from territorios.models import Departamento, Municipio, TerritorioComunidad
class Empresa(models.Model):
nombre = models.CharField(max_length=255)
representante_legal = models.CharField(max_length=255)
sede_principal = models.CharField(max_length=255)
accionistas_nacionales = models.BooleanField()