Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New settings management with optional django-siteprefs #61

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

submarcos
Copy link
Member

No description provided.

response = {}
if layer.is_point:
response = style_settings.get('point')
response = eval(app_settings.DEFAULT_STYLE_POINT) if isinstance(app_settings.DEFAULT_STYLE_POINT, str) \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of possibly insecure function - consider using safer ast.literal_eval.

elif layer.is_linestring:
response = style_settings.get('line')
response = eval(app_settings.DEFAULT_STYLE_LINE) if isinstance(app_settings.DEFAULT_STYLE_LINE, str) \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of possibly insecure function - consider using safer ast.literal_eval.

terra_geocrud/map/styles.py Outdated Show resolved Hide resolved
terra_geocrud/views.py Outdated Show resolved Hide resolved
terra_geocrud/views.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 25, 2020

Codecov Report

Merging #61 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #61      +/-   ##
==========================================
+ Coverage   94.13%   94.14%   +0.01%     
==========================================
  Files          15       15              
  Lines         903      923      +20     
==========================================
+ Hits          850      869      +19     
- Misses         53       54       +1     
Impacted Files Coverage Δ
...d/management/commands/create_default_crud_views.py 100.00% <ø> (ø)
terra_geocrud/apps.py 100.00% <100.00%> (ø)
terra_geocrud/map/styles.py 100.00% <100.00%> (ø)
terra_geocrud/models.py 99.23% <100.00%> (-0.77%) ⬇️
terra_geocrud/properties/files.py 96.00% <100.00%> (ø)
terra_geocrud/serializers.py 90.49% <100.00%> (-0.04%) ⬇️
terra_geocrud/settings.py 100.00% <100.00%> (ø)
terra_geocrud/templatetags/map_tags.py 92.91% <100.00%> (ø)
terra_geocrud/thumbnail_backends.py 65.21% <100.00%> (ø)
terra_geocrud/views.py 99.02% <100.00%> (+0.01%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4f4f33...dbcf62f. Read the comment docs.

'point': eval(app_settings.DEFAULT_STYLE_POINT) if isinstance(app_settings.DEFAULT_STYLE_POINT,
str)
else app_settings.DEFAULT_STYLE_POINT,
'polygon': eval(app_settings.DEFAULT_STYLE_POLYGON) if isinstance(app_settings.DEFAULT_STYLE_POLYGON,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of possibly insecure function - consider using safer ast.literal_eval.

@codeclimate
Copy link

codeclimate bot commented Mar 25, 2020

Code Climate has analyzed commit dbcf62f and detected 0 issues on this pull request.

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant