docs: Clean a few files of too-long lines.

We also document why the rest of them are still on the list.
This commit is contained in:
Tim Abbott
2017-11-16 11:44:00 -08:00
parent 011114397b
commit bf77ad3a6e
3 changed files with 21 additions and 13 deletions

View File

@@ -62,8 +62,11 @@ application.
## Django routes the request to a view in urls.py files ## Django routes the request to a view in urls.py files
There are various [urls.py](https://docs.djangoproject.com/en/1.8/topics/http/urls/) files throughout the server codebase, which are There are various
covered in more detail in [the directory structure doc](../overview/directory-structure.html). [urls.py](https://docs.djangoproject.com/en/1.8/topics/http/urls/)
files throughout the server codebase, which are covered in more detail
in
[the directory structure doc](../overview/directory-structure.html).
The main Zulip Django app is `zerver`. The routes are found in The main Zulip Django app is `zerver`. The routes are found in
``` ```
@@ -77,9 +80,10 @@ on how the REST API handles our user creation example.
## Views serving HTML are internationalized by server path ## Views serving HTML are internationalized by server path
If we look in [zproject/urls.py](https://github.com/zulip/zulip/blob/master/zproject/urls.py), we can see something called If we look in
`i18n_urls`. These urls show up in the address bar of the browser, and [zproject/urls.py](https://github.com/zulip/zulip/blob/master/zproject/urls.py),
serve HTML. we can see something called `i18n_urls`. These urls show up in the
address bar of the browser, and serve HTML.
For example, the `/features` page (preview For example, the `/features` page (preview
[here](https://zulipchat.com/features/)) gets translated in Chinese at [here](https://zulipchat.com/features/)) gets translated in Chinese at
@@ -96,7 +100,8 @@ With the exception of Webhooks (which we do not usually control the
format of), legacy endpoints, and logged-out endpoints, Zulip uses REST format of), legacy endpoints, and logged-out endpoints, Zulip uses REST
for its API. This means that we use: for its API. This means that we use:
* POST for creating something new where we don't have a unique ID. Also used as a catch-all if no other verb is appropriate. * POST for creating something new where we don't have a unique
ID. Also used as a catch-all if no other verb is appropriate.
* PUT for creating something for which we have a unique ID. * PUT for creating something for which we have a unique ID.
* DELETE for deleting something * DELETE for deleting something
* PATCH for updating or editing attributes of something. * PATCH for updating or editing attributes of something.
@@ -205,7 +210,8 @@ in a
with a content type of 'application/json'. with a content type of 'application/json'.
To pass back data from the server to the calling client, in the event of To pass back data from the server to the calling client, in the event of
a successfully handled request, we use `json_success(data=<some python object which can be converted to a JSON string>`. a successfully handled request, we use
`json_success(data=<some python object which can be converted to a JSON string>`.
This will result in a JSON string: This will result in a JSON string:

View File

@@ -161,8 +161,7 @@ running it manually.
1. Configure *supervisord*. *supervisord* stores its configuration in 1. Configure *supervisord*. *supervisord* stores its configuration in
`/etc/supervisor/conf.d`. `/etc/supervisor/conf.d`.
* Do **one** of the following: * Do **one** of the following:
* Download the [sample config file]( * Download the [sample config file][supervisord-config-file]
https://raw.githubusercontent.com/zulip/python-zulip-api/master/zulip_botserver/zulip-botserver-supervisord.conf)
and store it in `/etc/supervisor/conf.d/zulip-botserver.conf`. and store it in `/etc/supervisor/conf.d/zulip-botserver.conf`.
* Copy the following section into your existing supervisord config file. * Copy the following section into your existing supervisord config file.
``` ```
@@ -174,6 +173,8 @@ running it manually.
``` ```
* Edit the `<>` sections according to your preferences. * Edit the `<>` sections according to your preferences.
[supervisord-config-file]: https://raw.githubusercontent.com/zulip/python-zulip-api/master/zulip_botserver/zulip-botserver-supervisord.conf
2. Update *supervisord* to read the configuration file: 2. Update *supervisord* to read the configuration file:
``` ```
supervisorctl reread supervisorctl reread

View File

@@ -653,16 +653,17 @@ def build_custom_checkers(by_lang):
color = next(colors) color = next(colors)
markdown_docs_length_exclude = { markdown_docs_length_exclude = {
"api/bots/converter/readme.md", # Has some example Vagrant output that's very long
"templates/zerver/api/running-bots.md",
"docs/development/setup-vagrant.md", "docs/development/setup-vagrant.md",
# Has some example code that could perhaps be wrapped
"docs/tutorials/webhook-walkthrough.md", "docs/tutorials/webhook-walkthrough.md",
"docs/tutorials/life-of-a-request.md", # Have wide output in code blocks
"docs/subsystems/logging.md", "docs/subsystems/logging.md",
"docs/migration-renumbering.md", "docs/migration-renumbering.md",
"docs/overview/readme-symlink.md", # Have curl commands with JSON that would be messy to wrap
"zerver/webhooks/helloworld/doc.md", "zerver/webhooks/helloworld/doc.md",
"zerver/webhooks/trello/doc.md", "zerver/webhooks/trello/doc.md",
# Has a very long configuration line
"templates/zerver/integrations/perforce.md", "templates/zerver/integrations/perforce.md",
} }
for fn in by_lang['md']: for fn in by_lang['md']: