knipknap / django-find Goto Github PK
View Code? Open in Web Editor NEWEasily add search/filter functionality to Django projects
License: MIT License
Easily add search/filter functionality to Django projects
License: MIT License
When having multiple aliases defined for a specific field (in your searchable attribute in a Searchable class) then django-find inserts the same alias for the columns in the generated query. This is results in an invalid SQL statement.
The solutions would be either to define the aliases used in the generated statement or add a counter for the generated aliases which have multiple appearances. The last solution should be implemented as a failsave anyway.
The fields in the result are derived from the searchable attribute in the Searchable class. The problem is that there is no distinction between column names and aliases for the same column. This results in having always all aliases when calling get_fullnames here:
django-find/django_find/models.py
Line 71 in f5599bd
It is possible to generate a default field list, because Django let's you get the model fields in order:
https://stackoverflow.com/questions/41249490/django-get-model-fields-in-order
Collecting mysqlclient Using cached mysqlclient-2.0.1.tar.gz (87 kB) ERROR: Command errored out with exit status 1: command: /Users/handy/Files/Projects/web/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/w9/lzs36g6s6jn_35qlm8ksm1lh0000gn/T/pip-install-reyy38ge/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/w9/lzs36g6s6jn_35qlm8ksm1lh0000gn/T/pip-install-reyy38ge/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/w9/lzs36g6s6jn_35qlm8ksm1lh0000gn/T/pip-pip-egg-info-7sd6i3u7 cwd: /private/var/folders/w9/lzs36g6s6jn_35qlm8ksm1lh0000gn/T/pip-install-reyy38ge/mysqlclient/ Complete output (12 lines): /bin/sh: mysql_config: command not found /bin/sh: mariadb_config: command not found /bin/sh: mysql_config: command not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/w9/lzs36g6s6jn_35qlm8ksm1lh0000gn/T/pip-install-reyy38ge/mysqlclient/setup.py", line 15, in <module> metadata, options = get_config() File "/private/var/folders/w9/lzs36g6s6jn_35qlm8ksm1lh0000gn/T/pip-install-reyy38ge/mysqlclient/setup_posix.py", line 65, in get_config libs = mysql_config("libs") File "/private/var/folders/w9/lzs36g6s6jn_35qlm8ksm1lh0000gn/T/pip-install-reyy38ge/mysqlclient/setup_posix.py", line 31, in mysql_config raise OSError("{} not found".format(_mysql_config_path)) OSError: mysql_config not found ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.