Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Commit

Permalink
Upgrade (#237)
Browse files Browse the repository at this point in the history
Upgrade all components.
  • Loading branch information
davisc committed Jan 29, 2019
1 parent 5d44c1d commit d00f668
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 16 deletions.
1 change: 0 additions & 1 deletion osgeo_importer/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class UploadedDataAdmin(admin.ModelAdmin):
class UploadExceptionAdmin(admin.ModelAdmin):
model = UploadException


admin.site.register(UploadException, UploadExceptionAdmin)
admin.site.register(UploadLayer, UploadedLayerAdmin)
admin.site.register(UploadedData, UploadedDataAdmin)
Expand Down
2 changes: 0 additions & 2 deletions osgeo_importer/handlers/geonode/publish_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,11 @@ def handle(self, layer, layer_config, *args, **kwargs):
'owner': owner,
'uuid': layer_uuid,
}

styles = Style.objects.filter(name=layer_name)
if len(styles) > 0:
new_layer_kwargs.update({
'default_style': styles[0]
})

if 'category' in layer_config:
try:
category = TopicCategory.objects.get(id=layer_config.get('category'))
Expand Down
7 changes: 2 additions & 5 deletions osgeo_importer/inspectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@

from django import db
from django.conf import settings
try:
import gdal
import ogr
except:
from osgeo import gdal, ogr
import gdal
import ogr
from osgeo_importer.utils import NoDataSourceFound, GDAL_GEOMETRY_TYPES, increment, timeparse, quote_ident, parse


Expand Down
8 changes: 4 additions & 4 deletions osgeo_importer/static/osgeo_importer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"main": "importer.js",
"dependencies": {
"underscore": "1.8.3",
"angular": "1.6.5",
"angular-resource": "1.6.5",
"angular": "1.3.0",
"angular-resource": "1.3.0",
"angular-ui-bootstrap": "0.14.2",
"angular-file-upload": "2.2.0",
"angular-cookies": "1.6.5",
"angular-cookies": "1.3.0",
"angular-wizard": "0.5.5"
},
"devDependencies": {
"angular-mocks": "1.6.5",
"angular-mocks": "1.3.0",
"requirejs": "^2.1.0",
"watchify": ">=3",
"browserify": ">=10",
Expand Down
4 changes: 1 addition & 3 deletions osgeo_importer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
except:
from osgeo import gdal, ogr, osr


logger = logging.getLogger(__name__)

try:
Expand Down Expand Up @@ -567,7 +566,6 @@ def configure_upload(self, upload, files):
with db.transaction.atomic():
while UploadLayer.objects.filter(name=layer_name).exists():
layer_name = self.uniquish_layer_name(layer_basename)

fields = layer_desc.get('fields', {})
upload_layer = UploadLayer(
upload_file=upfile,
Expand All @@ -582,7 +580,7 @@ def configure_upload(self, upload, files):
)
# If we wait for upload.save(), we may introduce layer_name collisions.
upload_layer.save()

upload.uploadlayer_set.add(upload_layer)

upload.complete = True
Expand Down
3 changes: 2 additions & 1 deletion osgeo_importer_prj/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,6 @@

# Lifetime Quota for User Uploads in Bytes, defaults to 140M (big enough it won't trip other tests) for tests
USER_UPLOAD_QUOTA = 140000000
# 0 is read-only

# 0 is read-only
GDAL_ACCESS_MODE = 0

0 comments on commit d00f668

Please sign in to comment.