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

Commit

Permalink
Removed module headers. Fixed formatting of try/except clause in sett…
Browse files Browse the repository at this point in the history
…ings. Set typename prior to use.
  • Loading branch information
JivanAmara committed Nov 18, 2016
1 parent 4c55185 commit dd05400
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 25 deletions.
5 changes: 0 additions & 5 deletions osgeo_importer/handlers/geonode/backward_compatibility.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
'''
Created on Nov 9, 2016
@author: jivan
'''
import datetime
import logging

Expand Down
8 changes: 2 additions & 6 deletions osgeo_importer/handlers/geonode/publish_handler.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
'''
Created on Nov 14, 2016
@author: jivan
'''
import os
import uuid
import logging
Expand Down Expand Up @@ -71,13 +66,14 @@ def handle(self, layer, layer_config, *args, **kwargs):

workspace_name = self.workspace
layer_uuid = str(uuid.uuid4())
typename = '{}:{}'.format(workspace_name.encode('utf-8'), layer_name.encode('utf-8'))

new_layer_kwargs = {
'name': layer_name,
'workspace': self.workspace,
'store': store_name,
'storeType': store_type,
'typename': '{}:{}'.format(workspace_name.encode('utf-8'), layer_name.encode('utf-8')),
'typename': typename,
'title': layer_name,
"abstract": 'No abstract provided',
'owner': owner,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
'''
Created on Nov 9, 2016
@author: jivan
'''
import copy

from django.contrib.auth import get_user_model
Expand Down
5 changes: 0 additions & 5 deletions osgeo_importer/tests/handlers/geonode/test_publish_handler.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
'''
Created on Nov 14, 2016
@author: jivan
'''
from _collections import defaultdict

from django.test import TestCase
Expand Down
10 changes: 6 additions & 4 deletions osgeo_importer_prj/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,14 @@

# 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()
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 dd05400

Please sign in to comment.