zulip/zerver/management/commands
Mateusz Mandera 1a8ad796f8 models: Replace __id syntax with _id where possible.
model__id syntax implies needing a JOIN on the model table to fetch the
id. That's usually redundant, because the first table in the query
simply has a 'model_id' column, so the id can be fetched directly.
Django is actually smart enough to not do those redundant joins, but we
should still avoid this misguided syntax.

The exceptions are ManytoMany fields and queries doing a backward
relationship lookup. If "streams" is a many-to-many relationship, then
streams_id is invalid - streams__id syntax is needed. If "y" is a
foreign fields from X to Y:
class X:
  y = models.ForeignKey(Y)

then object x of class X has the field x.y_id, but y of class Y doesn't
have y.x_id. Thus Y queries need to be done like
Y.objects.filter(x__id__in=some_list)
2021-04-22 14:53:00 -07:00
..
__init__.py
add_users_to_streams.py refactor: Make acting_user a mandatory kwarg for bulk_add_subscriptions. 2021-04-02 14:44:41 -07:00
archive_messages.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
audit_fts_indexes.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
backup.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
bulk_change_user_name.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
change_user_email.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
change_user_role.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
check_redis.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
checkconfig.py install: Remove references to "Zulip Voyager". 2020-01-30 12:40:41 -08:00
compilemessages.py python: Convert deprecated Django ugettext alias to gettext. 2021-04-15 18:01:34 -07:00
convert_gitter_data.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
convert_mattermost_data.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
convert_slack_data.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
create_default_stream_groups.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
create_large_indexes.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
create_realm_internal_bots.py python: Sort migrations/management command imports with isort. 2020-01-14 13:07:47 -08:00
create_stream.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
create_user.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
deactivate_realm.py refactor: Make acting_user a mandatory kwarg for do_deactivate_realm. 2021-04-02 14:44:41 -07:00
deactivate_user.py refactor: Make acting_user a mandatory kwarg for do_deactivate_user. 2021-03-29 15:51:45 -07:00
delete_old_unclaimed_attachments.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
delete_realm.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
deliver_email.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
deliver_scheduled_messages.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
dump_messages.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
edit_linkifiers.py management: Use better fetch query in edit_linkifiers. 2021-04-13 09:18:18 -07:00
email_mirror.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
enqueue_digest_emails.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
enqueue_file.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
export.py refactor: Make acting_user a mandatory kwarg for do_deactivate_realm. 2021-04-02 14:44:41 -07:00
export_single_user.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
export_usermessage_batch.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
fill_memcached_caches.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
fix_unreads.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
generate_invite_links.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
generate_multiuse_invite_link.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
generate_realm_creation_link.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
get_migration_status.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
import.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
list_realms.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
logout_all_users.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
makemessages.py templates: Remove context argument from {{#tr}} block helper. 2021-04-13 18:59:46 -07:00
merge_streams.py refactor: Make acting_user a mandatory kwarg for bulk_add_subscriptions. 2021-04-02 14:44:41 -07:00
print_email_delivery_backlog.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
process_queue.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
purge_queue.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
query_ldap.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
rate_limit.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
reactivate_realm.py python: Sort migrations/management command imports with isort. 2020-01-14 13:07:47 -08:00
realm_domain.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
register_server.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
remove_users_from_stream.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
rename_stream.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
restore_messages.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
runtornado.py tornado: Drop unused command-line flags. 2021-03-31 14:19:38 -07:00
scrub_realm.py audit_log: Log acting_user in do_scrub_realm. 2020-07-06 17:24:18 -07:00
send_custom_email.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
send_password_reset_email.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
send_realm_reactivation_email.py support: Create RealmAuditLog when realm reactivation email is sent. 2021-04-03 08:01:46 -07:00
send_stats.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
send_test_email.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
send_to_email_mirror.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
send_webhook_fixture_message.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
set_message_flags.py models: Replace __id syntax with _id where possible. 2021-04-22 14:53:00 -07:00
show_admins.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
soft_deactivate_users.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
sync_ldap_user_data.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
transfer_uploads_to_s3.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
turn_off_digests.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00