Commit Graph

77 Commits

Author SHA1 Message Date
Umair Khan 5359e6b0d4 Convert Zulip to use Jinja2 templates.
This results in a substantial performance improvement for all of
Zulip's backend templates.

Changes in templates:
- Change `block.super` to `super()`.
- Remove `load` tag because Jinja2 doesn't support it.
- Use `minified_js()|safe` instead of `{% minified_js %}`.
- Use `compressed_css()|safe` instead of `{% compressed_css %}`.
- `forloop.first` -> `loop.first`.
- Use `{{ csrf_input }}` instead of `{% csrf_token %}`.
- Use `{# ... #}` instead of `{% comment %}`.
- Use `url()` instead of `{% url %}`.
- Use `_()` instead of `{% trans %}` because in Jinja `trans` is a block tag.
- Use `{% trans %}` instead of `{% blocktrans %}`.
- Use `{% raw %}` instead of `{% verbatim %}`.

Changes in tools:
- Check for `trans` block in `check-templates` instead of `blocktrans`

Changes in backend:
- Create custom `render_to_response` function which takes `request` objects
  instead of `RequestContext` object. There are two reasons to do this:
    1. `RequestContext` is not compatible with Jinja2
    2. `RequestContext` in `render_to_response` is deprecated.
- Add Jinja2 related support files in zproject/jinja2 directory. It
  includes a custom backend and a template renderer, compressors for js
  and css and Jinja2 environment handler.
- Enable `slugify` and `pluralize` filters in Jinja2 environment.

Fixes #620.
2016-05-09 09:55:18 -07:00
Vishnu Ks fe77559164 Fix broken link to Google Play store badge. 2016-04-08 08:37:17 -07:00
Tim Abbott 9b4c440e0d apps: Fix linking to SSO versions of desktop app.
The SSO build of the desktop app is intended only for those users who
who have settings.SSO_ONLY set, i.e. the only way to login is via the
site's SSO REMOTE_USER authentication.  We were incorrectly linking to
it on all production installations :(.
2015-11-06 09:51:25 -08:00
Ahmed Shibani 4f29cfee9e Mark strings for translation in templates/zerver
In order to enable internationalization support in Zulip, and to use
Django internationalization tools, all strings in Zulip frontend needs
to be marked for translation.
2015-11-03 23:06:31 -08:00
David Roe 3f7cb34b00 enterprise => voyager
(imported from commit 04be792bb480d5e5db1c91d296d1000cf1682571)
2015-08-21 10:33:35 -07:00
Luke Faraone 7f72b7ce34 Switch to new app links on Google Play.
These may not work at time of writing due to propegation delays, but I
promise they'll be active soonish.

(imported from commit 4ed9e85f282fb868a75fa427f897bad8469d9e03)
2014-01-07 13:43:52 -05:00
Waseem Daher 45dd03bfc7 apps: Properly name Linux repo key.
Tiny remove-newline fix as well.

(imported from commit 5c68635973366b9ff68a96fdca3bf3196583d690)
2013-12-18 14:22:11 -05:00
acrefoot c30f2bbe3e slightly stricter linting of html templates
(imported from commit 5bd0aa3c49d6ff95559a73bd5f134cc50ae98ce9)
2013-12-17 12:05:23 -05:00
Luke Faraone 490af28958 Update URL for user APT key.
We're moving to S3, so apt.z.c no longer serves SSL.

(imported from commit a2d376337ddaf2f5fd4ddf193a1ff0732f89c78a)
2013-12-11 10:54:30 -05:00
Leo Franchi afa2cc25d1 Remove OS X Snow Leopard note, 0.4.0 supports 10.6 as well
(imported from commit 9471823ff1c4e03f633b382c1b5803f781ece898)
2013-11-26 17:41:26 -05:00
acrefoot 8c402109b9 Remove mobile apps from /apps in Enterprise
(imported from commit 70045c21e71454642ec6950934d3e736c5fa3410)
2013-11-22 13:50:24 -05:00
Steve Howell 1c91d1a5bc Clean up back end HTML templates.
The check-handlebars-templates script now looks at most of our
back end templates to try and find imbalanced tags.  This commit
fixes a bunch of the existing templates.

(imported from commit fad4a5d85d68160370dd588b41d6f125f64d198f)
2013-11-19 10:43:56 -05:00
Leo Franchi 818ef42d05 Show zulip-desktop-sso package for local server installs
(imported from commit d0a05bfb2e7a15c02c0e61d6b95ef841a44340b3)
2013-11-18 12:04:43 -05:00
Tim Abbott e64472cd32 Rename enterprise template variable to not_enterprise.
The problem here is that some error-related templates render without
the context managers that we specify, and so we want the handling of
"the context was not set" to default to the enterprise case (because
the enterprise version will work basically fine on !enterprise, but
the opposite is not true because the enterprise distribution doesn't
even have the templates for certain !enterprise pages that may be
linked to).

(imported from commit 7547311d87e048d33221587f44b82fe0ba320ca1)
2013-11-13 20:10:33 -05:00
Jeff Arnold 11d05c1689 Our docs should not try to hire our customers' employees
(imported from commit aae1e6fb236b44eabcf3cf7c4e48534bea6cd731)
2013-11-13 19:57:50 -05:00
Leo Franchi 372984b56d Serve sso app builds to enterprise users
(imported from commit a9741833c514c364c5e67fdbb31d191e1ab0f1df)
2013-11-13 18:11:49 -05:00
Waseem Daher eaec0e0774 Better, retina-ready phone screenshots for /apps (though still not great).
(imported from commit 7a4a1fc0a203713eb83f75324f26abf8f890a37b)
2013-11-12 21:58:32 -05:00
Tim Abbott 5293cdebe8 Rename LOCAL_SERVER to ENTERPRISE.
(imported from commit 7edf353eefe6c9e7aac74b7bbc37b923cac1b913)
2013-11-12 15:57:01 -05:00
Leo Franchi 7794373db6 Include 10.7+ info in mac app page, as well as link to 10.6-compatible version
(imported from commit 7af1f3709188baf2e388548783210ff1cab594be)
2013-11-05 11:29:31 -05:00
Waseem Daher d97b09e164 local_server: Don't try to hire away our customers.
(imported from commit 968df69fc863598550a554c739f4b5cde1f93eab)
2013-10-25 18:34:10 -04:00
Jessica McKellar dbc0c036c3 Update /apps to get the iOS app from the iTunes Store.
(imported from commit 22468bad537ab116f6568d08b0bae83d72e4cb96)
2013-10-08 11:10:53 -04:00
Allen Rabinovich a6889080ce New styles for the portico pages.
(imported from commit 832ad6eb0c2a7be91152d33a6f1ed5d96880839c)
2013-10-03 09:30:21 -07:00
Luke Faraone 53e2639906 Revise and simplify instructions.
(imported from commit beee4446caeb53d0e1a7c10fc2878fbd5a0c3dbd)
2013-08-16 17:24:55 -04:00
Luke Faraone f03a15ea6e Switch to apt.zulip.com.
Use HTTPS for the initial key download but not for the APT repo line.

(imported from commit 5afa07832ca09919ad4ea6d2b15b2679a902ffa1)
2013-08-16 17:24:55 -04:00
Waseem Daher bae322f020 apps: Link to apt.humbughq.com instead.
apt.zulip.com is not yet operational.

(imported from commit 4d3c15d0764b4c979fb8c5b7d829e88345872468)
2013-08-14 17:14:52 -04:00
Tim Abbott 87f8c9333c Rename Humbug => Zulip in app screenshot filenames.
(imported from commit a1a753143e77e0efd1de727378d505815a6d44d3)
2013-08-08 10:22:32 -04:00
Tim Abbott e111a2f9a5 [manual] Rename Django app from zephyr to zerver.
This needs to be deployed to both staging and prod at the same
off-peak time (and the schema migration run).

At the time it is deployed, we need to make a few changes directly in
the database:

(1) UPDATE django_content_type set app_label='zerver' where app_label='zephyr';
(2) UPDATE south_migrationhistory set app_name='zerver' where app_name='zephyr';

(imported from commit eb3fd719571740189514ef0b884738cb30df1320)
2013-08-06 07:39:36 -04:00