-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathjustfile
More file actions
73 lines (51 loc) · 1.88 KB
/
justfile
File metadata and controls
73 lines (51 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Ejecutar comprobaciones del proyecto Django + Flake8 + Vulture
check:
python manage.py check
flake8 --count **/*.py
# vulture . --exclude node_modules/
# Borrar ficheros temporales y espurios
clean:
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -exec rm -r "{}" \;
find . -type d -name ".sass-cache" -exec rm -r "{}" \;
# Ejecuta las migraciones pendientes"
migrate:
python manage.py migrate
# Ejecutar el servidor en modo producción
run: check static
python manage.py runserver
# Ejecutar el servidor en modo desarrollo
rundev: static
DEBUG=yes python manage.py runserver_plus
# Abre una shell python con el entorno de Django cargado
shell:
python manage.py shell_plus
# Actualiza contenidos estáticos
static:
python manage.py collectstatic --no-input
#sass --sourcemap=none bulma/custom.scss:commons/static/commons/vendor.min.css
#sass --sourcemap=none about/static/about/css/main.scss:about/static/about/custom.min.css
# [Re]crear el fichero ctags
tags:
ctags -R --exclude=@ctags-exclude-names.txt .
# Ejecutar los test pasados como paræmetro (Empezará por el último que haya fallado)
test *args='.':
python3 -m pytest --failed-first -vv -x --log-cli-level=INFO --doctest-modules -m "not slow" {{ args }}
# Muestra información del Harware / S.O. / Python / Django
info:
@echo "This is an {{arch()}} machine"
@echo "OS: {{os()}} / {{os_family()}}"
python3 -V
python3 -c "import django; print(django.__version__)"
uptime
# Acceso al DBShell
dbshell *args='default':
python3 manage.py dbshell --database {{ args }}
# Show migrations
showmigrations $APP='' *args='':
python3 ./manage.py showmigrations {{APP}} {{ args }}
alias sm := showmigrations
# Make migrations
makemigrations $APP='' *args='':
python3 ./manage.py makemigrations {{APP}} {{ args }}
alias mm := makemigrations