hackerkid
b2504084ab
Replace timezone.now with timezone_now.
2017-04-16 12:28:56 -07:00
hackerkid
55c3d12078
Replace timezone.utc with timezone_utc.
2017-04-16 12:28:56 -07:00
Yago González
e710110a9e
i18n: Automatically strip Handlebars strings.
...
Some Handlebars strings contained whitespaces characters at their ends.
With this, such characters are removed, as well as multiple spaces
(like the ones produced by code indentation).
This also includes a couple of fixes that removes spaces that were
intentionally placed before/after the string to translate.
2017-04-14 17:37:25 -07:00
Yago González
31c92cdcbc
refactor: Keep sub replacements' format uniform.
2017-04-14 17:37:25 -07:00
Umair Khan
9dec5306ce
makemessages.py: Handle unicode strings.
...
This commit applies to Python 2. It seems that sorted()
cannot handle non-ascii character unless the strings are
marked as Unicode.
2017-04-11 22:32:06 -07:00
Abhijeet Kaur
8f88b045a4
Rename "Administration" to "Organization" in the settings UI.
...
This better sets expectatations for the fact that in Zulip, the
Organization settings UI is available read-only to non-administrator
users.
Tweaked by tabbott to update some additional references.
2017-04-07 17:32:56 -07:00
Umair Khan
846e8686c4
makemessages: Exclude hidden files.
...
Fixes #3981 .
2017-04-05 11:09:32 -07:00
Harshit Bansal
664b23c495
commands: Rename `realm_alias` command to `realm_domain`.
2017-04-04 15:48:03 -07:00
Harshit Bansal
362ee482c0
commands/realm_alias.py: Remove any occurrences of `alias`.
2017-04-04 15:48:03 -07:00
Harshit Bansal
983225612d
actions.py: Rename `get_realm_aliases()` to `get_realm_domains()`.
2017-04-04 15:48:03 -07:00
Harshit Bansal
92c512d679
zerver/models.py: Rename can_add_alias() to can_add_realm_domain().
2017-04-04 15:48:03 -07:00
Harshit Bansal
6f0b46d84f
create_realm.py: Remove unnecessary imports.
2017-04-04 15:48:03 -07:00
Harshit Bansal
ac2172e233
models: Rename RealmAlias model to RealmDomain.
...
Includes a migration.
2017-04-04 15:48:03 -07:00
Rishi Gupta
30024d0a8f
models: Remove Realm.domain.
2017-03-25 19:55:48 -07:00
Rishi Gupta
caef5332d5
mailchimp: Fix error in add_users_to_mailing_list.py.
...
Old behavior is a holdover from development testing.
2017-03-21 16:13:00 -07:00
Rishi Gupta
92dd767519
management commands: Change help text to say realm instead of domain.
2017-03-14 17:17:42 -07:00
Rishi Gupta
0c032adbde
create_realm.py: Remove --domain option.
...
Realm domains can now be managed via Admin Settings in the web app.
2017-03-14 17:17:42 -07:00
Rishi Gupta
11346e50bb
management commands: Use Realm.string_id instead of domain in print statements.
2017-03-13 09:44:32 -07:00
Tim Abbott
ca50e10569
sessions: Move session deletion code to sessions.py.
...
This new organization feels more thematically appropriate, and of
course shrinks the amount of stuff unnecessarily in actions.py
2017-03-08 02:48:18 -08:00
Tim Abbott
e90df029bf
create_realm: Eliminate obsolete deployment code.
...
Since we're not using this model anymore, we certainly don't need it
when creating realms.
2017-03-06 00:07:45 -08:00
Tim Abbott
8815a598d8
digest: Remove obsolete deployment code.
...
This system was quite complicated, and never had great semantics.
Eventually, we'll want some other system for gating which server
should generate digest emails for which realm controlled via the
database.
2017-03-06 00:05:21 -08:00
sinwar
6f0564e9f4
python: Fix remaining bare excepts in codebase.
...
Fixes #2862 .
2017-03-05 16:17:04 -08:00
Tim Abbott
d95412425a
generate_realm_creation_link: Fix line-wrapping of help text.
2017-03-04 19:02:01 -08:00
feorlen
3c954096f6
generate_realm_creation_link: Check for an uninitialized database.
...
This provides a nice error message to users who miss a step in the
instructions.
Fixes #3672 .
2017-03-04 19:01:01 -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
adnrs96
9eb47f108c
Refactor: Change upload_avatar_image to accept two user profiles.
...
In this commit we just change the upload_avatar_image function to accept
two user_profiles acting_user_profile and target_user_profile. Basically
email param is dropped for a target_user_profile so that avatar's could
be moved lateron to user id based storage.
2017-03-03 18:15:15 -08:00
Umair Khan
87c5ace24d
i18n: Use deterministic order in translations.json.
...
Fixes : #3897
2017-03-03 12:32:17 +05:00
Rishi Gupta
3d07ac0c49
Change timezone-naive datetimes to use timezone.now() where safe to do so.
...
Change timezone-naive datetimes to use timezone.now() in cases where there
is no change in behavior.
2017-03-01 22:54:28 -08:00
Rishi Gupta
c388858e53
Fix timezone errors in ScheduledJob and digest creation filters.
...
datetime.utcnow() is a timezone-naive datetime. The Django ORM interprets it
in the settings.TIME_ZONE timezone (e.g. 'America/New_York' in the
development server). We perhaps haven't noticed errors yet since with
'America/New_York' all it means is that emails are sent 5 hours early, or a
slightly different set of messages are included in the digest.
2017-03-01 22:54:28 -08:00
Rishi Gupta
562bc6429c
Replace datetime.now() with timezone.now() in Django ORM queries.
...
When you pass a naive datetime to the Django ORM, it uses settings.TIME_ZONE
for the time zone. In the development environment, both settings.TIME_ZONE
and datetime.now() use 'America/New_York', so there is no change in behavior
there. (fromtimestamp with no tz argument uses the same timezone as
datetime.now)
We are soon going to change settings.TIME_ZONE to UTC, so need to remove
naive datetimes from queries to the ORM.
2017-03-01 22:54:28 -08:00
Rishi Gupta
2b2be8120f
Change datetime.now(tz=X) to timezone.now().
...
datetime.now with a timezone set is equivalent to timezone.now() if it's
never being printed out, but the latter is cleaner and more idiomatic.
2017-03-01 22:54:28 -08:00
Tim Abbott
cf96b1b873
generate_realm_creation_link: Clean up instructions.
2017-02-21 20:19:16 -08:00
Tim Abbott
32bfebeb7a
mypy: Fix inconsistencies in use of *args/**kwargs.
2017-02-18 18:39:44 -08:00
Umair Khan
00f8239563
Clean code of send_test_email command.
...
* Derive from sendtestemail command of Django.
* Remove unwanted imported.
* Allow test email to admin and managers.
2017-02-10 16:01:43 -08:00
Umair Khan
ef0d2a4bb5
logging: Use django.server to filter 200 and 304.
...
Previously, we were monkey patching the runserver command
in zerver/management/commands/rundjango.py for this.
2017-02-10 15:55:17 -08:00
Harshit Bansal
7d10cbc32b
Add RealmAlias.allow_subdomains to model, frontend, and API.
...
Includes a database migration.
Fixes #1868 .
2017-02-08 22:03:27 -08:00
Tim Abbott
12e7be585d
i18n: Fix compilemessages processing extra files in production.
...
In a Zulip production environment, STATIC_ROOT points to the shared
directory that static assets are served from, and so the
compilemessages management command was trying to process every
historical version in there.
2017-02-03 17:17:23 -08:00
Tim Abbott
a889346c9f
Remove zh_CN old Django name for Chinese.
2017-02-03 14:29:03 -08:00
Tim Abbott
4d3e97f304
actions: Remove unnecessary do_create_stream function.
2017-01-29 22:07:14 -08:00
Tim Abbott
2dc90e8ebd
rename_stream: Pass a stream object to do_rename_stream.
2017-01-29 20:27:00 -08:00
Harshit Bansal
06cc306d00
Add stricter domain validation and improve error messages.
2017-01-26 17:24:25 -08:00
Harshit Bansal
5b01694e00
actions.py: Rename do_get_realm_aliases to get_realm_aliases.
2017-01-26 17:24:25 -08:00
Tim Abbott
4e171ce787
lint: Clean up E126 PEP-8 rule.
2017-01-23 22:06:13 -08:00
Tim Abbott
de99f48ce7
lint: Clean up E401 PEP-8 rule.
2017-01-23 21:36:39 -08:00
Tim Abbott
9cc83f87fc
lint: Clean up E241 PEP-8 rule.
2017-01-23 21:21:14 -08:00
Tim Abbott
e9158dd520
lint: Clean up E121 PEP-8 rule.
2017-01-23 21:02:39 -08:00
Tim Abbott
bde2da7dfd
lint: clean up PEP-8 W391 rule.
2017-01-23 20:39:02 -08:00
Rohith Asrk
560db2d482
send_password_reset_email.py: Migrate to send_mail from EmailMultiAlternatives.
2017-01-19 16:26:31 -08:00
Rohith Asrk
92ed9dd930
deliver_email.py: Migrate to send_mail from EmailMultiAlternatives.
2017-01-19 16:26:24 -08:00
JefftheBest1
a549ed6e65
Removed accommodate typos
2017-01-12 04:53:31 -08:00