Rishi Gupta
ba228b75b1
zilencer: Use Realm.string_id for get_deployment_from_domain.
...
This is dead code. Getting rid of realm__domain since we're about to remove
that field from Realm.
2017-03-14 17:17:42 -07:00
Rishi Gupta
871c754369
bulk_create: Remove unused function bulk_create_realms.
2017-03-13 14:42:55 -07:00
Tim Abbott
950e06cf32
populate_db: Remove unused Deployment import.
2017-03-06 00:11:53 -08:00
Tim Abbott
10a52147fc
zilencer: Remove obsolete create_deployment command.
2017-03-06 00:10:03 -08:00
Tim Abbott
e1c1f96f9e
zilencer: Eliminate submit_feedback indirection.
2017-03-06 00:01:57 -08:00
Tim Abbott
ed5b76f566
zilencer: Move feedback code to zerver/lib/feedback.
2017-03-06 00:01:57 -08:00
Tim Abbott
1f9d93bc96
submit_feedback: remove unused domainish variable.
2017-03-06 00:01:57 -08:00
Tim Abbott
69061e6db4
zilencer: Remove obsolete lookup_endpoints_for_user endpoint.
...
This endpoint was part of the same obsolete system as
desktop_sso_dispatch.
2017-03-06 00:01:56 -08:00
Tim Abbott
9e8023843a
zilencer: Remove obsolete desktop_sso_dispatch.
...
This feature has been obsolete since when Zulip was released as open
source software, since it's purpose was to avoid putting a "server
url" prompt in the desktop app, and now that prompt is required
anyway.
2017-03-06 00:01:47 -08:00
Raghav Jajodia
a3a03bd6a5
mypy: Added Dict, List and Set imports.
...
Fixed mypy errors associated with the upgrade.
2017-03-04 14:33:44 -08:00
Rishi Gupta
1453a5bfda
Change string_id of test zephyr realm from mit to zephyr.
...
Also changes Realm.is_zephyr_mirror_realm to use string_id=zephyr instead of
domain=mit.edu.
Part of a larger migration away from Realm.domain.
2017-03-04 12:18:01 -08:00
Rishi Gupta
15d60fa7ed
Change now() to timezone.now() throughout codebase.
...
Change `from django.utils.timezone import now` to
`from django.utils import timezone`.
This is both because now() is ambiguous (could be datetime.datetime.now),
and more importantly to make it easier to write a lint rule against
datetime.datetime.now().
2017-02-28 16:03:37 -08:00
Tim Abbott
8691f1466a
populate_db: Disable use of memcached when populating database.
...
This fixes an issue where one would get errors of the form:
`ValueError: unsupported pickle protocol: 3`
in a `run-dev.py` server run against Python 2 if you ran `provision`.
Provision currently runs `populate_db` with Python 3, storing Python 3
based data in memcached, which then can't be read by Python 2.
2017-02-26 21:08:47 -08:00
Tim Abbott
08a7e0db44
render_messages: Fix buggy handling of edit history.
2017-02-18 22:33:26 -08:00
Tim Abbott
080182ad17
populate_db: Fix broken initial presence data.
...
Apparently, the initial data just set everyone to "API" in a broken way.
2017-02-10 23:52:32 -08:00
Tim Abbott
7e8d3d9a46
populate_db: Add --extra-bots option to create extra bots.
2017-02-10 17:40:45 -08:00
Steve Howell
4be2d6577d
Add a new community realm to our test databases.
...
The realm with string_id of "simple" just has three users
named alice, bob, and cindy for now. It is useful for testing
scenarios where realms don't have special zulip.com exception
handling.
2017-01-26 19:25:34 -08:00
Tim Abbott
dd9e0b8463
errors: Move do_report_error into zerver/lib/.
2017-01-23 23:18:28 -08:00
Tim Abbott
e6fc4ae27d
errors: Move zilencer/error_notify.py to zerver/lib/.
2017-01-23 23:17:09 -08:00
Tim Abbott
4e171ce787
lint: Clean up E126 PEP-8 rule.
2017-01-23 22:06:13 -08:00
Tim Abbott
d6e38e2a5c
lint: Clean up E123 PEP-8 rule.
2017-01-23 21:34:26 -08:00
Tim Abbott
e9158dd520
lint: Clean up E121 PEP-8 rule.
2017-01-23 21:02:39 -08:00
Tim Abbott
c0c9dfb66d
populate_db: Fix crash by removing do_send_message.
...
This old helper has for years been used only by populate_db, and got
buggy (as of a recent refactoring). So we just call do_send_messages
directly instead.
Fixes the provisioning error we currently get in Travis CI.
2017-01-21 22:07:36 -08:00
Tim Abbott
99c5563bc6
internal_send_message: Make realm argument mandatory.
...
A lot of care has been taken to ensure we're using the realm that the
message is being sent into, not the realm of the sender, to correctly
handle the logic for cross-realm bot users such as the notifications
bot.
2017-01-21 21:37:30 -08:00
Tommy Ip
3823376b3f
zilencer: Fix bare except clause.
2017-01-08 16:22:21 -08:00
Rishi Gupta
2b0a7fd0ba
Rename models.get_realm_by_string_id to get_realm.
...
Finishes the refactoring started in c1bbd8d
. The goal of the refactoring is
to change the argument to get_realm from a Realm.domain to a
Realm.string_id. The steps were
* Add a new function, get_realm_by_string_id.
* Change all calls to get_realm to use get_realm_by_string_id instead.
* Remove get_realm.
* (This commit) Rename get_realm_by_string_id to get_realm.
Part of a larger migration to remove the Realm.domain field entirely.
2017-01-04 17:12:23 -08:00
Rafid Aslam
50afe5a6c2
sync_api_key: Fix `ConfigParser` deprecation warnings.
...
Fix `ConfigParser` deprecation warnings in
`zilencer/management/commands/sync_api_key.py`.
Fixes #2727 .
2016-12-30 11:52:22 -08:00
Rafid Aslam
aece2c7c45
populate_db: Fix naive datetime warnings
...
Fix naive datetime warnings in
`zilencer/management/commands/populate_db.py`.
Fixes #2729 .
2016-12-20 17:48:22 -08:00
Tim Abbott
d3b1f6e273
populate_db: Add notifications stream for Zulip realm.
2016-12-15 22:43:08 -08:00
Rishi Gupta
6b39f3222c
Remove Realm.domain from populate_db.py.
...
Fixes #2286 .
2016-12-15 13:22:17 -08:00
Rishi Gupta
fc188de8e0
bulk_create: Refactor bulk_create_users to take Realm instead of domains.
...
Previously bulk_create_users would figure out a user's realm from their
email domain. Now require that a realm be passed explicitly.
2016-12-15 13:22:17 -08:00
Rishi Gupta
56c8b58cbc
populate_db: Remove create_streams.
...
Is extraneous indirection.
2016-12-15 13:22:17 -08:00
Rishi Gupta
ee9b59321c
populate_db: Refactor create_streams.
...
Remove unused field from stream_dict.
2016-12-15 13:22:17 -08:00
Rishi Gupta
fbf48f7ec6
bulk_create: Refactor bulk_create_streams to not take domain dictionary.
...
First step in cleaning up populate_db.create_streams and
bulk_create.bulk_create_streams. Part of a series of commits to remove
Realm.domain from populate_db.
2016-12-15 13:22:17 -08:00
reyha
82e32ad255
Access realm by `string_id` in management commands.
...
`Realm.string_id` replaces 'Realm.domain'
in the management commands.
Fixes #2325 .
2016-12-14 10:38:03 -08:00
Juan Verhook
9869fb8d87
Add UserPresence rows to test databases.
...
Fixes : #2426
mypy: Added annotations to populate_db.py
2016-12-09 15:41:21 -08:00
Joy Chen
dd95a5e03f
streams: Add default stream description population data.
2016-12-07 21:02:17 -08:00
anirudhjain75
beaa62cafa
mypy: Convert several directories to use typing.Text.
...
Specifically, these directories are converted: [analytics/, scripts/,
tools/, zerver/management/, zilencer/, zproject/]
2016-12-07 20:51:05 -08:00
nikolay
abc2ff4a06
pep8: Fix many rule E128 violations.
...
[Tweaked by tabbott to adjust some approaches used in wrapping]
2016-12-03 13:33:31 -08:00
bulat22101
a6f91064a2
pep8: Fix E129 violations
2016-12-03 10:56:36 -08:00
Alex Huang
c8ddea16c3
pep8: Fix E122.
2016-12-01 23:16:35 -08:00
AZtheAsian
7e14fe65ab
pep8: fix E202 violations
2016-12-01 23:06:02 -08:00
Rafid Aslam
c5316b4002
lint: Fix E127 pep8 violations.
...
Fix pep8: E127 continuation line over-indented for visual indent
style issue.
2016-12-01 10:23:55 -08:00
Tommy Ip
e4091c6413
pep8: Fix E222 violations.
2016-11-30 21:49:02 +00:00
Rishi Gupta
4b183cd526
domain migration: Remove several instances of get_realm.
...
Remove the easy to remove instances of get_realm.
2016-11-26 15:19:56 -08:00
Anders Kaseorg
207cf6302b
Always start python via shebang lines.
...
This is preparation for supporting using Python 3 in production.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-26 14:46:37 -08:00
Steve Howell
78474c8bee
Add test users with non-lowercase emails.
...
We are prone to case-sensitivity bugs, so I added AARON and ZOE.
Also, for good measure, I insert them in non-alphabetical order
to try to drive out bugs from non-consistent sorting of user ids.
2016-11-26 11:48:52 -08:00
Tim Abbott
61816f6151
populate_db: Remove replay_old_messages code.
...
Now that we have the data import/export tool, that's a better
mechanism for importing data than this old and likely buggy code was.
2016-11-15 22:34:44 -08:00
paxapy
b90057d557
render_messages.py: render first version of edited messages.
...
This decreases the number of spurious differences in rendered content
significantly.
2016-11-15 13:39:11 -08:00
Rishi Gupta
5681ee90fa
models.py: Rename split_email_to_domain to email_to_domain.
...
In order to better match models.email_to_username.
2016-11-11 15:26:51 -08:00