If you have a list of ordered ids and you want to turn them into an ordered result set you can use FIELD() in mysql:
SELECT * FROM addons
ORDER BY FIELD(id, 3, 5, 9, 1);
If you have a list of ordered ids and you want to turn them into an ordered result set you can use FIELD() in mysql:
SELECT * FROM addons
ORDER BY FIELD(id, 3, 5, 9, 1);
ModelAdmin now has a lookup_allowed method which is used to either allow a lookup or raise a SuspiciousOperation exception. Read More
This traceback happening when you check file to __delete__, but file do not exist on file system Read More
Adds filtering by ranges of dates birth in the admin filter sidebar Read More
Adds filtering by ranges of dates in the admin filter sidebar. Read More
django employs cookies to track the user session. settings.SESSION_COOKIE_AGE defines the session expiration age in seconds. So, the user logs in once and can stay logged in for hours (even days). Read More
Since the dawn of AJAX, web developers have longed for persistent server-side connections. For a while Comet was hailed as the bastion of “server push”, but deep down we knew it was just a hack. Now finally, years later, we have an API and a protocol being standardized for socket connections between the browser and the server – aptly named, WebSockets. Read More
Fix for python-memcached MemcachedKeyLengthError Read More
Python does not has function to transform nested lists in a flatten lists, such as lists:flatten in Erlang. This is my example. Read More
Comments