Commit Graph

201 Commits

Author SHA1 Message Date
Tim Abbott ae615dfb4d Rename humbug => zulip in some settings.
(imported from commit 4d10e6213cf828f16b833ecba98b950972c32442)
2013-08-07 10:00:08 -04:00
Tim Abbott 2db6dc6c88 Change humbug => zulip in populate_db variables.
(imported from commit 14f8e072fd87478e8877925912fde113a75aba2c)
2013-08-07 10:00:08 -04:00
Tim Abbott d6e32668c8 Change Humbug => Zulip in name of exception filter module.
(imported from commit 87d4a45834f605a83fa5f9286217258dafaa1b92)
2013-08-07 10:00:07 -04:00
Tim Abbott d63a398716 Change Humbug => Zulip in name of error limiter module.
(imported from commit 55c5deba463faecc50da22e9745fd13ad8b11fd8)
2013-08-07 10:00:07 -04:00
Tim Abbott 6083ad7244 Change Humbug => Zulip in name of finder module.
(imported from commit 2f5391da2c3ce667531a3c6155c759309b9249f5)
2013-08-07 10:00:07 -04:00
Tim Abbott 034c96ef77 Change Humbug => Zulip in name of storage module.
(imported from commit 37d7994b36e5140962866d5c11d98ca05ad15d62)
2013-08-07 10:00:07 -04:00
Tim Abbott 3a470aa9c7 Change Humbug => Zulip in names of error reporting handlers.
(imported from commit 12e5486321303c80f6676c1f516ff35c3dcb676d)
2013-08-07 10:00:07 -04:00
Tim Abbott e111a2f9a5 [manual] Rename Django app from zephyr to zerver.
This needs to be deployed to both staging and prod at the same
off-peak time (and the schema migration run).

At the time it is deployed, we need to make a few changes directly in
the database:

(1) UPDATE django_content_type set app_label='zerver' where app_label='zephyr';
(2) UPDATE south_migrationhistory set app_name='zerver' where app_name='zephyr';

(imported from commit eb3fd719571740189514ef0b884738cb30df1320)
2013-08-06 07:39:36 -04:00
Tim Abbott 6dd049fa26 Rename zephyr.js to zulip.js.
(imported from commit e62aa374f1bf2e75cebc00d0bba4e3ade82d19f6)
2013-08-05 17:59:04 -04:00
Waseem Daher c16651bf23 [schema] Add referral system
For now, we just get emails about referrals that we have to follow up
on manually.

I don't love using the name "referral" in some places and "invite" in
others, but we already use the verb "invite" to mean something else
and "invite" is a canonical noun.

(imported from commit 0814c18395952fcdef234c1584984f71ca1b6f37)
2013-08-05 17:14:51 -04:00
Steve Howell b33858dd70 Created search_suggestion.js.
Moved 400+ lines out of search.js into search_suggestion.js.  This
leaves search.js primarily responsible for lots of little DOM
interactions, whereas search_suggestion is more about data.

(imported from commit 53d08b29367c0172e483064f213538d45098279e)
2013-08-02 17:28:03 -04:00
Waseem Daher 86cf40c8a9 Move feature_flags into its own file.
(imported from commit b775f85a24422d236b0079810b98b6b984cb60a2)
2013-08-01 13:00:15 -04:00
Steve Howell 032415fcb4 Move bot avatar code to avatar.js (from settings.js).
This step of the refactoring really just moves the code.

(imported from commit 4d551c43d25723b2556448f47b6b61228e782f54)
2013-07-30 08:40:49 -04:00
Scott Feeney 6f0530ec46 Include Underscore in our "common" js bundle
This way it can be used throughout our JS, not just inside the app
proper.

(imported from commit 2bd97534cb7a3e433918747f0e397786fdfc4d2b)
2013-07-29 15:33:23 -04:00
Steve Howell 09bd52fff4 [third] Add underscore.js
(imported from commit ee17cc1d1dff2a6f816a81bb33fa04ca5562a441)
2013-07-29 13:47:56 -04:00
Tim Abbott 3bba0cc927 Move zephyr/static to just static.
It's not really a part of the server (aka the rest of zephyr/).

(imported from commit 27f6b6b064938ad927075a68d873e4b68710d279)
2013-07-29 12:11:26 -04:00
Tim Abbott 1e71d91455 Fix pipeline configuration for development environments.
Our code happened to work under python-django-pipeline <=1.2.7, but
newer versions correctly looks whether the files exist under
STATIC_ROOT, so we need to set STATIC_ROOT correctly.

(imported from commit ef48a75e0f6a4adae742dd1fd386a48e630f1850)
2013-07-29 12:10:54 -04:00
Tim Abbott ffc2f05cbb Rename zephyr.css to zulip.css.
(imported from commit 094580c1563fa05ecff58d6fb86bf2338a32b1a6)
2013-07-29 12:10:54 -04:00
Tim Abbott ab74c5d0d2 Add error handling for process_user_activity bot.
(imported from commit 367e2c76d1d6de634bbbb70c9b1c1b8c82027c9e)
2013-07-26 16:06:59 -04:00
Steve Howell 625003cbe1 Nudge pointer past visited msgs when coming home.
When you return to Home, we normally restore your last
position when in Home, which might have been before the
first unread message.  This is cumbersome for sidebar readers,
so now we keep track of messages that you visit while on a
tour away from Home, and when you return Home, we skip forward
any messages that were in the tour, landing on the last visited
message.  This all happens before rendering.

(imported from commit 9124a231d94f153e283e5ea95e40c50a58406275)
2013-07-26 14:03:55 -04:00
Steve Howell fad259d75d Move code from hotkey.js -> navigate.js.
Created up, down, page_up, page_down, to_home, and to_home pretty
mechanically from the old hotkey.code.

(imported from commit 5956b91c2e0122c6440f70db9b92f918c9b599aa)
2013-07-24 23:39:35 -04:00
Tim Abbott 9132baacc2 Update settings.py for our current app server hostnames.
(imported from commit a8f72faf2c0204c2e86d641da5eb81b57e935183)
2013-07-23 14:26:33 -04:00
Waseem Daher 32fd11c74c Restore "Font Awesome" inclusion in the portico.
(imported from commit 0e49205a995d4b52ab1170eaf96b49d4cab47515)
2013-07-23 13:38:20 -04:00
Jessica McKellar 4d19c784d8 Switch from the @humbughq.com to @zulip.com addresses users can contact.
In particular support@ and jobs@.

(imported from commit 8051ae5628b7378cde49b160d26b704e7e14bb24)
2013-07-15 17:49:00 -04:00
Luke Faraone bb0a7c8fc3 [manual] Switch various configuration files to refer to .zulip.net.
We only want to change cases where we're talking about the hostname; HTTP
requests should still go to staging.humbughq.com for now.

Before this commit is deployed the hostname of staging.humbughq.com should
be changed to staging.zulip.net on the VM.

(the same for prod)

(imported from commit 7412530773f720ac227f40061c9ddb1a851e19bb)
2013-07-15 16:49:55 -04:00
Leo Franchi e5b855d883 Add a bulk invite page for the first user in a realm
(imported from commit cf85c9d475209da4591e2f06f142008fb19ac9d5)
2013-07-12 13:07:02 -04:00
Scott Feeney 2c33320746 Reuse minified JS from previous deploys
This is a big change affecting lots of areas:

* Pipeline no longer deals with JS (though it still minifies CSS)
* A new script, tools/minify-js (called from update-prod-static),
  minifies JavaScripts
* A command-line argument --prev-deploy, if passed to minify-js or
  update-prod-static, is used to copy minified JS from a previous
  deploy (i.e., a previous git checkout), if the source files have
  not changed
* update-deployment passes --prev-deploy
* Scripts are now included with the minified_js template tag, rather
  than Pipeline's compressed_js

Also, as a side benefit of this commit, our Handlebars templates will
no longer be copied into prod-static/ and accessible in production.

Unminification is probably broken, but, per Zev and Trac ticket #1377,
it wasn't working perfectly before this change either.

(Based on code review, this commit has been revised to:
 * Warn if git returns an error in minify-js
 * Add missing output redirects in update-prod-static
 * Use DEPLOY_ROOT instead of manually constructing that directory
 * Use old style formatting)

(imported from commit e67722ea252756db8519d5c0bd6a421d59374185)
2013-07-12 11:59:04 -04:00
Scott Feeney c42bf9b9b2 Refactor popovers into their own file
(imported from commit 36ad3c61e4d7eb05751f9b886d15edceab656d71)
2013-07-08 18:53:03 -04:00
Luke Faraone 9a866ce5be [schema] [manual] Add django-guardian to INSTALLED_APPS
On a Debian/Ubuntu system with the Ops repo installed, you can add this
dependency by running:
    sudo apt-get install python-django-guardian

We use a slightly modified version of the package, so users of other
systems should manually download the source from my GitHub fork and
install it as they would any other Python library:
    https://github.com/lfaraone/django-guardian/archive/lfaraone-noanon.zip

guardian uses South for migrations. To apply the guardian schema to your
database, run:
    python manage.py migrate guardian

(imported from commit 12eaf4ded91e180c3245a44bacfb5b98b660147d)
2013-07-08 17:07:55 -04:00
acrefoot fdb597b4d3 v1 Emoji autocomplete
(imported from commit 0b0d4b004936ce4abc37f44317aec414451f3a8e)
2013-07-08 15:26:39 -04:00
Steve Howell edc718951c Use same CACHES/SESSION_ENGINE settings in dev as in prod.
(imported from commit d45ec576bd0a87b9da0c1a7f7e0a002091d728ff)
2013-07-03 13:31:27 -04:00
Luke Faraone b1b2af9b2a Add ZULIP.COM and subdomains to ALLOWED_HOSTS
(imported from commit 94e28b5973f4d83ee4f63dbae7c8def0c36b9160)
2013-07-02 11:21:43 -04:00
Luke Faraone cf81c46c77 Omit fonts.css on QtWebKit clients
QTBUG-3467 prevents non-normal-face @font-face fonts from being used when
defined as such in CSS. To work around this, the desktop applications now
ship the Humbug font themselves, and this commit causes the server to no
longer send the problematic CSS rules to those clients.

We have some duplication insofar as we now have two minified CSS files, but
this is better than conditionally applying the CSS at page runtime.

(imported from commit 9a887f9fb8002d44171d366d1249ebbf21cc9c77)
2013-07-01 14:37:58 -04:00
Steve Howell 0da7ead83d Add FormData shim for IE (used in bot avatar uploads).
(imported from commit 41cd090768c1299db3ca0d154ee5495802302a9f)
2013-07-01 11:27:36 -04:00
Scott Feeney 83cd963c49 Remove unused imports
(imported from commit 9e3050c72a2d1137b9096c6cfa1c3945341b9a56)
2013-06-27 16:22:39 -04:00
Steve Howell 660ee6571d Disable embedly everywhere.
(Before it had been disabled only on prod/staging, but we are
removing it everywhere, motivated by making tests run faster.
In particular, the call to embedly_client.is_supported() was
expensive, as it went over the Internet.)

(imported from commit ea12bf6e7ae84ce7e8023a0d314ecc4c07cbc0a8)
2013-06-25 08:46:02 -04:00
Scott Feeney 6b8bc74b4e Replace SITE_ROOT with DEPLOY_ROOT
Whereas `SITE_ROOT` referred to the directory where settings.py is
located, *all* actual uses of `SITE_ROOT` were joining it with `..` to
get the root of the git checkout, a much more useful value.

`DEPLOY_ROOT` now represents the root of the git checkout.

(imported from commit 351437f9a5801e5c7c08a3a97619e863144e5cc8)
2013-06-24 15:55:03 -04:00
Scott Feeney fcb39a262c Add note that DEBUG must be off for cache-busting
(imported from commit 2f14af77fcf95835f7f31b15048f417e8a5682a4)
2013-06-24 15:55:03 -04:00
acrefoot a37b08db58 In-Browser Notifications
Some browsers don't support desktop notifications. Some people haven't allowed permissions
for humbug to have desktop notifications. This is a poor man's attempt at desktop notifications.

We are adding the bootstrap-notify package (http://nijikokun.github.io/bootstrap-notify/)

Resolves Trac #1336.

(imported from commit 6a54f7d1875e765dabd32d94ada8ebe4474a3d71)
2013-06-21 11:44:25 -04:00
Scott Feeney eb3281b193 Update a comment mentioning PipelineCachedStorage
(imported from commit 7b4029db2831538e3077a2f090804da418e13d38)
2013-06-20 16:20:52 -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
Zev Benjamin a9e4441bee [manual] Serve static files from the same location across prod deploys
This only affects DEPLOYED installations.

This does not take care of removing old versions of static files from
that directory.  The problem is that staticfiles is clever and
doesn't copy files that are already there, so we can't depend on
mtime for detecting which files we no longer need.  Hopefully that
won't be too much of a problem for now.

(imported from commit 4341460dd5bc6544086fd445014ebdac58192910)
2013-06-12 17:46:38 -04:00
Zev Benjamin 614b5396a6 Collect static files directly in the location that will be served
We exclude the original source files for minified files by using a
custom Finder.

(imported from commit a6a25eb6146da53167b71c6d1c44588f75966059)
2013-06-12 17:46:38 -04:00
Zev Benjamin 33fed064e2 Prepend the minified static file header using a custom Storage class
(imported from commit 2b67a6d94de1693bdb8a91f455b92375692f4c41)
2013-06-12 17:46:38 -04:00
Steve Howell d740d7c082 Show user-uploaded avatars on the website.
Show user-uploaded avatars on the website for users who have
UserProfile.avatar_source == 'U'.  (Continue to show gravatars
for other users.)  This includes the home page, the visible-phone
div, and the settings page.

This fix does NOT address a few things:
* There is no GUI to actually upload user images yet on the website.
* The !gravatar syntax in bugdown will continue to show gravatar images
  only.
* We are not changing identicon behavior.

(imported from commit 9f5ac0bbe21ba56528048233aab2430e4dd431aa)
2013-06-12 15:34:51 -04:00
Steve Howell 01372b1f9a Configure S3 buckets for avatars.
(imported from commit 1da135a8cf62e204440e14043e148716ec103c51)
2013-06-12 15:34:51 -04:00
Steve Howell e753fd8088 Simplify setup for Humbug internal users.
I moved the list of internal users out of populate_db.py and
into settings.py, and I removed some dead code related to sqlite.

(imported from commit 1e080716dc296c05f51cdd229911082469de64bd)
2013-06-12 11:42:18 -04:00
Zev Benjamin 05d2fca93b Only email or Humbug on Django errors if the app is actually deployed
(imported from commit bf495eb3b0bab9a8fad7a4bc55476e7ec7e3c8d1)
2013-06-10 14:59:29 -04:00
Zev Benjamin e6a98dabce Rename 'inapp' logging handler to 'humbug_admins'
(imported from commit f789616ee6be983ec8a1fd21db3def1ff9ad3b63)
2013-06-10 14:59:29 -04:00
Zev Benjamin 7d999160ab Move logging rate-limiting code
The new file can't be called logging.py because then it would be
annoying to import the system logging module within it.

(imported from commit 71d116e4be98d45b09dda049a43142a82647b727)
2013-06-10 14:59:29 -04:00