silentsokolov / django-admin-rangefilter

A Django app that lets you filter data by date range and numeric range in the admin UI
MIT License
713 stars 106 forks source link

Add csp compliance through django-csp, if installed #34

Closed jsumnerPhD closed 5 years ago

jsumnerPhD commented 5 years ago

I added a third template django_filter_csp.html that will be rendered if django-csp is installed. It adds csp nonces to script/style tags where needed and refactors some of the js into a statically loaded iife.

Hope this is of use!

codecov-io commented 5 years ago

Codecov Report

Merging #34 into master will decrease coverage by 0.57%. The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #34      +/-   ##
==========================================
- Coverage   97.12%   96.55%   -0.58%     
==========================================
  Files           7        7              
  Lines         313      319       +6     
==========================================
+ Hits          304      308       +4     
- Misses          9       11       +2
Impacted Files Coverage Δ
rangefilter/filter.py 91.66% <57.14%> (-1.48%) :arrow_down:

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 ec7d839...fdcf790. Read the comment docs.

silentsokolov commented 5 years ago

Thanks for RP! I think that it useful.