mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-19 10:19:27 -05:00
Add docs for indentation & spacing
This commit is contained in:
parent
f4a09013d7
commit
6db788a550
@ -97,6 +97,34 @@ closing the ``"`` before it should have been.
|
|||||||
That's all there is in terms of guidelines, so I hope it's not too daunting.
|
That's all there is in terms of guidelines, so I hope it's not too daunting.
|
||||||
|
|
||||||
|
|
||||||
|
Indentation & Spacing
|
||||||
|
.....................
|
||||||
|
|
||||||
|
When it comes to indentation:
|
||||||
|
|
||||||
|
* For Python, the rule is: follow pep8 and use 4 spaces.
|
||||||
|
* For Javascript, CSS, and HTML, please use 1 tab.
|
||||||
|
|
||||||
|
Additionally, Django templates making use of block elements like ``{% if %}``,
|
||||||
|
``{% for %}``, and ``{% block %}`` etc. should be indented:
|
||||||
|
|
||||||
|
Good:
|
||||||
|
|
||||||
|
.. code:: html
|
||||||
|
|
||||||
|
{% block stuff %}
|
||||||
|
<h1>This is the stuff</h1>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
Bad:
|
||||||
|
|
||||||
|
.. code:: html
|
||||||
|
|
||||||
|
{% block stuff %}
|
||||||
|
<h1>This is the stuff</h1>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
The Code of Conduct
|
The Code of Conduct
|
||||||
===================
|
===================
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user