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
#!/bin/bash | |
PIDFILE=gunicorn.pid | |
EXTENSIONS="*.py;*.html;*.css;*.js" | |
APP=wsgiapp:application | |
WORKERS=3 | |
function runserver() { | |
echo "Starting gunicorn" | |
PYTHONPATH=.:bin gunicorn $APP -w $WORKERS --pid $PIDFILE -D | |
echo "gunicorn started with PID $!" |
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
# STATIC_URL must have one space before and one after (or change regex below). URLs must be enclosed with double quotes. | |
rgrep '{{ STATIC_URL }}' . -l | xargs perl -pi -e 's/"\{\{ STATIC_URL \}\}(.*?)"/"{% static '"'"'\1'"'"' %}"/' |
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
"""Simple content negotiation | |
Usage: | |
Example 1: | |
from renderers import render | |
@router.post("/myapp/items/") | |
async def api_login(item: Item, accept: Optional[str] = Header(default='application/jwt')): |
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
[tool.poetry] | |
name = "kk" | |
version = "0.1.0" | |
description = "" | |
authors = ["Ernesto Revilla <[email protected]>"] | |
[tool.poetry.dependencies] | |
python = "^3.8" | |
[tool.poetry.dev-dependencies] |