aurweb/templates
Kevin Morris d674aaf736 add /tu/ (get) index
This commit implements the '/tu' Trusted User index page.

In addition to this functionality, this commit introduces
the following jinja2 filters:

- dt: util.timestamp_to_datetime
- as_timezone: util.as_timezone
- dedupe_qs: util.dedupe_qs
- urlencode: urllib.parse.quote_plus

There's also a new decorator that can be used to enforce
permissions: `account_type_required`. If a user does not
meet account type requirements, they are redirected to '/'.

```
@auth_required(True)
@account_type_required({"Trusted User"})
async def some_route(request: fastapi.Request):
    return Response("You are a Trusted User!")
```

Routes added:

- `GET /tu`: aurweb.routers.trusted_user.trusted_user

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-06-26 01:03:27 -07:00
..
account add account (view) route 2021-06-05 20:11:17 -07:00
errors Adding route tests 2021-06-05 19:52:56 -07:00
partials add /tu/ (get) index 2021-06-26 01:03:27 -07:00
tos [FastAPI] add /tos routes (get, post) 2021-06-24 19:12:49 -07:00
tu add /tu/ (get) index 2021-06-26 01:03:27 -07:00
index.html port over base HTML layout from PHP to FastAPI+Jinja2 2021-06-05 19:50:51 -07:00
login.html implement login + logout routes and templates 2021-06-05 20:11:17 -07:00
passreset.html add passreset routes 2021-06-05 20:11:17 -07:00
register.html add user registration routes 2021-06-05 20:11:17 -07:00