Skip to content

Instantly share code, notes, and snippets.

@jefftriplett
Last active July 4, 2019 20:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jefftriplett/c28c603c920e649d54edede311a5e87e to your computer and use it in GitHub Desktop.
Save jefftriplett/c28c603c920e649d54edede311a5e87e to your computer and use it in GitHub Desktop.
Django + Modd + Maybe Docker
# Run the test suite if a source or test file changes
**/tests/test_*.py {
# prep +onchange: pytest @dirmods
prep +onchange: pytest @mods
}
requirements.txt {
# prep +onchange: pytest @dirmods
prep +onchange: "
pip install -U -r requirements.txt
pip list --outdated"
}
**/models.py {
# prep +onchange: pytest @dirmods
prep +onchange: "
echo @mods
python manage.py makemigrations
python manage.py migrate
black ."
}
# Server runs on port localhost:8080
*.py !**/tests/test_*.py !**/models.py {
daemon: "
# django
python manage.py runserver"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment