Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
1303e12c
Commit
1303e12c
authored
Jun 22, 2019
by
waylon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix E117,F632 after pydocestyle update.
parent
b0e09ea4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
fields.py
flask_admin/contrib/geoa/fields.py
+3
-3
typefmt.py
flask_admin/contrib/geoa/typefmt.py
+1
-1
No files found.
flask_admin/contrib/geoa/fields.py
View file @
1303e12c
...
...
@@ -19,7 +19,7 @@ class GeoJSONField(JSONField):
super
(
GeoJSONField
,
self
)
.
__init__
(
label
,
validators
,
**
kwargs
)
self
.
web_srid
=
4326
self
.
srid
=
srid
if
self
.
srid
is
-
1
:
if
self
.
srid
==
-
1
:
self
.
transform_srid
=
self
.
web_srid
else
:
self
.
transform_srid
=
self
.
srid
...
...
@@ -30,7 +30,7 @@ class GeoJSONField(JSONField):
if
self
.
raw_data
:
return
self
.
raw_data
[
0
]
if
type
(
self
.
data
)
is
geoalchemy2
.
elements
.
WKBElement
:
if
self
.
srid
is
-
1
:
if
self
.
srid
==
-
1
:
return
self
.
session
.
scalar
(
func
.
ST_AsGeoJson
(
self
.
data
))
else
:
return
self
.
session
.
scalar
(
...
...
@@ -43,7 +43,7 @@ class GeoJSONField(JSONField):
def
process_formdata
(
self
,
valuelist
):
super
(
GeoJSONField
,
self
)
.
process_formdata
(
valuelist
)
if
str
(
self
.
data
)
is
''
:
if
str
(
self
.
data
)
==
''
:
self
.
data
=
None
if
self
.
data
is
not
None
:
web_shape
=
self
.
session
.
scalar
(
...
...
flask_admin/contrib/geoa/typefmt.py
View file @
1303e12c
...
...
@@ -17,7 +17,7 @@ def geom_formatter(view, value):
"data-tile-layer-url"
:
view
.
tile_layer_url
,
"data-tile-layer-attribution"
:
view
.
tile_layer_attribution
})
if
value
.
srid
is
-
1
:
if
value
.
srid
==
-
1
:
value
.
srid
=
4326
geojson
=
view
.
session
.
query
(
view
.
model
)
.
with_entities
(
func
.
ST_AsGeoJSON
(
value
))
.
scalar
()
return
Markup
(
'<textarea
%
s>
%
s</textarea>'
%
(
params
,
geojson
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment