Tim Abbott
1d55c06ede
Move mit_sync_table code into the correct process.
...
(imported from commit bc40f865f94d7b39db5e49eba09370c3fa53dc6f)
2012-10-17 22:35:02 -04:00
Keegan McAllister
b9e9938197
create_user_if_needed: Use proper initial passwords
...
(imported from commit 009208ac64548dd6f8773ccc7738ab0c391d816a)
2012-10-17 21:08:59 -04:00
Keegan McAllister
4f56362e0f
Change formatting of notify_new_message request
...
The requests library doesn't encode repeated key form data reliably.
(imported from commit 3cc9f5379c299a57f69bb5b7ff3b85f0c066269f)
2012-10-17 18:24:15 -04:00
Keegan McAllister
91209f9304
Get initial server generation from first get_updates result
...
Embedding this in index.html won't work anymore, because the Django FastCGI and
the Tornado servers might have been started at different times.
(imported from commit 187909d0593449cf2989857671f9ca526723e451)
2012-10-17 18:24:15 -04:00
Keegan McAllister
a545876d56
Rename notify_waiting_clients -> notify_new_message
...
We might have other URLs for other notifications.
(imported from commit 4c1c5fe2f039816fef4c268f34692ca4f19d81e8)
2012-10-17 18:23:01 -04:00
Keegan McAllister
5e70b5a291
Split off the Tornado code into a separate process
...
(imported from commit 95dbd0f438cdba06d6e6c6c539a2a3d49c577cfd)
2012-10-17 18:23:01 -04:00
Zev Benjamin
2ade66bf3e
Remove stale comment
...
(imported from commit c880fc2f543e3f0cdfd531c968a1e77249c04f4c)
2012-10-17 18:17:43 -04:00
Tim Abbott
bff0046c51
Fix client continuously calling get_updates when a reload is pending.
...
(imported from commit 2c29c8b892e7843f4d75178cc683bf48f7a5cdf5)
2012-10-17 17:46:07 -04:00
Waseem Daher
49a8677517
Remove 'timezone' from the settings page.
...
We weren't doing anything with it anyway, so...
(imported from commit ad927f3d2ce5b9bd219d6f36a021542812486aef)
2012-10-17 17:26:55 -04:00
Waseem Daher
d9715825b1
Remove 'short_name' from the settings page (but not the db).
...
For now, we're not using this, so let's expunge the user-facing
references to it.
(imported from commit 90a8dcdc77d0a991bef3e319e6971327639d1f4e)
2012-10-17 17:26:06 -04:00
Tim Abbott
758bbe6fc9
Rename api_fetch_key to api_fetch_api_key to match json methods.
...
(imported from commit ed1c33f5017426dd38882c06ac38343451edb94b)
2012-10-17 17:13:33 -04:00
Tim Abbott
ae3e24458c
Add a UI for requesting your API key.
...
(imported from commit 07c40caf73f3b6c1c502a6c8e18109532dd28cc3)
2012-10-17 17:09:46 -04:00
Luke Faraone
716badc2c6
Don't reference GET if we now require post.
...
(imported from commit b78b62e81b4064f53c1a83a68e0b7e67a08230b5)
2012-10-17 16:52:30 -04:00
Luke Faraone
6c3a328426
API key fetching should happen over POST, not GET.
...
(imported from commit 351d0035a55f49f00693081584d882c1aef7dd01)
2012-10-17 16:36:49 -04:00
Luke Faraone
12bad46740
Introduce API method to return a user's API key by logging in.
...
This makes it easier for mobile clients to use the API by enabling them to
present the user with a familiar username / password prompt, rather than
by asking them for their API key.
(imported from commit 6ed06cfe86f87e7aef54a4be7835fb7bf8d7f209)
2012-10-17 15:33:05 -04:00
Tim Abbott
7237b4a73e
Fix sending to a stream with a space in its name.
...
Previously if you tried to send to "a b", we actually ended up trying
to send to "a%20b", since we were url-encoding the stream name and
then not properly decoding it.
(imported from commit 307d2999bd309e47fc654ae4422ab4372edde064)
2012-10-17 14:06:00 -04:00
Keegan McAllister
81f0d61c3b
Factor out Gravatar hash calculation
...
(imported from commit 29872722fb4856773d98fc987a1e2d6eb99ad8b2)
2012-10-17 01:09:16 -04:00
Tim Abbott
539c3abbab
@asynchronous needs to be the outer wrapper.
...
(imported from commit 24b8f157d600e69276178d609820d3f0dfb685a7)
2012-10-16 17:10:15 -04:00
Tim Abbott
6642a65269
Convert last few json views to use the json_success api.
...
(imported from commit 7a617ec7e7c8607e8ba87e7a9b8599a83b91666c)
2012-10-16 16:54:41 -04:00
Tim Abbott
8388353859
Clean up the decorators code for the API.
...
(imported from commit b3fd6cfa475f021e35043148ad9a38633d9bddfe)
2012-10-16 16:38:42 -04:00
Tim Abbott
a859c10017
Don't redirect to a login page when responding to json messages.
...
Also update tests to actually check all our URLs.
(imported from commit 86de2027d140da6118e2f2f60c1c86511b16c141)
2012-10-16 16:38:39 -04:00
Tim Abbott
3e994c16b7
Rename/reorganize our urls to be more consistent.
...
(imported from commit ca3cc7ccd5d7da83a9c60968527378ee1118648e)
2012-10-16 15:56:06 -04:00
Zev Benjamin
103bf321b4
Have client and server exchange a server generation number
...
This will allow the client to detect when the server has restarted.
(imported from commit 89e75916719d967beb2520be6263f79f897d9ec1)
2012-10-16 15:30:09 -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
Keegan McAllister
5141cd7ab9
Make a setting for where we redirect home for not logged in users
...
(imported from commit 95bae4e52d8a8a34c001975e8d3547db5ba256a2)
2012-10-15 18:44:36 -04:00
Tim Abbott
bcc895b95b
Avoid expensive queries to check whether the user has any messages.
...
(imported from commit 035ec44db7a2f61b1c04e80feebe9af1a214505c)
2012-10-15 17:10:55 -04:00
Keegan McAllister
ab9832092d
Remove an unnecessary @require_post
...
(imported from commit c8a43e696dbcfa4cdb494f286e6f0b989d328bd9)
2012-10-15 17:05:37 -04:00
Tim Abbott
917a06d5cf
Use select_related for the get_updates queries.
...
(imported from commit 403a5906f9619fb1d6dc10e57ebcaab7e8f00f16)
2012-10-15 11:54:12 -04:00
Tim Abbott
7ebc720347
performance: Use select_related when computing autocomplete lists.
...
(imported from commit fde08787998179451e6684a101c80aaafca917f6)
2012-10-15 11:39:10 -04:00
Zev Benjamin
88009b4854
Auto-complete huddle names based on full name.
...
This also makes the people_list a list of objects containing the person's full name and email.
(imported from commit cff9b3de8cab0c9b2690ffa60d65d666302b989f)
2012-10-12 11:35:45 -04:00
Zev Benjamin
7a305c1882
Add more information to error message
...
(imported from commit 0917d5c2ed1b156603ce53aaec88ecbe26f5f39c)
2012-10-12 11:34:42 -04:00
Tim Abbott
afee537a95
Don't allow users to subscribe to too-long stream names.
...
Also check for invalid characters when subscribing via the API.
(imported from commit c4730ecb360607c4da264cb1c4b2f9daa2cef293)
2012-10-12 10:48:41 -04:00
Tim Abbott
091bc48926
api_subscribe: Check for too-long stream names.
...
(imported from commit 20d94eafeb333a9bc09b6b20093e13fd1b241ea8)
2012-10-12 10:45:53 -04:00
Tim Abbott
fc99d2983a
Add an API call to subscribe to a list of streams.
...
(imported from commit 0a5d46d5f54fb4c8ebfad8c9adb777c0b4938dfa)
2012-10-11 16:20:45 -04:00
Keegan McAllister
0a0bd31407
Remove unused strip_html
...
(imported from commit 21747b9b5cbbe7b1935905fc9254f4de64db20aa)
2012-10-11 15:01:54 -04:00
Keegan McAllister
2c3d7d6116
HTML-escape messages on output
...
(imported from commit f199fddf887ffbd22ebac76448accb4c48b64a24)
2012-10-11 15:01:54 -04:00
Keegan McAllister
3fadaae574
Don't escape message metadata as it enters the system
...
(imported from commit b98deb3dcdc389b079055a06ffafaf138bc79c70)
2012-10-11 15:01:54 -04:00
Keegan McAllister
c06aa1a3da
Don't escape user metadata as it enters the system
...
We believe that our output escaping is sufficient.
(imported from commit 4c9d4d79682ef5689bc1eec12a3bbcc34de013a4)
2012-10-11 15:01:54 -04:00
Keegan McAllister
7137787984
Escape variables interpolated into <script> within index.html
...
Django's escapejs prevents breaking out with an embedded </script> tag.
It only works on bare string contents, not JSON-ish lists and such. So we
generate stream_list and people_list with template loops now.
(imported from commit 07fe4bebaa3fa11bc479b4378b8989560ce77f6f)
2012-10-11 15:01:54 -04:00
Tim Abbott
83f494b1a4
Add API queries to show public streams and the user's subscriptions.
...
(imported from commit 5f24e35a9bdd1e40406e2acb0c3713a6517d139b)
2012-10-11 14:43:23 -04:00
Keegan McAllister
9811bd5f8a
Get UserProfile by email with a join, not two queries
...
(imported from commit 0698ebb88615cea54196181aeabe869ec466dbc1)
2012-10-11 14:05:53 -04:00
Tim Abbott
676e650a08
Fix mit_sync_bot bug causing constant API requests.
...
(imported from commit dfa845b98a7e22ee69a9589b8b98ac5a49077793)
2012-10-11 13:00:50 -04:00
Keegan McAllister
5a7ff70c11
Remove obsolete views
...
This functionality is part of the home view now.
(imported from commit 5f0327eb62840bf98af49566e6f3c0b86ca43b8d)
2012-10-11 11:23:22 -04:00
Keegan McAllister
48ec15c46d
Don't duplicate realm query when registering
...
(imported from commit b1e3b7144f564c5b2fc23fbf548bf0672deb2932)
2012-10-11 11:08:52 -04:00
Tim Abbott
ac3f4393ff
Rename instance to subject.
...
(imported from commit 6b4693da03f106448c137cf81cf9801cac44f2b8)
2012-10-10 18:01:39 -04:00
Tim Abbott
08e832e093
Change send_message to accept a stream, not a class.
...
(imported from commit 0f58de2502bec227f5f33e44692d03f2f28d6f63)
2012-10-10 17:48:17 -04:00
Tim Abbott
6dc913766d
Rename 'classes' to 'streams'.
...
(imported from commit 8ad6791f39d49e90a2828b6af86d039ba5ca5abc)
2012-10-10 17:47:13 -04:00
Tim Abbott
493a428cb2
Rename zephyr_class=>stream for local variables in views.py.
...
(imported from commit 9ea782e0c132f4ab3ca86cd37ff584d0a2308dea)
2012-10-10 17:47:13 -04:00
Tim Abbott
003efb84b4
Rename get_class to get_stream.
...
(imported from commit 4d393f9fcd46847c54c7e0b6b7add219e8e07fe6)
2012-10-10 17:47:13 -04:00
Tim Abbott
4006e4b1ea
Rename class_exists to stream_exists.
...
(imported from commit 416bd1f4c513216d45913e306f6c8eaa542f3539)
2012-10-10 17:47:13 -04:00