-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add HTML formatting to
pre-commit
(#966)
## Fixes issue #239 ## Description of Changes Added [`djLint`](https://www.djlint.com/docs/languages/jinja/) to the `pre-commit` process and formatted files accordingly. ## Tests and linting - [x] This branch is up-to-date with the `develop` branch. - [x] `pytest` passes on my local development environment. - [x] `pre-commit` passes on my local development environment. `pre-commit` output: ```console (openoversight) xxxxxx@MacBook-Air-5 OpenOversight % make lint pre-commit run --all-files trim trailing whitespace.................................................Passed check docstring is first.................................................Passed check that executables have shebangs.....................................Passed check json...............................................................Passed check for case conflicts.................................................Passed check toml...........................................(no files to check)Skipped check for merge conflicts................................................Passed check xml................................................................Passed check yaml...............................................................Passed fix end of files.........................................................Passed check for broken symlinks............................(no files to check)Skipped mixed line ending........................................................Passed fix python encoding pragma...............................................Passed pretty format json.......................................................Passed fix requirements.txt.....................................................Passed check blanket noqa.......................................................Passed check for not-real mock methods..........................................Passed check for eval().........................................................Passed use logger.warning(......................................................Passed Run isort to sort imports................................................Passed Run pydocstyle...........................................................Passed Do not use shebangs in non-executable files..............................Passed flake8...................................................................Passed black....................................................................Passed djLint formatting........................................................Passed (openoversight) xxxxxx@MacBook-Air-5 OpenOversight % ```
- Loading branch information
1 parent
6f03a78
commit 7be3e2f
Showing
79 changed files
with
3,206 additions
and
2,938 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{% extends "base.html" %} | ||
{% block title %}Forbidden{% endblock %} | ||
|
||
{% block title %} | ||
Forbidden | ||
{% endblock title %} | ||
{% block content %} | ||
|
||
<div class="container theme-showcase" role="main"> | ||
|
||
<h1>Forbidden</h1> | ||
<p>You do not have permissions to view this page. <a href="{{ url_for('main.index') }}">Return to homepage</a>.</p> | ||
|
||
</div> | ||
{% endblock %} | ||
<div class="container theme-showcase" role="main"> | ||
<h1>Forbidden</h1> | ||
<p> | ||
You do not have permissions to view this page. <a href="{{ url_for("main.index") }}">Return to homepage</a>. | ||
</p> | ||
</div> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{% extends "base.html" %} | ||
{% block title %}Page Not Found{% endblock %} | ||
|
||
{% block title %} | ||
Page Not Found | ||
{% endblock title %} | ||
{% block content %} | ||
|
||
<div class="container theme-showcase" role="main"> | ||
|
||
<h1>Page Not Found</h1> | ||
<p>We couldn't find the page you are looking for. <a href="{{ url_for('main.index') }}">Return to homepage</a>.</p> | ||
|
||
</div> | ||
{% endblock %} | ||
<div class="container theme-showcase" role="main"> | ||
<h1>Page Not Found</h1> | ||
<p> | ||
We couldn't find the page you are looking for. <a href="{{ url_for("main.index") }}">Return to homepage</a>. | ||
</p> | ||
</div> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{% extends "base.html" %} | ||
{% block title %}File Too Large{% endblock %} | ||
|
||
{% block title %} | ||
File Too Large | ||
{% endblock title %} | ||
{% block content %} | ||
|
||
<div class="container theme-showcase" role="main"> | ||
|
||
<h1>File Too Large</h1> | ||
<p>The file you are trying to upload is too large. <a href="{{ url_for('main.index') }}">Return to homepage</a>.</p> | ||
|
||
</div> | ||
{% endblock %} | ||
<div class="container theme-showcase" role="main"> | ||
<h1>File Too Large</h1> | ||
<p> | ||
The file you are trying to upload is too large. <a href="{{ url_for("main.index") }}">Return to homepage</a>. | ||
</p> | ||
</div> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{% extends "base.html" %} | ||
{% block title %}Too Many Requests{% endblock %} | ||
|
||
{% block title %} | ||
Too Many Requests | ||
{% endblock title %} | ||
{% block content %} | ||
|
||
<div class="container theme-showcase" role="main"> | ||
|
||
<h1>Too Many Requests</h1> | ||
<p>You're sending requests too fast. Wait a minute and try again. <a href="{{ url_for('main.index') }}">Return to homepage</a>.</p> | ||
|
||
</div> | ||
{% endblock %} | ||
<div class="container theme-showcase" role="main"> | ||
<h1>Too Many Requests</h1> | ||
<p> | ||
You're sending requests too fast. Wait a minute and try again. <a href="{{ url_for("main.index") }}">Return to homepage</a>. | ||
</p> | ||
</div> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{% extends "base.html" %} | ||
{% block title %}Internal Server Error{% endblock %} | ||
|
||
{% block title %} | ||
Internal Server Error | ||
{% endblock title %} | ||
{% block content %} | ||
|
||
<div class="container theme-showcase" role="main"> | ||
|
||
<h1>Internal Server Error</h1> | ||
<p>Oops! Something went wrong. <a href="{{ url_for('main.index') }}">Return to homepage</a>.</p> | ||
|
||
</div> | ||
{% endblock %} | ||
<div class="container theme-showcase" role="main"> | ||
<h1>Internal Server Error</h1> | ||
<p> | ||
Oops! Something went wrong. <a href="{{ url_for("main.index") }}">Return to homepage</a>. | ||
</p> | ||
</div> | ||
{% endblock content %} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,39 @@ | ||
{% extends "base.html" %} | ||
{% import "bootstrap/wtf.html" as wtf %} | ||
{% block title %}OpenOversight Admin - {% if update %} Edit {% else %} Add {% endif %} Officer Salary{% endblock %} | ||
|
||
{% block title %} | ||
OpenOversight Admin - | ||
{% if update %} | ||
Edit | ||
{% else %} | ||
Add | ||
{% endif %} | ||
Officer Salary | ||
{% endblock title %} | ||
{% block content %} | ||
<div class="container theme-showcase" role="main"> | ||
|
||
<div class="page-header"> | ||
<h1>{% if update %} Edit {% else %} Add {% endif %} Officer Salary</h1> | ||
</div> | ||
<div class="col-md-6"> | ||
<form class="form" method="post" role="form"> | ||
<div class="container theme-showcase" role="main"> | ||
<div class="page-header"> | ||
<h1> | ||
{% if update %} | ||
Edit | ||
{% else %} | ||
Add | ||
{% endif %} | ||
Officer Salary | ||
</h1> | ||
</div> | ||
<div class="col-md-6"> | ||
<form class="form" method="post" role="form"> | ||
{{ form.hidden_tag() }} | ||
{{ wtf.form_errors(form, hiddens="only") }} | ||
{{ wtf.form_field(form.salary) }} | ||
{{ wtf.form_field(form.overtime_pay) }} | ||
{{ wtf.form_field(form.year) }} | ||
{{ wtf.form_field(form.is_fiscal_year) }} | ||
<input class="btn btn-primary btn-lg" type="submit" value="{% if update %} Edit {% else %} Add {% endif %}" /> | ||
</form> | ||
<br> | ||
</div> | ||
|
||
</div> | ||
{% endblock %} | ||
<input class="btn btn-primary btn-lg" | ||
type="submit" | ||
value="{% if update %} Edit {% else %} Add {% endif %}" /> | ||
</form> | ||
<br> | ||
</div> | ||
</div> | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.