Skip to content

Commit

Permalink
fix typo'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sumandari committed Nov 12, 2021
1 parent d2816b0 commit 261bdf9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions qgis-app/layerdefinitions/file_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def get_url_datasource(xmlfile):
result = url[0] if url else None
return result


def get_provider(xmlfile):
tree = parse_qlr(xmlfile)
root = tree.getroot()
Expand Down
3 changes: 2 additions & 1 deletion qgis-app/layerdefinitions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class LayerDefinition(Resource):
# file
file = models.FileField(
_('Layer Definition file'),
help_text=_('A Layer Definition file. The filesize must less than 1MB'),
help_text=_('A Layer Definition file. '
'The filesize must less than 1MB'),
upload_to=LAYERDEFINITIONS_STORAGE_PATH,
validators=[FileExtensionValidator(allowed_extensions=['qlr'])],
null=False)
Expand Down
1 change: 1 addition & 0 deletions qgis-app/layerdefinitions/tests/test_file_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def setUp(self):
self.qlr_file = os.path.join(
TESTFILE_DIR, "my-vapour-pressure.qlr")


class TestParseQlr(SetUpTest, TestCase):
"""Test the parse_qlr function."""

Expand Down
6 changes: 4 additions & 2 deletions qgis-app/layerdefinitions/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
urlpatterns = [
# GeoPackage
path('', LayerDefinitionListView.as_view(), name='layerdefinition_list'),
path('add/', LayerDefinitionCreateView.as_view(), name='layerdefinition_create'),
path('add/', LayerDefinitionCreateView.as_view(),
name='layerdefinition_create'),
path('<int:pk>/', LayerDefinitionDetailView.as_view(),
name='layerdefinition_detail'),
path('<int:pk>/update/', LayerDefinitionUpdateView.as_view(),
Expand All @@ -33,5 +34,6 @@
name='layerdefinition_require_action'),

# JSON
path('sidebarnav/', layerdefinition_nav_content, name="layerdefinition_nav_content"),
path('sidebarnav/', layerdefinition_nav_content,
name="layerdefinition_nav_content"),
]

0 comments on commit 261bdf9

Please sign in to comment.