Comments (4)
Thanks for the detailed report! Yes, this is a bug. I came across this recently and it had been so long since writing the library that I got confused by it myself!
CharFilter
currently uses Django's forms.CharField
to convert the raw query input into a Python object before Filternaut works with it. With CharFilter this is basically a no-op since it runs str()
in the input and the input is already a string, but if you use e.g. DateTimeFilter
then raw input of '2017-01-01' is turned into a datetime
instance, which is useful.
Anyway, this falls apart with multi-valued input as the conversion is applied to the raw input as-is; so CharFilter ends up running str()
on ['one', 'two', 'three']
and you get the result described above.
If you're interested in making a patch, https://github.com/bennullgraham/filternaut/blob/master/filternaut/filters.py#L44 probably needs to special-case input which appears to be a list, tuple, etc. Otherwise, I'll fix when I get a chance!
from filternaut.
Turns out I got a chance fairly quickly :)
@jameswyse can you check that the fix/multi-clean
branch (https://github.com/bennullgraham/filternaut/tree/fix/multi-clean) fixes or would appear to fix your case?
from filternaut.
Thanks for the detailed response! (and then for fixing it!)
Your branch does appear to fix the problem I was seeing
from filternaut.
Fixed in 0.0.9 which is now on PyPI. Thanks again for the ticket
from filternaut.
Related Issues (2)
- six requirement HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filternaut.