Commit Graph

419 Commits

Author SHA1 Message Date
Umair Khan b7ec66fc96 Remove templates, styles and js through storage. 2016-07-09 07:33:35 -07:00
Umair Khan 043ae8ad65 Upgrade to Django-Pipeline==1.6.8. 2016-07-09 07:09:55 -07:00
Tim Abbott be93b6ea28 [third] Upgrade jquery to version 1.8.3.
Also use the modern NPM name of 'jquery' (all lower case), which is
required as part of this migration.

Fixes #1141.
2016-07-08 11:09:54 -07:00
Vishnu Ks 1cbd39b768 Unique link generator for realm creation. 2016-06-30 15:52:41 -07:00
Alex Wilson 434c8d4b08 Add codepointat.js, a polyfill for String.prototype.codePointAt(). 2016-06-30 15:48:02 -07:00
Tim Abbott ee8ce48d63 settings: Make STATIC_ROOT always an absolute path. 2016-06-30 15:48:02 -07:00
Tim Abbott a78c1b9750 Fix casper tests hanging while development server is running.
This works around a nasty problem with Webpack that you can't run two
copies of the Webpack development server on the same project at the
same time (even if on different ports).  The second copy doesn't fail,
it just hangs waiting for some lock, which is confusing; but even if
that were to be solved, we don't actually need the webpack development
server running to run the Casper tests; we just need bundle.js built.
So the easy solution is to just run webpack manually and be sure to
include bundle.js in the JS_SPECS entry.

As a follow-up to this change, we should clean up how test_settings.py
is implemented to not require duplicating code from settings.py.

Fixes #878.
2016-06-30 14:18:50 -07:00
Tim Abbott 199e2df1e3 Split styles/settings.css out of zulip.css. 2016-06-26 08:21:39 -07:00
Vishnu Ks ad1c3894d9 Add interface for creating new realms.
This is controlled by settings.OPEN_REALM_CREATION; if that setting is
off, this feature doesn't do anything.
2016-06-17 16:15:28 -07:00
Vishnu Ks 8213ca135a Move default_stream list to settings. 2016-06-17 16:01:38 -07:00
Tim Abbott b5e92f541a Add new documentation on Zulip settings system.
Fixes: #962.
2016-06-17 12:15:15 -07:00
Tim Abbott 6d1d7471e6 Refactor out zproject/dev_settings.py. 2016-06-17 12:15:15 -07:00
Tim Abbott 02e6d267f1 [third] Replace jquery-caret with newer implementation.
Apparently, there are like 5 independently developed jquery-caret
plugins, none of which are great.  The previous one we were using was
last modified in 2010.  This new one comes from
https://github.com/acdvorak/jquery.caret and at least doesn't use
deprecated jQuery syntax and has a repository on GitHub.

This plugin is way larger than it needs to be for what it does, but we
can deal with that later.
2016-06-14 16:36:51 -07:00
Tim Abbott 44929523d6 Harden extraction of AUTH_LDAP_BIND_PASSWORD. 2016-05-31 15:06:43 -07:00
Tim Abbott dac8f7d923 Fix buggy extraction of EMAIL_GATEWAY_PASSWORD.
EMAIL_GATEWAY_PASSWORD has a value of None in the defaults list, so it
will never fail to be in vars().
2016-05-31 15:06:17 -07:00
Umair Khan daf3d51d4b Send 'template_rendered' signal from Jinja2.
Send the signal only under DEBUG=True just like Django.
2016-05-31 14:31:13 +05:00
Tomasz Kolek ff4e92dc3d settings: change tab indentation to space. 2016-05-30 20:16:00 -07:00
Umair Khan 82b5d9304b [third] Integrate i18next with Handlebars 2016-05-19 22:58:25 -07:00
Vishnu Ks 425363ced4 Fix non determinism bug in casper tests.
This manifested as "ReferenceError: Can't find variable: message_list"
on random tests in the Casper test suite.
2016-05-19 08:27:46 -07:00
Tim Abbott b869be9301 style: Use 'not in' consistently rather than `not foo in`. 2016-05-09 17:00:10 -07:00
Tim Abbott 9cf18f8535 settings: Fix whitespace errors. 2016-05-09 16:53:12 -07:00
Umair Khan 5359e6b0d4 Convert Zulip to use Jinja2 templates.
This results in a substantial performance improvement for all of
Zulip's backend templates.

Changes in templates:
- Change `block.super` to `super()`.
- Remove `load` tag because Jinja2 doesn't support it.
- Use `minified_js()|safe` instead of `{% minified_js %}`.
- Use `compressed_css()|safe` instead of `{% compressed_css %}`.
- `forloop.first` -> `loop.first`.
- Use `{{ csrf_input }}` instead of `{% csrf_token %}`.
- Use `{# ... #}` instead of `{% comment %}`.
- Use `url()` instead of `{% url %}`.
- Use `_()` instead of `{% trans %}` because in Jinja `trans` is a block tag.
- Use `{% trans %}` instead of `{% blocktrans %}`.
- Use `{% raw %}` instead of `{% verbatim %}`.

Changes in tools:
- Check for `trans` block in `check-templates` instead of `blocktrans`

Changes in backend:
- Create custom `render_to_response` function which takes `request` objects
  instead of `RequestContext` object. There are two reasons to do this:
    1. `RequestContext` is not compatible with Jinja2
    2. `RequestContext` in `render_to_response` is deprecated.
- Add Jinja2 related support files in zproject/jinja2 directory. It
  includes a custom backend and a template renderer, compressors for js
  and css and Jinja2 environment handler.
- Enable `slugify` and `pluralize` filters in Jinja2 environment.

Fixes #620.
2016-05-09 09:55:18 -07:00
Tim Abbott c0d38f42f1 supervisor: Use 127.0.0.1 rather than localhost for tornado.
In theory these should be the same, but in misconfigured environments
(such at Travis CI) where /etc/hosts has multiple entries for
"localhost", 127.0.0.1 is safer than "localhost".
2016-05-08 17:35:50 -07:00
Tim Abbott 73b3f7a26e settings: Fix new-style template LOADERS syntax. 2016-05-07 19:35:16 -07:00
Umair Khan 4620cd8483 settings: Migrate template settings to using TEMPLATES.
This is cleaner and also is necessary preparation for supporting
Jinja2.
2016-05-07 17:29:51 -07:00
Umair Khan a3acd5e8e9 settings: Add LocaleMiddleware to MIDDLEWARE_CLASSES.
This is needed for internationalization.
2016-05-07 17:00:10 -07:00
Tim Abbott 52c1e8ac7d Run a local camo server in voyager production environments.
Camo is a caching image proxy, used in Zulip to avoid mixed-content
warnings by proxying HTTP image content over HTTPS.  We've been using
it in zulip.com production for years; this change makes it available
in standalone Zulip deployments.
2016-05-02 17:21:31 -07:00
Tim Abbott c83999fe52 Fix EXTRA_INSTALLED_APPS in development.
In theory, tools like populate_db should probably be in zerver, not
zilencer, but until we migrate them out, we need to include these in
EXTRA_INSTALLED_APPS in development.
2016-04-26 21:55:31 -07:00
Tim Abbott 2b30b670e0 Factor out EXTRA_INSTALLED_APPS setting. 2016-04-26 21:28:51 -07:00
Tim Abbott 49799440a4 Replace use of django-guardian with fields on UserProfile.
As documented in https://github.com/zulip/zulip/issues/441, Guardian
has quite poor performance, and in fact almost 50% of the time spent
running the Zulip backend test suite on my laptop was inside Guardian.

As part of this migration, we also clean up the old API_SUPER_USERS
variable used to mark EMAIL_GATEWAY_BOT as an API super user; now that
permission is managed entirely via the database.

When rebasing past this commit, developers will need to do a
`manage.py migrate` in order to apply the migration changes before the
server will run again.

We can't yet remove Guardian from INSTALLED_APPS, requirements.txt,
etc. in this release, because otherwise the reverse migration won't
work.

Fixes #441.
2016-04-20 21:51:52 -07:00
Tim Abbott 74abd47684 Fix EMAIL_GATEWAY_BOT not being set by default in production.
Previously the DEFAULTS value of None for EMAIL_GATEWAY_BOT was
overriding the initialization code.
2016-04-13 13:19:02 -07:00
Vishnu Ks 35f70e9dac Move 5 legacy global variables to pointer.js.
Move recenter_pointer_on_display, suppress_scroll_pointer_update,
fast_forward_pointer, furthest_read, and server_furthest_read to
a new pointer module in pointer.js.
2016-04-12 10:56:54 -07:00
Tim Abbott e9637a545f Rename zerver.handlers to zerver.logging_handlers for clarity. 2016-03-30 21:48:38 -07:00
goelakash 25a75bcefe Change LOCAL_UPLOAD_DIR to 'uploads' in development.
Fixes #488.
2016-03-29 11:12:29 -07:00
Eklavya Sharma 9e3c3e14f5 Partially apply Python 3 libmodernize.fixes.fix_dict_six.
Refer to #256
2016-03-19 15:52:58 -07:00
Alexander Trost 84f7a1f1ea Make rabbitmq, redis, and memcached configurable via user settings.py.
Previously these were hardcoded in zproject/settings.py to be accessed
on localhost.

[Modified by Tim Abbott to adjust comments and fix configure-rabbitmq]
2016-01-21 22:07:56 -08:00
Javier Ros a6a47aacde Add easy support for using a remote postgres database. 2016-01-11 08:56:03 -08:00
Tim Abbott 99975400df Move LDAP password configuration to zulip-secrets.conf. 2015-12-25 16:47:48 -08:00
Tim Abbott af8d75332c Move email_gateway_password to zulip-secrets.conf. 2015-12-25 16:47:48 -08:00
Tim Abbott f4e87936da Silence 'Starting new HTTP connection' logs from requests library. 2015-12-25 16:23:57 -08:00
Tim Abbott 9d108989f3 Silence SimpleQueueClient info output by default. 2015-12-25 16:23:57 -08:00
Chris Chapman 44a9e1dff5 Fix for setting file upload size through settings file.
(Slightly tweaked by Tim Abbott to change the variable name, docs, and
default values).

Fixes #276.
2015-11-24 06:06:46 -08:00
Allie Jones 85809e6140 Add webpack build process. 2015-11-06 09:13:25 -08:00
Shumbashi 123791bfdd Fix 'manage.py makemessages' errors.
Running 'manage.py makemessages' produced two errors previously.

Closes #265.
2015-11-04 07:39:48 -08:00
Tim Abbott 2ea0663a4a Apply Python 3 futurize transform libmodernize.fixes.fix_imports_six. 2015-11-01 09:26:16 -08:00
Tim Abbott 9c66229456 Apply Python 3 futurize transform libfuturize.fixes.fix_absolute_import. 2015-11-01 09:26:16 -08:00
Tim Abbott 140e598a89 Update configuration examples to use current Google auth backend. 2015-09-26 13:50:28 -07:00
Tim Abbott ae4cb6df35 Make python-postmonkey not a required package.
This is in some ways a regression, but because we don't have
python-postmonkey packaged right now, this is required to make the
Zulip production installation process work on Trusty.

(imported from commit 539d253eb7fedc20bf02cc1f0674e9345beebf48)
2015-09-25 00:22:14 -07:00
Tim Abbott a0006d5faf Remove duplicate REQUIRED_SETTINGS check.
This makes fetching settings from here for the rabbitmq config not
work; and the main place we check for this is in initialize-database
anyway.

(imported from commit fcc6eff3882f880fdc8b127daffc9a3173f3ff20)
2015-09-25 00:22:14 -07:00
Tim Abbott 36a9dc2cf7 Cleanup various minor Zanitization issues.
(imported from commit 5784eb5ac70706f72b05463354434a83a6e1beaa)
2015-09-20 00:25:38 -07:00
Reid Barton 73264ab530 Move VOYAGER detection to after initialization of ZULIP_COM
(imported from commit c9aa814ebc30a78abe8babfc3bf2eedb8198d17d)
2015-08-29 12:07:33 -07:00
Tim Abbott 17fd248f23 Move postgres host configuration for zulip.com out of settings.py.
(imported from commit fe95011ae86ff7c5f20c789b459a763326da374d)
2015-08-22 13:49:43 -07:00
Tim Abbott 930c64df8a Move zulip.com-related statsd configuration out of main settings.py.
This also removes the convenient way to run statsd in the Dev VM,
because we don't anticipate anyone doing that.  It's just 2 lines of
config to configure it anyway:

STATSD_HOST = 'localhost'
STATSD_PREFIX = 'user'

(imported from commit 5b09422ee0e956bc7f336dd1e575634380b8bfa2)
2015-08-22 13:49:43 -07:00
Tim Abbott 3e87c82d56 Reorganize settings.py to put the default values in a sane place.
(imported from commit 00f09c6c65cb95d29c466e996b17f80a30635acf)
2015-08-22 13:49:43 -07:00
Yoyo Zhou 50ccbc4230 Refactor database configuration to make ZULIP_COM the special case instead of the default.
(imported from commit bba7a3a78dc4fd0e442503f8707295eabc581652)
2015-08-22 13:48:52 -07:00
Yoyo Zhou 8549606eb3 Require ALLOWED_HOSTS to be set in production.
(imported from commit 581e3d44aa42b5c8e6322b760b8b66a1f0aaf375)
2015-08-22 13:48:52 -07:00
Tim Abbott da84aa3412 Require REQUIRED_SETTINGS in PRODUCTION.
(imported from commit 7f43ba4d54021f806481b2e369c5482b0e0f99fe)
2015-08-22 13:48:47 -07:00
Tim Abbott 6f50a2703e Remove duplicate ZULIP_COM detection from settings.py.
And fix up some required configuration.

(imported from commit 761758638baa297118848c9f5640638d6b2f4f67)
2015-08-21 10:48:13 -07:00
Tim Abbott e78361f985 Move STATSD_CONFIGURATION below setting defaults.
(imported from commit 48d833c672ad96318f738c663c3bea61cd1ec382)
2015-08-21 10:42:15 -07:00
Tim Abbott 83a653efce Change semantics of ZULIP_COM to include ZULIP_COM_STAGING machines.
(imported from commit 2e84c756b4ac41c13d619ab6ceb99e347d1f48cb)
2015-08-21 10:41:14 -07:00
Tim Abbott 16e0f21687 Fix a bunch of Zulip Voyager related comments.
(imported from commit 176e875cbc310ba00d6137930ddb718bd68f1866)
2015-08-21 10:40:54 -07:00
David Roe edf7e732a2 ENTERPRISE => VOYAGER.
(imported from commit 4f8080b9f506a87ca40bef32e39de5218cba916a)
2015-08-21 10:33:35 -07:00
David Roe f9f1fdc4d7 change deploy_type in zulip.com conf file.
(imported from commit 6fad28d15f530a619d7359bce0a182ed61b876ab)
2015-08-21 10:33:35 -07:00
David Roe d702ddb3cf DEPLOYED => PRODUCTION
(imported from commit a7d365c07916c5103fc721c712db94f9af977640)
2015-08-21 10:33:35 -07:00
David Roe 63e576b811 STAGING_DEPLOYED => ZULIP_COM_STAGING
(imported from commit 25419979292218932c53cface59c1e8e2348a7c2)
2015-08-21 10:33:35 -07:00
David Roe 8778c4726a Add settings.DEVELOPMENT as a complement of settings.DEPLOYED.
(imported from commit 0437140d9fee7eec7b28abe583cfe8cde3e07c21)
2015-08-21 10:33:35 -07:00
David Roe 24f6743288 Eliminate TESTING_DEPLOYED.
(imported from commit 477d8b7a15f703df1e10ae5682e02fea5ce040e4)
2015-08-21 10:33:35 -07:00
David Roe 59b94a901c Moving ALLOWED_HOSTS to local_settings.
(imported from commit b89c6983fd87ede42954dd84706f999ed0de740d)
2015-08-21 10:33:35 -07:00
Tim Abbott 80651c99cd Stop using local_settings.py at all in the Dev VM.
(imported from commit d067bcfe9d71628d8f671c5bc7bb38f521f9a965)
2015-08-21 10:33:35 -07:00
Tim Abbott 78277b5ee5 Make ADMIN_DOMAIN and ZULIP_ADMINISTRATOR have sane dev defaults.
(imported from commit 3d2602166541c7eaa72ea7fad87a2dc86f7c8f15)
2015-08-21 09:01:58 -07:00
Tim Abbott 3e61714035 Make DEPLOYMENT_ROLE_KEY no longer required.
(imported from commit 046ce610d847cc987d3f6d584ccc0bc84b55df84)
2015-08-21 09:01:58 -07:00
Reid Barton ab9539cffe Remove OpenID authentication
(imported from commit 70a859041a851ed10dc40cfc068330e472d2ed09)
2015-08-20 23:52:48 -07:00
Reid Barton 15fe02b618 Remove authhack
In Django 1.8 the username length limit seems to be 254 by default.

(imported from commit cf0027431f5a4fea9e366a49d345b9d09b90d869)
2015-08-20 23:15:45 -07:00
Reid Barton 0aab583bb1 Django 1.8 compatibility: transactions
- autocommit is now the default
- commit_on_success is now atomic

(imported from commit b6166ca666ff23d34f2871ca365ce3ec66b0fa86)
2015-08-20 23:15:45 -07:00
Reid Barton 599742536b Switch from South to native Django migrations
This commit loses some indexes, unique constraints etc. that were
manually added by the old migrations. I plan to add them to a new
migration in a subsequent commit.

(imported from commit 4bcbf06080a7ad94788ac368385eac34b54623ce)
2015-08-20 23:01:26 -07:00
Yoyo Zhou 15abf9ed31 Move all remaining calls of get_secret from local_settings.py to settings.py.
(imported from commit 099a122121f8e06568cef3579f955cb73b20ee50)
2015-08-20 22:19:26 -07:00
Yoyo Zhou bd5fc484f0 Move GOOGLE_OAUTH2_CLIENT_SECRET to be read in settings.py.
(imported from commit 814dc32cd6099516486be76fa8baffbafda69596)
2015-08-20 22:19:17 -07:00
Yoyo Zhou 4b3874988f Move DROPBOX_APP_KEY to be read from get_secrets
(imported from commit 99acd66c4478a0826b0e0ec7bf26c9a59f7febca)
2015-08-20 21:58:59 -07:00
Yoyo Zhou ef320c6e95 Remove Redis remote authentication feature.
We can add it back later but for now we can just stick with localhost
since that's what most people will want.

(imported from commit c5fe524282219dc62a0670f569c0cb6af04be339)
2015-08-20 21:58:59 -07:00
Yoyo Zhou e41c00107d Move twitter secret keys to use get_secrets in settings.py
(imported from commit cc21265ae64a49be20bec74386314d60ee822746)
2015-08-20 21:58:59 -07:00
Yoyo Zhou 32f6d1055d Get s3_key and s3_secret_key from secrets in settings.py.
(imported from commit 2c2574988486bbb6f0f769250664a5a2a4c9e6c9)
2015-08-20 21:58:51 -07:00
Yoyo Zhou d34d44e1d4 Read ANDROID_GCM_API_KEY from secrets; move to settings.py
(imported from commit 0d0d59116065956b9cbbe895eb09f0433b752cf1)
2015-08-20 21:54:55 -07:00
Yoyo Zhou 2cab113035 Rename getsecret -> get_secret and remove duplicate secret-reading code in settings.py
(imported from commit 097d6b4fad1fcf8b6f09dc212056fdb313efe5e4)
2015-08-20 21:52:26 -07:00
Tim Abbott 58e5c654fa Make feedback button option default-off.
(imported from commit 23b89ab72bd04826016631e01da950af0a5df694)
2015-08-20 19:47:00 -07:00
David Roe 13f3b448e5 Kill Embed.ly integration.
(imported from commit dfe42a26e57100108c3c50298041bd520e0d8b1b)
2015-08-20 19:46:48 -07:00
Anders Kaseorg bded0d9d54 Remove corporate beta signup form
(imported from commit 1b3a0cd8a59a124905fa4cbd3121a78d23aeb3a2)
2015-08-20 18:40:34 -07:00
Tim Abbott e79447131f Make build-enterprise-tarball run again.
(imported from commit e3dd8d75811458d0cee8a2d05a4b47abd6eda7fd)
2015-08-20 17:33:16 -07:00
acrefoot 0a6bb975c3 Replace settings.OG_ZULIPER_EMAILS with database lookups
Also renames the OG_ZULIPER_EMAILS to CROSS_REALM_BOT_EMAILS

(imported from commit a9e0ccebbd6b37376e535600670ad493dc8de7e1)
2015-08-20 17:20:41 -07:00
Cat Miller 0a20f168a7 Auto-generate dev-secrets file.
Source LOCAL_DATABASE_PASSWORD and INITIAL_PASSWORD_SALT from the secrets file.
Fix the creation of pgpass file.

Tim's note: This will definitely break the original purpose of the
tool but it should be pretty easy to add that back as an option.

(imported from commit 8ab31ea2b7cbc80a4ad2e843a2529313fad8f5cf)
2015-08-20 00:20:44 -07:00
Tim Abbott 7cffb41e13 Reorganize and document settings.py.
(imported from commit e2694979d5aee95c22b83b7aa84d80b56ffae1d6)
2015-08-18 20:57:35 -07:00
Tim Abbott 5b8894cd25 Rename USING_SSO to something more clear.
(imported from commit 94e8ae84b01419783872a5d09bafe5c2eb933c18)
2015-08-18 20:48:15 -07:00
Tim Abbott 05b0cbb36a Zulip doesn't use MEDIA_URL.
(imported from commit ebc370d9c5cf2d7e7d366cbb25fe721c817f212e)
2015-08-18 20:48:15 -07:00
Tim Abbott dcc3b3fe37 Don't create Zulip employee accounts automatically in Dev VM.
(imported from commit 378f12d3f2ac4c131919c0efbd049b9eaa961694)
2015-08-18 20:46:35 -07:00
Tim Abbott 2de3e2ebdd Move several secrets to using the get_secret function in settings.py.
(imported from commit 08fb828265c4a9e35294a51c0901bd5ad3990344)
2015-08-18 20:17:48 -07:00
Tim Abbott 8c88746912 Move iOS App IDs to settings.py since it's needed to run the app.
(imported from commit 891e32ffa82430487fc333fa549ee465f0d018c0)
2015-08-18 20:17:48 -07:00
Tim Abbott 43c7ff64d1 Remove unused FULL_NAVBAR configuration setting.
(imported from commit 47c3be669f7ba44426301a46e3f54054f3e2440b)
2015-08-18 20:17:48 -07:00
Zev Benjamin 466a678c2c Remove "More messages below" indicator
It's been very buggy for a while, has limited usefulness compared with
unread counts, and profiling over the weekend indicates that it's very
slow.

(imported from commit 716fe47f2bbec1bd8a6e4d265ded5c64efe2ad5c)
2015-03-30 15:44:36 -07:00
Leo Franchi d865732e0d Maintain two APNS connections and send correct notifications to each
Now we have 2 different Zulip apps out there, and they are signed with
two certs: Zulip and Dropbox. The Dropbox-signed apps are going to need
to be sent APNS notifications from the appropriate APNS connection

(imported from commit 6db50c5811847db4f08e5c997c7bbb4b46cfc462)
2015-02-11 06:57:25 +00:00
Jason Michalski 15713964a5 Add the notification-bot to the cross realm PM whitelist
(imported from commit 92a19f955a99650c79b83c6afb23726caf02e577)
2015-02-08 21:03:45 -08:00
Jason Michalski a0a537e0ce Add the feedback bot to OG_ZULIPER_EMAILS
The feedback bot needs to be included in the OG_ZULIPER_EMAILS so users
can send feedback.

(imported from commit b0c3295379d0f062a912f8b6c957419335be1c48)
2015-02-08 10:08:32 -08:00
Jason Michalski 1eebcb472d Only allow users in the OG zuliper list to send cross realm PMs
Changes from allowing all of the zulip realms to a whitelist of users.

(imported from commit 5ad2db9a62b430ef2c9d867e4afdf661b11ae96a)
2015-01-30 23:39:47 -08:00
Zev Benjamin 2c760ae735 Remove mixpanel
(imported from commit 9b6cc58ee9be483db8bf2d2eaaaecabc14f821e4)
2015-02-06 13:59:30 -08:00
Zev Benjamin 9738f2fa17 Send feedback to prod
(imported from commit 52c76dfb6f8b8e49d1a9e799852a1683e85673c6)
2015-02-05 22:46:30 -08:00
Luke Faraone e241e6e833 [manual] Support chat.dropboxer.net hostname.
This needs to be deployed on both prod and lb0 to be functional

DEPLOY INSTRUCTIONS: restart carefully

(imported from commit d97a450754608357418c80e5b3c7b3bbcd1d09fb)
2015-02-05 17:55:29 -08:00
Tim Abbott 7e786d5426 Import default session middleware as start for custom session middleware.
(imported from commit 76aae367ab6ea5c2a7b0d98368482a3cb312b217)
2015-01-15 21:09:52 -08:00
Steve Howell e5467d3268 Move ui.js click handlers to click_handlers.js
(imported from commit adfeb1f152cca473bc4c6ba5ccd142b38947b335)
2014-03-14 20:48:59 -04:00
Steve Howell 16faed0a83 Create copy_and_paste.js (with code from ui.js).
(imported from commit 37a06af5489e7da5196e5710f384d1f5a7ee7578)
2014-03-14 20:48:59 -04:00
Steve Howell c5993c2d2d Create gear_menu.js (with code from ui.js).
(imported from commit fc4d058d49d5d4aaaa20ef6237ea3e927eac03e3)
2014-03-14 20:48:58 -04:00
Steve Howell 405c3d7626 Created floating_recipient_bar.js (with code from ui.js).
(imported from commit 2b6631938b0fc8e39c14aacd92f9f1670b68b199)
2014-03-14 20:48:58 -04:00
Steve Howell f8b71fa497 Created condense.js (with code taken from ui.js).
(imported from commit 72b27b48614a7c396170d46936646e52757e2743)
2014-03-14 20:48:58 -04:00
Steve Howell 84b59d4335 Created scroll_bar.js (with code taken from ui.js).
(imported from commit 0c4e8538031ceb1a0f50eea9a34e315e23e7d9ff)
2014-03-14 20:48:56 -04:00
Steve Howell be2a1c2893 Move resizing code to resize.js.
(imported from commit b6df0007307872751e1a4200af740076e08b5c11)
2014-03-14 20:48:55 -04:00
Steve Howell 7fce920522 Move favicon-related functions to favicon.js
util.reset_favicon -> favicon.reset
util.set_favicon -> favicon.set

(imported from commit 250848ec5dc7ac58649197c8cc4b7b4e7b19f25c)
2014-03-14 20:48:55 -04:00
Steve Howell 91e83731f0 Promote setup.js in the list of JS files.
I don't think this matters a ton, but there's no reason for
the two muting files to come before setup.js.

(imported from commit c18231b633fba6acccaf5bc180c7605f7591462e)
2014-03-14 20:48:53 -04:00
Steve Howell 50bc5401a4 Moved loading_indicator functions to loading.js.
util.make_loading_indicator -> loading.make_indicator
util.destroy_loading_indicator -> loading.destroy_indicator

(imported from commit 8a171622a6096476dd040912d3f1460d53159f20)
2014-03-14 20:48:52 -04:00
Waseem Daher 095c82ecc4 Actually switch to Bootstrap3-esque buttons.
(imported from commit ddcecb8c5a63324a666ffe170e2d5a76171776c9)
2014-03-05 16:24:54 -05:00
Jason Michalski 3f6e53db6e Add bot_data module that updated with events
(imported from commit b0bd714258132fc81db763d316a15f5a81b1f4ff)
2014-03-05 14:16:20 -05:00
Allen Rabinovich 1eae686443 Add slim scrollbar to stream list
(imported from commit 58b64081db68fe9b1d2addcaece10167332d1a1b)
2014-02-27 20:25:41 -05:00
Leo Franchi 748e5b6da6 Remove disabled summarization code
This experiment has been disabled for everyone for a while: if we
bring something like this back, it is not likely to be exactly the same,
and will be different enough to require a different implementation.

As it is, the summarization code was making a few code paths (rendering
especially) more complex, and is worth removing for simplicity's sake.

(imported from commit 6ac8cdc9f7077a5a1da01ab4268aba3db0bc43f8)
2014-02-27 20:25:23 -05:00
Zev Benjamin 631783f3cd [manual] Use dedicated Redis server for staging
Before we deploy this commit, we must migrate the data from the staging redis
server to the new, dedicated redis server.  The steps for doing so are the
following:

* Remove the zulip::redis puppet class from staging's zulip.conf
* ssh once from staging to redis-staging.zulip.net so that the host key is known
* Create a tunnel from redis0.zulip.net to staging.zulip.net
  * zulip@redis0:~$ ssh -N -L 127.0.0.1:6380:127.0.0.1:6379 -o ServerAliveInterval=30 -o ServerAliveCountMax=3 staging.zulip.net
* Set the redis instance on redis0.zulip.net to replicate the one on staging.zulip.net
  * redis 127.0.0.1:6379> slaveof 127.0.0.1 6380
* Stop the app on staging
* Stop redis-server on staging
* Promote the redis server on redis0.zulip.net to a master
  * redis 127.0.0.1:6379> slaveof no one
* Do a puppet apply at this commit on staging (this will bring up the tunnel to redis0)
* Deploy this commit to staging (start the app on staging)
* Kill the tunnel from redis0.zulip.net to staging.zulip.net
* Uninstall redis-server on staging

The steps for migrating prod will be the same modulo s/staging/prod0/.

(imported from commit 546d258883ac299d65e896710edd0974b6bd60f8)
2014-02-10 13:23:28 -05:00
Tim Abbott 88fbd5d16a Split out new module message_store.js.
(imported from commit 57cf3f2b8e74d7c56e3baf75859d5b3646282225)
2014-01-31 15:57:28 -05:00
Tim Abbott c8d57fcafb Split out message_flags.js.
(imported from commit 52afa76fa71141630e325e558cb9c6955d8c03d5)
2014-01-31 14:59:03 -05:00
Tim Abbott e505583f52 Split out new module people.js for tracking people.
(imported from commit fb9b769819ade25d1d3d6e452e68c7ee8651cfdd)
2014-01-30 17:32:58 -05:00
Tim Abbott a7b1b29bf0 Move get_updates into a module.
(imported from commit 9a6c0ab1e76dd96abad8626bc5b1fdbd234b2645)
2014-01-30 15:57:28 -05:00
Steve Howell 12c095fd4b Extract test_runner.py
The file test_runner.py has our subclass of DjangoTestSuiteRunner
and various methods that help it work.

(imported from commit 8eca39a7ed3f8312c986224a810d4951559e7a8b)
2014-01-29 10:55:59 -05:00
Leo Franchi daecc7993a Add a fenced code parser in javascript
(imported from commit 42b1dc18ca34cbbdf3cda6e833adde631a9d88f5)
2014-01-28 15:35:32 -05:00
Jessica McKellar a62c720e0e [manual] Add back json_tutorial_send_message endpoint.
Before deploying to staging, create the tutorial bot:

email: welcome-bot@zulip.com
name: Zulip Welcome Bot

(imported from commit 2f337a00ffac888b121975bdb95a89cf2f8ab3a7)
2014-01-23 17:06:27 -05:00
Leo Franchi 24cb5fb079 Add a localstorage.js module
(imported from commit 9f3ab248ce84ce296bb1fb918de3b2dd8cde1ded)
2014-01-23 16:28:58 -05:00
Leo Franchi 835e385b75 [third] Add marked.js, a javascript markdown parser
(imported from commit e85d9b50328ce7d31882464fcc283478f7a9f753)
2014-01-23 16:28:54 -05:00
Leo Franchi 0b2ba855f9 Add helper for rough determination of markdown client-side
(imported from commit 3b6439f54e55fbca0f586392d1a0add4d7f694b8)
2014-01-23 16:28:54 -05:00
Jason Michalski d4aece75a5 Add JS to for the inline subscribe button
Add javascript to handle the button clicks and update the status based
on the subscribe and unsubscribe events from the server.

(imported from commit 6b9c0b40d9084e3d8b64bed701ebc786bef6d432)
2014-01-22 11:28:31 -05:00
Luke Faraone c3eac38fa4 Make cookie domain configurable via zulip.conf
Adapted from a cherry-pick picked of Zev's
fda2d99d9e9a07951d11fcd9fc61cf229988f471.

(imported from commit 4701511d94f9ae34523202ca395e72ceb7a1adfb)
2014-01-16 16:29:49 -05:00
Zev Benjamin fa097a1201 Remove jquery.highlight
The one call we were making to it was actually unnecessary since highlighting is
no longer done client-side.

(imported from commit 7644a5961ca48cd57f4b65c6f698083677e0a130)
2014-01-15 16:07:20 -05:00
Tim Abbott 2ebb962114 Enable USING_RABBITMQ for all development systems.
(imported from commit ffe5f3f8210372479051b5f1908a7efc12398ef8)
2014-01-14 12:09:15 -05:00
Zev Benjamin ced2f86fd7 Add an IS_WORKER setting that is True when the current process is a worker
(imported from commit f8976b8345e9c709c2336a17d18260130f3f2562)
2014-01-14 11:47:12 -05:00
Zev Benjamin db23674749 Do query time tracking at the psycopg2 level instead of the Django level
This allows us to track the query time of SQLAlchemy and raw queries.

(imported from commit 818a4ee41786ffc57b80d7ed1cfba075f29b6ee5)
2014-01-14 11:47:12 -05:00
Luke Faraone 000beafc7f Add default for GOOGLE_CLIENT_ID
(imported from commit 9ef9eea6629cf9257276e006ee8ac56d1136db9f)
2014-01-13 16:24:21 -05:00
Steve Howell 2504baf783 Use compiled.js in dev environments.
Make our dev setup more similar to prod by using compiled.js,
instead of AJAX-ing templates on the fly and compiling them
with non-node code.  This will make our dev environment more
consistent with prod (to avoid surprising bugs), plus it should
be faster (fewer AJAX calls).

This change also means we don't have to keep two copies
of static/third/handlebars/handlebars.js around.

(imported from commit d8d584b9aa13adcdcce7e424033610d77d2df79b)
2014-01-10 21:39:04 -05:00
Tim Abbott 795930c803 Add channel module wrapping our various JSON requests to the server.
(imported from commit 6489938678551ad8594822363ae6d1c9ae295496)
2013-12-19 16:52:47 -05:00
Tim Abbott 8c6ac1288d Add a couple more IP addresses to ALLOWED_HOSTS.
(imported from commit 472bfbb59169cea7a0730073319f262936c07185)
2013-12-19 16:52:35 -05:00
Tim Abbott b30afe432e Return a nice JSON error when CSRF errors happen in JSON views.
(imported from commit 916166c115f9b3ba0fdc93f8d917ff37ae22c2ae)
2013-12-19 16:48:51 -05:00
Luke Faraone 50e8d8b69a Specify default for EMAIL_GATEWAY_EXAMPLE
Otherwise the app would crash when it tried to build template context:

Traceback (most recent call last):
  [...]
  File ".../zerver/context_processors.py", line 23, in add_settings
    'email_gateway_example': settings.EMAIL_GATEWAY_EXAMPLE,
  File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 55, in __getattr__
    return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'EMAIL_GATEWAY_EXAMPLE'

(imported from commit 6cc5d3f150326a55230ea91e6c228ae9b1e19df3)
2013-12-18 16:25:10 -05:00
Jessica McKellar 6b64ef6be3 digest: log when we enqueue emails.
(imported from commit 1b34e05bc2eebedb818673a4c9a3944e1db15c6d)
2013-12-17 10:47:17 -05:00
Tim Abbott 827aa0e752 logging: Add a central log file that logs all errors.
(imported from commit a845c39be69330749475b8a8938bfb736198b953)
2013-12-16 15:59:35 -05:00
Luke Faraone 9329109391 Specify default for EXTERNAL_URI_SCHEME
Otherwise, build-enterprise-tarball FTBFS.

(imported from commit 14a9d9e843575e4b47a7bae5b6e618c207481fae)
2013-12-13 18:06:19 -05:00
Jessica McKellar b6e46986f0 Remove unused message_tour.js.
(imported from commit e25a9315377ad11d47ad78a5d466df40e306f713)
2013-12-12 11:47:09 -05:00
Jessica McKellar ebb0d82c83 Rename Humbug to Zulip in a few lingering places.
(imported from commit ed74de98ca01914318be10453544e9fb4fb981b4)
2013-12-12 11:47:08 -05:00
Kevin Mehall 662edc2558 [manual] Backend support for Android GCM push notifications
This adds a dependency on gcmclient:
http://gcm-client.readthedocs.org/en/latest/gcmclient.html

pip install gcm-client

or

apt-get install python-gcm-client

(imported from commit 9f1fbf1f793e4a27baed85c6f1aa7a7b03106a10)
2013-12-11 15:37:48 -05:00
Tim Abbott bd68884607 Fix documentation for email gateway on Zulip Enterprise.
(imported from commit 82e706b4e8e82df3044e5fc3df70e46b2183bc56)
2013-12-04 16:39:39 -05:00
Tim Abbott e5be713103 Clean up EXTERNAL_API_HOST usage and defaults.
We now have 2 variablse:
EXTERNAL_API_PATH: e.g. staging.zulip.com/api
EXTERNAL_API_URI: e.g. https://staging.zulip.com/api

The former is primarily needed for certain integrations.

(imported from commit 3878b99a4d835c5fcc2a2c6001bc7eeeaf4c9363)
2013-12-04 15:10:54 -05:00
Tim Abbott 9d8adba30c settings: Add some new IP addresses to ALLOWED_HOSTS.
(imported from commit e2794219b7393bc2513142e074b43513ba120e9c)
2013-12-02 16:03:21 -05:00
Tim Abbott b7d13d542c Cleanup our logging paths.
(imported from commit 2f72ee8e320a501b2e011784c005951ca341102d)
2013-11-26 10:46:25 -05:00
Luke Faraone 567c821cc0 Define empty AUTH_LDAP_SERVER_URI so it exists when we later do a check on it
(imported from commit 959ea2efde99f84c971ff1cd5947e3042d64ea96)
2013-11-25 19:14:36 -05:00
Luke Faraone a424281c89 Make LDAP propagation conditional on AUTH_LDAP_SERVER_URI not AUTH_LDAP_BIND_DN
Many deployments will not set AUTH_LDAP_BIND_DN , because they allow
anonymous binding. It is better for us to use AUTH_LDAP_SERVER_URI as a
signal for whether to use LDAP, since any deployment that uses LDAP will
set that local setting.

(imported from commit ad70bedfb572b42a9df954819593e2678729647b)
2013-11-25 19:12:51 -05:00
Tim Abbott 4d7b4b007a Fix sync_ldap_user_data log path.
(imported from commit 94b2b95461fda93443645cc7c714f84888fab6bb)
2013-11-25 17:53:48 -05:00
Luke Faraone 4a8ec7b357 Management command to update names from the LDAP database
(imported from commit 1e1b12c055926899fdca3e484df6c9437c800c6c)
2013-11-25 17:44:47 -05:00
Tim Abbott f59fb53662 enterprise: Add option to forward feedback to an email address.
(imported from commit 0ac9bb0427aeba60a8004953fedfdfdc6bbb587c)
2013-11-25 16:59:36 -05:00
Luke Faraone dff03fafda Use LDAP-provided information if available for real names
If authoritative data is available from say the LDAP database, we now
ignore the POSTed user name, and don't offer it as a form field.

We fall back to giving the user a text field if they aren't in LDAP.

If users do not have any form fields to fill out, we simply bring them
to the app without the registration page, logging them in using a dummy
backend.

(imported from commit 6bee87430ba46ff753ea3408251e8a80c45c713f)
2013-11-22 16:51:26 -05:00
Luke Faraone af02e45a17 [manual] Support authentication and profile prefilling via LDAP
The latter doesn't depend on the former; we can still fill in your full
name even if you didn't authenticate via LDAP.

This commit requires django_auth_ldap to be installed. On Debian
systems, you can do so via APT:
    sudo apt-get install python-django-auth-ldap

On OS X, use your favourite package manager. For pip, I believe this
will work:
    pip install django_auth_ldap

django_auth_ldap depends on the "ldap" Python package, which should be
installed automatically on your system.

(imported from commit 43967754285990b06b5a920abe95b8bce44e2053)
2013-11-22 16:51:26 -05:00
Tim Abbott 6c7489ed88 logging: Log management commands that are run.
This could potentially help with debugging exactly what happened with
some issue down the line.

(imported from commit cc7321d742875b644d4727a084b462dcd01dcf10)
2013-11-20 14:31:08 -05:00
Zev Benjamin 25c63f08de Use ujson instead of pickle for serializing event queues
(imported from commit 2d90574ae97cc973c9686c2bd557cc199d4b0850)
2013-11-20 14:25:36 -05:00
Tim Abbott d44c6636c6 Add setting to enable profiling of all requests.
This is useful for the occasional case where we cannot figure out what
is causing a particular problem, but it can be easily reproduced on
staging.

(imported from commit 8b51184a8b686814f2c6ff103ba355538463ceb0)
2013-11-18 18:05:19 -05:00
Kevin Mehall b78fa0857f Allow overriding the default avatar image
(imported from commit 66d413682a822e0019f28033f19908bdd9fa0156)
2013-11-18 11:48:53 -05:00
Kevin Mehall a63f4284f0 Allow enterprise deployments to disable the use of Gravatar.
(imported from commit 49c14cc7629f2ffe6cedaab5d42ad5bf7f6569a4)
2013-11-18 11:48:53 -05:00
acrefoot e77d534e78 remove ALLOW_ARBITRARY_SENDERS_LOCAL_EMAIL
(imported from commit 7a374959516d8505685466293f146d95094a7ea7)
2013-11-15 21:31:37 -05:00
acrefoot ccb7446d5c move Enterprise Email options into better places
(imported from commit f205c29b224f31474e2983c7f2bdb1ee5e2c754b)
2013-11-15 21:31:37 -05:00
Tim Abbott f941644099 Don't cache templates in development.
(imported from commit 986df6aecb7e638eb0e017654553e812ac6e0ed2)
2013-11-15 18:13:09 -05:00
Kevin Mehall fe0dcd4313 Disable camo on enterprise.
CUSTOMER13 doesn't want it, and there's currently no nginx config
or configurable Camo URI, so it wouldn't work if image preview
were enabled.

(imported from commit 615d4a32acbc4d4d590f88cf4e7d45d8f49db1d3)
2013-11-15 14:27:16 -05:00
Leo Franchi 7f2936a985 Allow enterprise customers to disable name changes
(imported from commit 1f2039f3e88a4ec0cc48dba75f714563c1de4af8)
2013-11-15 11:26:10 -05:00
Tim Abbott 66bbf40b5a Simplify deployment role configuration.
(imported from commit f9a9cf0ae33e7a74517255f944c91fa9aba14e33)
2013-11-14 13:01:51 -05:00
acrefoot 4a74425f37 derive DEFAULT_FROM_USER from EMAIL_HOST_USER
(imported from commit 2358f00a8eddb744392cd8f8f02cbed406e25013)
2013-11-14 12:57:47 -05:00
Tim Abbott c24addf2d5 Build internal bots in the zulip.com domain.
Otherwise do_create_realm can't actually send the notifications.

(imported from commit 4fa9a53f1d3d8a2e26d7b89401e7dfa77f2f7533)
2013-11-14 11:16:16 -05:00
Tim Abbott 870ae09aae Add setting for disabling inline image preview.
(imported from commit 2321390eb14cfe5701347861b9ae5ad6fdac0cbb)
2013-11-14 08:47:11 -05:00
Tim Abbott 7e64e19cc2 settings: Set ONLY_SSO to False when not enabled.
(imported from commit fcfe8462aae70dbdff55d245cfd5a6b723cd8378)
2013-11-14 08:19:20 -05:00
Kevin Mehall 15da532faf Don't include metrics.js on enterprise builds.
It throws an exception when the mixpanel library is not present. This
exception breaks emoji autocomplete, among other things.

(imported from commit 6ae2a69d40282701b8717b60d887836416c85a6c)
2013-11-13 18:35:12 -05:00
Luke Faraone 79bbb9b0d0 Add settings.ONLY_SSO which will be true if no other auth sources are enabled
(imported from commit 608cc32754ef8e4925995564b5e05a8ff9fd94c5)
2013-11-13 17:57:32 -05:00
Zev Benjamin fdc63b48d5 Add a setting for whether we're using SSO
(imported from commit 76b450d9ebba2828a63f08be61a3b998a1cd7680)
2013-11-13 16:57:00 -05:00
acrefoot f5199081d5 Add the deliver_email management command
This command should be run continuously via supervisor. It periodically
checks for new email messages to send, and then sends them. This is for
sending email that you've queued via the Email table, instead of mandrill
(as is the case for our localserver/development deploys).

(imported from commit a2295e97b70a54ba99d145d79333ec76b050b291)
2013-11-13 16:41:36 -05:00
acrefoot f7b5a10da0 [schema] Add ScheduledJob table, and update mandrill related code
ScheduledJobs with type Email displace the usual mandrill codepaths
in the Zulip Enterprise deploys

* Email-specific helper functions will appear in deliver_email.py
* 0058_auto__add_scheduledjob.py

(imported from commit 8db08d8a279600322acfdbed792dc1a676f7a0ab)
2013-11-13 16:41:36 -05:00
Kevin Mehall 98caa8eaf1 Add option to disable error reporting
(imported from commit 3621aa6e7a5badd21b22891026285099db393df0)
2013-11-13 16:22:21 -05:00
Kevin Mehall 08cc6378af Remove old email error reporting handler
Broken out into an independent commit for easy revert if necessary.

(imported from commit d83619c431a0e656f2e644d1eccb156a63c2169c)
2013-11-13 16:22:21 -05:00
Tim Abbott c66556381a Set the ADMINS to be the ZULIP_ADMINISTRATOR by default.
(imported from commit 6ff4e611bb2e145e49ea6f477d79415816372a16)
2013-11-13 15:35:45 -05:00
Tim Abbott 7d61a57822 Change HOME_NOT_LOGGED_IN if SSO is the only auth enabled.
(imported from commit a6b41a83d53ac1a87547f005c26ea970fe7508f6)
2013-11-13 12:07:15 -05:00
Tim Abbott 6bcd5a7ffc Update installation instructions to include configuring the app.
(imported from commit 89395815c32416ec0636efcff12eb76f5d890bbd)
2013-11-13 12:02:50 -05:00
Tim Abbott 939cd864eb Fix postgres configuration to use local socket.
(imported from commit 1835e712b2fe4578cf6381891844bb3abe2b767e)
2013-11-13 12:02:50 -05:00
Luke Faraone a7237938c8 Set FEEDBACK_TARGET for enterprise case.
(imported from commit 478033bf3eefb8406d93fb2f0225420812dee7b0)
2013-11-13 12:02:49 -05:00
Tim Abbott cb9931110f Automatically configure EMAIL_GATEWAY_BOT as a superuser.
(imported from commit 1e74ae458e446edec59eb1ab238cede969c4dbbc)
2013-11-13 12:02:49 -05:00
Tim Abbott e18a08c69e settings: Move hardcoded API super users into local_settings.py.
(imported from commit fea7550a771c837db0fb948238488f778bedf73a)
2013-11-13 12:02:49 -05:00
Leo Franchi 300cceb3e4 Create feedback bot in enterprise installs
(imported from commit 0c0a6919bd29e12484d520f80789b39b203099b0)
2013-11-13 11:18:03 -05:00
Leo Franchi 306ce65ea3 Only create initial passwords for local dev setups
(imported from commit 2ef33ebbab0fe21486acbb1a3a78ed434abac2db)
2013-11-12 22:42:05 -05:00
Tim Abbott 966fde261a puppet: Rename local_server => enterprise.
(imported from commit 5faa269df5937f6db99098e44aaea7d0a4f2c14a)
2013-11-12 15:57:02 -05:00
Tim Abbott 5293cdebe8 Rename LOCAL_SERVER to ENTERPRISE.
(imported from commit 7edf353eefe6c9e7aac74b7bbc37b923cac1b913)
2013-11-12 15:57:01 -05:00
Tim Abbott 5d5e662c08 Disable event logs on local server.
(imported from commit eafbd645ae7ce8d868de2fb8c6548325a05b1340)
2013-11-12 15:57:01 -05:00
Kevin Mehall e6ca5d265d Include handlebars templates in build-local-server-tarball
update-prod-static needs DEBUG=False. This also replaces our
local_settings.py before generating anything included in the tarball.

(imported from commit 890cd9d1a44acfd2c20e1662e0c68132c633d1b3)
2013-11-12 15:50:07 -05:00
Zev Benjamin 32ed5f9f42 Move flushing the display recipient cache to its own middleware
(imported from commit 27a6935a5830ef986b18de169d66dd86d273d064)
2013-11-12 15:24:30 -05:00
Leo Franchi cc2d17d7c0 Allow omission of EMAIL_GATEWAY_BOT and stream emails
(imported from commit 51412d2a46bbacd6537ef892e7b6bdf33ac94079)
2013-11-12 10:32:34 -05:00
Tim Abbott 4b86d2a03b Don't require LOCAL_DATABASE_PASSWORD on local server.
(imported from commit d2bdd25ba9d472cb7cff3fa344cf0d7bb2799c6a)
2013-11-12 09:38:43 -05:00
Tim Abbott b0dc882f7e localserver: Add support for not having an APNS_CERT_FILE.
(imported from commit 42d8caebb3035bd9e6e19db6359cc33e8ab4f317)
2013-11-12 09:34:25 -05:00
Tim Abbott 828917cac8 Enabled the Django cached template loader.
This was recommended by:

https://docs.djangoproject.com/en/dev/howto/deployment/checklist/

Since we don't change our deployments without restarting Django and
don't use any custom template magic, this should be a free performance
win.

(imported from commit fd498ab97d0669c3a14b342b2d2f01994a1f1ee1)
2013-11-08 15:36:31 -05:00
Tim Abbott 98ad49c866 Use persistent connections to our database.
I figure we can start with 600s as a maximum age -- our threads do
many dozens of requests per minute, so I figure we'll get most of the
benefit of permanently persisting connections this way.  I could also
be convinced to do just 60s, though the impact will likely to be less
visible on staging.  600s seems to be what Django originally had for
this parameter before they disabled it by default.  See:

https://groups.google.com/forum/#!msg/django-developers/rH0QQP7tI6w/yBusiFTNBR4J

for discussion, which also suggests we might have issues with
runserver that we should watch out for.

(imported from commit 0ae09fa4f1b39cc88c76fa58258aaf20ab168dcf)
2013-11-08 15:36:31 -05:00