Commit Graph

9 Commits

Author SHA1 Message Date
Tim Abbott 222ef672b5 [manual] Use ujson instead of simplejson.
This saves something like 15ms on our 1000 message get_old_messages
queries, and will save even more when we start sending JSON dumps into
our memcached system.

We need to install python-ujson on servers and dev instances before
pushing this to prod.

(imported from commit 373690b7c056d00d2299a7588a33f025104bfbca)
2013-06-24 10:17:10 -04:00
Zev Benjamin dd939ed7fe Disable the collection of metrics when not deployed
We were using up a lot of events in our dev environments.

(imported from commit 8413ecfa835cce0a231bdf437f37ad8cf12a9133)
2013-06-18 17:07:36 -04:00
Zev Benjamin 80702ccaa0 Add metrics variables to the template context via a context processor
Wrapping render_to_response never actually worked correctly.  On the
login page, mixpanel_token would be missing, but we wouldn't get an
error because it is surrounded by double quotes, which meant that it
was still valid Javascript.

(imported from commit 820ee42fab8f679983e5a3a4309a2feaf690f20f)
2013-06-18 17:07:36 -04:00
Luke Faraone 71a91197fa Enable absolute imports.
See PEP 328[1] for details. This feature was introduced in Python 2.5 and
will become mandatory in Python 3.

[1]: http://www.python.org/dev/peps/pep-0328

(imported from commit 7444eeba8a08d5f91b94c7921848f2274979bd76)
2013-04-23 09:51:17 -07:00
Keegan McAllister 5e9b0ba79d [manual] Get rid of the static-access-control mechanism
We will minify our code, rather than trying to restrict who can see the
un-minified code.  Removing access control first simplifies things.

Manual deployment steps:

    scp servers/puppet/files/nginx/humbug-include/app root@staging.humbughq.com:/etc/nginx/humbug-include/
    ssh root@staging.humbughq.com service nginx reload

and then the same for app.humbughq.com once deployed to prod.

(imported from commit 63788aa3fa7ba5fd97fcf85b05760abb5e7cae4b)
2013-01-31 15:34:12 -05:00
Keegan McAllister 205d839a58 context_processors: Rename misleadingly named unused parameter
(imported from commit 45fcb3e349747f430372767c21a50660cbb19228)
2012-11-07 17:46:46 -05:00
Keegan McAllister b81ef9cca7 Replace template variables static_{third,public} with hardcoded paths
So that the 500 error view will render properly, even though no variables are
set.  We keep the variable static_hidden, which by design is not used on the
500 page.

Fixes #240.

(imported from commit 3c7534f896479b7d7edbe5ef13958481e169a13c)
2012-10-31 18:43:44 -04:00
Keegan McAllister 235ce960b8 Use the obfuscated URLs
The key property is that we never reveal the non-public directory name
4nrjx8cwce2bka8r to a not-logged-in user.  This makes it less likely that
random people from the Internet will download all our client code while we're
still in private beta.

(imported from commit 7428e847e0a1a34152cb6dc2b677c1b47290c202)
2012-10-17 15:04:33 -04:00
Keegan McAllister 8819bdc0fc Hide most of the navbar on the deployed app
(imported from commit 3b055588f7de805bf1b038f1bc6c03837eda010a)
2012-10-15 18:44:36 -04:00