zulip/zephyr/lib
Tim Abbott e55eb53297 Use get_user_profile_by_* functions to get UserProfiles.
We had a few bugs where we were using a raw Django database query to
get a UserProfile object.  This might seem OK, but going through
memcached is more efficient, and also guarantees that we get back the
.select_related() version of the object, so that if we later access
related fields like user_profile.realm.domain, we don't end up doing a
second database query as well.

Fixing these should in practice save a substantial number of database
queries on handling update_status_list requests, which happen very
often and access user_profile.realm.domain.

(imported from commit 0a2027da1b5bbc7a4f6c6927aca498530d7a4977)
2013-06-20 17:57:06 -04:00
..
bugdown bugdown: TLD and parentheses shouldn't make it a link. Trac #1364 2013-06-17 10:08:13 -04:00
__init__.py Add simple parallel computation library. 2012-09-14 13:32:25 -04:00
actions.py Use get_user_profile_by_* functions to get UserProfiles. 2013-06-20 17:57:06 -04:00
avatar.py Show user-uploaded avatars on the website. 2013-06-12 15:34:51 -04:00
bulk_create.py Remove unused imports in zephyr/lib/. 2013-06-02 15:12:27 -04:00
cache_helpers.py Avoid using djcache directly 2013-06-05 16:33:43 -04:00
cache.py Fix buggy key computation in cache_with_key. 2013-06-20 10:57:32 -04:00
context_managers.py Enable absolute imports. 2013-04-23 09:51:17 -07:00
create_user.py Allow user to upload an image for their bot's avatar (back end). 2013-06-19 10:21:20 -04:00
debug.py Enable absolute imports. 2013-04-23 09:51:17 -07:00
event_queue.py Replace statsd.py with a call to statsd 2013-05-29 09:59:28 -04:00
html_diff.py Fix whitespace 2013-06-04 19:33:20 -04:00
initial_password.py Use proper randomization when generating new API keys. 2013-05-29 15:11:24 -04:00
logging_util.py Add logging filter for checking that the app is actually deployed 2013-06-10 14:59:29 -04:00
minify.py Identify app.js source map using a special comment 2013-05-30 13:51:46 -04:00
parallel.py Enable absolute imports. 2013-04-23 09:51:17 -07:00
query.py Enable absolute imports. 2013-04-23 09:51:17 -07:00
queue.py Only register a Tornado rabbitmq handler if we're using rabbitmq. 2013-05-09 10:35:49 -04:00
rate_limiter.py Properly calculate expiry of keys we add to Redis 2013-06-05 16:49:30 -04:00
response.py Add metrics variables to the template context via a context processor 2013-06-18 17:07:36 -04:00
timeout.py Comment change: link to a StackOverflow answer directly 2013-05-09 10:41:33 -04:00
timestamp.py Enable absolute imports. 2013-04-23 09:51:17 -07:00
tornado_ioloop_logging.py Enable absolute imports. 2013-04-23 09:51:17 -07:00
unminify.py Enable absolute imports. 2013-04-23 09:51:17 -07:00
upload.py Extracted S3-related code to lib/upload.py 2013-06-19 18:10:45 -04:00
utils.py Fix bankruptcy event sent to graphite 2013-06-10 09:17:43 -04:00