Permalink
Browse files

Merge branch 'master' of github.com:GeoNode/geonode into dev

  • Loading branch information...
2 parents 762677d + 503fc50 commit f2006f559b517cad8761fb1cd1cbd8bfe9eb1fbe @jj0hns0n jj0hns0n committed Feb 4, 2013
@@ -1,5 +1,12 @@
from django.contrib import admin
from geonode.documents.models import Document, ContactRole
-admin.site.register(Document)
+class DocumentAdmin(admin.ModelAdmin):
+ list_display = ('id', 'title', 'date', 'category')
+ list_display_links = ('id',)
+ list_filter = ('date', 'date_type', 'constraints_use', 'category')
+ search_fields = ('title', 'abstract', 'purpose',)
+ date_hierarchy = 'date'
+
+admin.site.register(Document, DocumentAdmin)
admin.site.register(ContactRole)
View
@@ -34,6 +34,7 @@ class LayerAdmin(admin.ModelAdmin):
list_display_links = ('id',)
list_editable = ('title', 'category')
list_filter = ('date', 'date_type', 'constraints_use', 'category')
+ search_fields = ('typename', 'title', 'abstract', 'purpose',)
filter_horizontal = ('contacts',)
date_hierarchy = 'date'
readonly_fields = ('uuid', 'typename', 'workspace')
@@ -51,29 +52,34 @@ class ContactRoleAdmin(admin.ModelAdmin):
list_display_links = ('id',)
list_display = ('id','contact', 'layer', 'role')
list_editable = ('contact', 'layer', 'role')
+ search_fields = ('contact__name', 'layer__typename',)
class TopicCategoryAdmin(admin.ModelAdmin):
model = TopicCategory
list_display_links = ('name',)
list_display = ('id', 'name', 'slug', 'description')
+ search_fields = ('name', 'description',)
class LinkAdmin(admin.ModelAdmin):
model = Link
list_display_links = ('id',)
list_display = ('id', 'layer', 'extension', 'link_type', 'name', 'mime')
- list_filter = ('layer', 'extension', 'link_type', 'mime')
+ list_filter = ('layer', 'extension', 'link_type', 'mime')
+ search_fields = ('name', 'layer__typename',)
class AttributeAdmin(admin.ModelAdmin):
model = Attribute
list_display_links = ('id',)
list_display = ('id', 'layer', 'attribute', 'attribute_label', 'attribute_type', 'display_order')
list_filter = ('layer', 'attribute_type')
+ search_fields = ('attribute', 'attribute_label',)
class StyleAdmin(admin.ModelAdmin):
model = Style
list_display_links = ('name',)
list_display = ('id', 'name', 'workspace', 'sld_url')
list_filter = ('workspace',)
+ search_fields = ('name', 'workspace',)
admin.site.register(Layer, LayerAdmin)
admin.site.register(ContactRole, ContactRoleAdmin)
View
@@ -105,6 +105,7 @@ def __unicode__(self):
class Meta:
ordering = ("name",)
+ verbose_name_plural = "Topic Categories"
class ResourceBase(models.Model, PermissionLevelMixin):
@@ -13,8 +13,7 @@
{% include "geonode/geo_header.html" %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}geonode/css/fileuploadfield.css"/>
<style type="text/css">
- {% comment %}fix for firefox upload button issue{% endcomment %}
- #base_file-file {
+ .x-form-file {
width: auto;
}
</style>
View
@@ -666,6 +666,11 @@ def upload(incoming, user=None, overwrite=False,
save_it = False
status = 'skipped'
layer = existing_layers[0]
+ if verbosity > 0:
+ msg = ('Stopping process because '
+ '--overwrite was not set '
+ 'and a layer with this name already exists.')
+ print >> sys.stderr, msg
else:
save_it = True
Binary file not shown.
View
@@ -26,6 +26,15 @@ class MapLayerInline(admin.TabularInline):
class MapAdmin(admin.ModelAdmin):
inlines = [MapLayerInline,]
+ list_display_links = ('title',)
+ list_display = ('id','title', 'owner')
+ list_filter = ('owner', 'category',)
+ search_fields = ('title', 'abstract', 'purpose', 'owner__profile__name',)
+
+class MapLayerAdmin(admin.ModelAdmin):
+ list_display = ('id','map', 'name')
+ list_filter = ('map',)
+ search_fields = ('map__title', 'name',)
admin.site.register(Map, MapAdmin)
-admin.site.register(MapLayer)
+admin.site.register(MapLayer, MapLayerAdmin)
View
@@ -27,6 +27,8 @@ class ContactRoleInline(admin.TabularInline):
class ProfileAdmin(admin.ModelAdmin):
inlines = [ContactRoleInline]
+ list_display = ('id','user', 'name', 'organization',)
+ search_fields = ('name','organization', 'profile', )
admin.site.register(Profile, ProfileAdmin)
admin.site.register(Role)
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
View
@@ -203,9 +203,18 @@ def change_admin_password():
def geonode_updateip(server_name="alpha.dev.geonode.org"):
sudo ('geonode-updateip %s' % server_name)
-def set_hosts_entry(server_name="alpha.dev.geonode.org"):
+def set_temp_hosts_entry(server_name="alpha.dev.geonode.org"):
sudo("IP=`wget -qO- http://instance-data/latest/meta-data/public-ipv4`; echo $IP alpha.dev.geonode.org >> /etc/hosts")
+def remove_temp_hosts_entry():
+ sudo("sed '$d' /etc/hosts > temp; mv temp /etc/hosts")
+
+def update_geoserver_geonode_auth():
+ sudo('perl -pi -e "s/:8000//g" /usr/share/geoserver/data/security/auth/geonodeAuthProvider/config.xml')
+ sudo('/etc/init.d/tomcat7 restart')
+
+
+
def update_instance():
put('../misc/update-instance', '/home/ubuntu/')
sudo('mv /home/ubuntu/update-instance /etc/init.d')
@@ -13,11 +13,14 @@ echo $key
cd $WORKSPACE/scripts/cloud/
fab -i $key -H ubuntu@$host deploy_geonode_testing_package
-fab -i $key -H ubuntu@$host set_hosts_entry:server_name=alpha.dev.geonode.org
+fab -i $key -H ubuntu@$host set_temp_hosts_entry:server_name=alpha.dev.geonode.org
fab -i $key -H ubuntu@$host install_sample_data
fab -i $key -H ubuntu@$host geonode_updateip:server_name=alpha.dev.geonode.org
+fab -i $key -H ubuntu@$host update_geoserver_geonode_auth
+fab -i $key -H ubuntu@$host remove_temp_hosts_entry
python ec2.py set_alpha_ip
#python ec2.py terminate
+

0 comments on commit f2006f5

Please sign in to comment.