Commit Graph

834 Commits

Author SHA1 Message Date
Tim Abbott e79805847b Rename the 'new_zephyr' argument to the more descriptive 'content'.
(imported from commit b47e2c4823bbfbf2f94cbafb24ed5d78dfbe841b)
2012-10-02 17:29:55 -04:00
Keegan McAllister 5fe3787ded Maintain one layout-setting row at the top of each table
(imported from commit b375ea78d79ca39b486d124256d0d4e89558d83a)
2012-10-02 17:21:20 -04:00
Tim Abbott 1356bd336a zephyr_mirror: Rewrite to use the API.
(imported from commit 6d3bce15eb045f28897abb6ddcdbea8e10629a7d)
2012-10-02 17:19:42 -04:00
Jessica McKellar 52327a0484 Give a more accurate error message on new subs from home view.
(imported from commit 5521e27ad63717d5a8ba325172726619bc8114cf)
2012-10-02 17:17:27 -04:00
Jessica McKellar f54d1d16cc views: remove unused variables and imports.
(imported from commit 9f421867caac561556e47ce79528432fe1b3b2dc)
2012-10-02 17:17:27 -04:00
Jessica McKellar 555acb1e62 models: remove unused imports.
(imported from commit 97855ff47a6a1d58e0d0f5bad4613504437150c3)
2012-10-02 17:17:26 -04:00
Waseem Daher 9fd3d79118 Ellipsize long huddle names, too.
(imported from commit 6e3dc5fa50323b23d5e07e906ab8e84f8170f50c)
2012-10-02 17:13:22 -04:00
Tim Abbott be1a890a09 populate_db: Restore users' pointers to last after database resets.
(imported from commit d6c5a58173602e7e07b6851a6d22ed129b4f3733)
2012-10-02 16:58:13 -04:00
Tim Abbott 5a5b5de650 Rename /api/v1/get_updates to /api/v1/get_messages.
(imported from commit f856637158cf9fda64ba333b532a5941de8fcbab)
2012-10-02 16:29:34 -04:00
Tim Abbott 8319a938e1 Refactor how the API handles options.
(imported from commit caff4a0b8b2d88e5e60fe3a7727b6d4ac5f63bd0)
2012-10-02 16:21:34 -04:00
Tim Abbott 78dae6a11d Add tool to replace the production server's database schema.
(imported from commit 2aeab792275e43549f3644875a5c360b0f0582a1)
2012-10-02 16:17:48 -04:00
Keegan McAllister b8236b5a60 Remove unused imports
(imported from commit 3f9c19a73028b86d386df90c0ffafa33168482e1)
2012-10-02 16:14:42 -04:00
Waseem Daher 61c7558b65 Long class and instance names get auto-abbreviated.
This required some serious retooling of the table,
and some thinking about the interactions between
table-layout: fixed and colspan.

And some of it is still a little magic-number-y.
(Like that 97% width on zephyr_compose_box -- without
 it, the stream compose box looks weird in Chrome,
 but not Firefox.)

(imported from commit 20c426ad2dae5efa3107890b28976a957bb3d1e3)
2012-10-02 16:00:46 -04:00
Jessica McKellar abb47a6a7d Fix bad class name comparison in add_zephyr_metadata.
(imported from commit 7e03ba4a4b3b8af5b080a273a0b480743b1b7e90)
2012-10-02 15:58:17 -04:00
Tim Abbott 18a3888373 [schema] Add an API for sending/receiving messages.
(imported from commit 209d525dc5892fc4c392a8ced1588c838cbb17c4)
2012-10-02 15:49:25 -04:00
Tim Abbott 60cb2daab7 zephyr_mirror: Move to the API subdirectory.
(imported from commit cea9809770e66ceb7baf63c444715e01ed97aa8c)
2012-10-02 15:49:25 -04:00
Luke Faraone 4dcde9b11a Unescape Zephyr content before wrapping.
Now we no longer have weird wrapping based on the length of escaped lines.

(imported from commit fa2c9bc0903e22858acc2af4cd6be34e28ea25db)
2012-10-02 15:20:20 -04:00
Jessica McKellar 33ad7817a4 Require that the first character of a class be a number or letter.
(imported from commit a4d1c23f784107198045aee7cec1f53ab5114762)
2012-10-02 15:16:26 -04:00
Jessica McKellar ec36170511 Fix buggy class name validation regex.
A-z != A-Z. The former permits problematic characters like "\".

(imported from commit 2bcda8683e630eaa6cbc3a2b9d0bda7a8448a8fa)
2012-10-02 15:16:26 -04:00
Jessica McKellar 588db5b4c5 Make class names case-insensitive.
(imported from commit e76e50156ca8dab1f7b3124351997e75ef08e521)
2012-10-02 15:16:26 -04:00
Luke Faraone 0c47459733 Also escape &s.
(imported from commit 8a76089492b0e7f7ff2635e7091485db2d7292c4)
2012-10-02 15:11:55 -04:00
Luke Faraone f2b7d08191 Treat newlines in humbug messages as line breaks, a la StackOverflow/Github
(imported from commit d200d24fec80be5702760dda229295125142e9b2)
2012-10-02 14:31:18 -04:00
Luke Faraone cb76dfe59c Unescape Humbug→Zephyr messages.
Previously, messages containing "<" or ">" would show up HTML-escaped when
forwarded to MIT zephyr.

(imported from commit 9ce6f819878f80ee9c2fe438d02a5e25807e4201)
2012-10-02 14:31:18 -04:00
Tim Abbott f7689d400f zephyr_mirror: Improve retries for forwarding back to MIT.
(imported from commit b8a4b3b9d0d27eae1e604db2c308b109009278d6)
2012-10-02 14:08:00 -04:00
Waseem Daher a200edb6ed Tighten up space between messages.
(imported from commit 83989506282dab220f68bbd3d9612db044e73320)
2012-10-02 13:26:51 -04:00
Tim Abbott 45c22c95af generate-fixtures: Remove zephyrdb.test each time.
(imported from commit 08bd0abcbafd8e6277dcd190b0fef1b9cc0f2da5)
2012-10-02 12:02:43 -04:00
Tim Abbott 339489a81e Add missing test-settings.py.
(imported from commit 85aeb41471dfe63cd6d6093b3388f949e30d72a3)
2012-10-02 11:58:31 -04:00
Luke Faraone 729d3ac602 Fix registration test, now exercise the email sending and verification code
(imported from commit 62979bbfec107ba53a9209c0fe115ce08ffd0e58)
2012-10-02 11:47:28 -04:00
Jessica McKellar 2f1a3dd39c Don't allow empty class/instance/recipient/message on zephyrs.
(imported from commit 2f8e6e0d6a2f046208f5d10d495e50d72197f79f)
2012-10-01 18:14:27 -04:00
Waseem Daher 2873e45b3f Tweak signup email text slightly.
(imported from commit 4f8427a731376d7e9d5eb387673324bb25141743)
2012-10-01 18:05:01 -04:00
Tim Abbott e9d5532a41 Make the test suite faster.
(imported from commit 7baf86f0d615f05eec9873b84cf4c88476798895)
2012-10-01 17:58:40 -04:00
Tim Abbott 029ae76a4a Fix some of our get_updates tests.
(imported from commit 250411476c6fc71cff868b16a2ab766d81c4b6b3)
2012-10-01 16:58:41 -04:00
Keegan McAllister ae228a9a70 Remove unused get_all_zephyr_rows
Arguably incorrect in the multiple-tables world.

(imported from commit 6902972a12c6484e78750d055292510d9637cf42)
2012-10-01 16:42:00 -04:00
Luke Faraone 9f80a2f6b3 /accounts/register now returns bad request; can only be POSTed.
(imported from commit a7cf361c43fc41fdd47a58a92afa484c25c4417d)
2012-10-01 16:03:00 -04:00
Jessica McKellar 28e668bb46 Handle home view subscriptions error cases.
(imported from commit 7f31b5c4837c524c3ad5a0538ca1f01ad73141a3)
2012-10-01 15:36:10 -04:00
Jessica McKellar 8727b1667c Check if a class name is valid when checking for existence.
(imported from commit f4de50b52c851058b736033d447ea7fa6777a3d4)
2012-10-01 15:36:10 -04:00
Luke Faraone 160744788a Disable hotkeys when preparing a huddle after clicking on a username.
(imported from commit a27ed2734dc3e8ca1a9a1aba8f672c10a6a6fb92)
2012-10-01 15:20:25 -04:00
Luke Faraone 036d25b6bd Configure email through Gmail
(imported from commit 45fdfa4310f94c9e04dc1710dcb291003c1cc0f5)
2012-10-01 15:03:59 -04:00
Keegan McAllister 4bd3f009c0 Prepend to zephyr_array if where === 'top'
(imported from commit f1150f36bedd07275749ca7c8dfd84296ebc9438)
2012-10-01 15:03:16 -04:00
Tim Abbott c36790c7ba zephyr-mirror: Fix race where we'd miss some messages.
(imported from commit b807bf3a487fa67ad4bceece37d899a0b13c4418)
2012-10-01 14:48:04 -04:00
Tim Abbott 864a51f424 Force all zephyr mirror users into @mit.edu domain.
(imported from commit 58c9038164d7bddbb4c0d4d27582580448ae8cdc)
2012-10-01 14:36:12 -04:00
Tim Abbott 720813ea7b Print timestamps to zephyr mirror console.
(imported from commit 9aacfc5384d70cd627e78577c4f8ef3d25fc7942)
2012-10-01 14:36:12 -04:00
Tim Abbott ce979592b0 Don't send zsigs to the Humbug server.
(imported from commit 376dcda28063466de3dbc3a461130218bfd49d7b)
2012-10-01 14:36:12 -04:00
Luke Faraone aca5cef3eb Redirect to login when attempting to resignup with a used email address.
(imported from commit d58a5dda9a0af409a6ee57cfcd30be45020352d2)
2012-10-01 10:45:58 -04:00
Luke Faraone 50dfbf7a1b Implement confirmation for new user signups.
We add a few templates for django-confirmation. We define a
"PreregistrationForm" which is validated by accounts_home, which then
generates a confirmation object and emails the user. This required creating
a new table for a PreregistrationUser with an email and status (confirmed)
field.

The register function now no longer accepts a "email" field in the form
and deals only with confirmation IDs to determine the email used to sign
up a user.

(imported from commit 4fcde04530aa7ad4de84579668daee7290b424ac)
2012-10-01 10:45:58 -04:00
Luke Faraone ece9d64d34 Remove expiry; confirmations should never expire.
(imported from commit 093d8fa266c0ceeaff8c15257194d23a1ce90b61)
2012-10-01 10:45:58 -04:00
Luke Faraone 5531f188c7 Include confirmation key in context object.
This way our templates can reference the confirmation key later.

(imported from commit 4d57e1309386f2236829b6fdf4e4ad43c5b125c8)
2012-10-01 10:45:58 -04:00
Luke Faraone b801b50c26 Include third-party django-confirmation library.
Taken from http://code.google.com/p/django-confirmation/.

Code is under the BSD 3-clause license.

(imported from commit cfb5a511097fe14fba7f1bcea62dfa25cfb58622)
2012-10-01 10:45:57 -04:00
Keegan McAllister 5556bdd0a1 Put the type conversions back into return_messages_immediately
This had broken the check 'if last == -1'

(imported from commit 2154dbda696d72ea14c841f43511846a87e4ba0d)
2012-10-01 10:14:47 -04:00
Luke Faraone 1467901f1a Include a favicon for the Humbug app.
(imported from commit 3481d7f3c06ec0c656e15d147f46faf9cd99837a)
2012-09-29 21:31:57 -04:00