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

Commit

Permalink
Set settings.TEMPLATE_DIR to empty tuple if it isn't defined before a…
Browse files Browse the repository at this point in the history
…ppending to it.
  • Loading branch information
JivanAmara committed Nov 15, 2016
1 parent 8c721e3 commit 18749e4
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions osgeo_importer/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class UploadedDataAdmin(admin.ModelAdmin):
list_display = ('name', 'user', 'state', 'size', 'complete')
list_filter = ('user', 'state', 'complete')


admin.site.register(UploadLayer, UploadedLayerAdmin)
admin.site.register(UploadedData, UploadedDataAdmin)
admin.site.register(UploadFile, UploadAdmin)
1 change: 1 addition & 0 deletions osgeo_importer/handlers/geonode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from osgeo_importer.handlers import ImportHandlerMixin
from osgeo_importer.handlers import ensure_can_run
from osgeo_importer.importers import UPLOAD_DIR
from publish_handler import GeoNodePublishHandler # NOQA - Moved this code but want it still available here.


class GeoNodeMetadataHandler(ImportHandlerMixin):
Expand Down
1 change: 1 addition & 0 deletions osgeo_importer/handlers/geonode/backward_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,6 @@ def set_attributes_bw_compat(layer, attribute_map, overwrite=False, attribute_st
else:
logger.debug("No attributes found")


if set_attributes is None:
set_attributes = set_attributes_bw_compat
1 change: 1 addition & 0 deletions osgeo_importer/tests/tests_original.py
Original file line number Diff line number Diff line change
Expand Up @@ -1393,5 +1393,6 @@ def test_csv_with_wkb_geometry(self):
}
)


if __name__ == '__main__':
unittest.main()
1 change: 1 addition & 0 deletions osgeo_importer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def handler(self, err_level, err_no, err_msg):
self.err_no = err_no
self.err_msg = err_msg


lastNum = re.compile(r'(?:[^\d]*(\d+)[^\d]*)+')


Expand Down
7 changes: 5 additions & 2 deletions osgeo_importer_prj/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@

# Note that Django automatically includes the "templates" dir in all the
# INSTALLED_APPS, se there is no need to add maps/templates or admin/templates
try: TEMPLATE_DIRS
except NameError: TEMPLATE_DIRS = tuple()

TEMPLATE_DIRS = (
os.path.join(LOCAL_ROOT, "templates"),
) + TEMPLATE_DIRS
os.path.join(LOCAL_ROOT, "templates"),
) + TEMPLATE_DIRS

# Location of url mappings
ROOT_URLCONF = 'osgeo_importer_prj.urls'
Expand Down

0 comments on commit 18749e4

Please sign in to comment.