silentsokolov / django-admin-rangefilter

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

Avoided leading ?& GET parameters. #59

Closed jaredahern closed 3 years ago

jaredahern commented 3 years ago

I encountered an issue with another package that did javascript parsing of URL parameters. It was creating a key-value pair with an empty string key and an undefined value. Tracing it back, it seems to be because in some instances, django-admin-rangefilter prepends the first argument with '&', leading to '?&key=val'. I think this change will eliminate that possibility, but please let me know if you think changes are required!

silentsokolov commented 3 years ago

I think this change is nice. Thank you! But need update date_filter_1_8.html too.

codecov-io commented 3 years ago

Codecov Report

Merging #59 (4a51207) into master (a0aea31) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #59   +/-   ##
=======================================
  Coverage   94.83%   94.83%           
=======================================
  Files           5        5           
  Lines         155      155           
=======================================
  Hits          147      147           
  Misses          8        8           

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 a0aea31...4a51207. Read the comment docs.

jaredahern commented 3 years ago

I think this change is nice. Thank you! But need update date_filter_1_8.html too.

Whoops! Missed that one. Thanks for pointing that out. Added a new commit.