Update README.md

This commit is contained in:
Andros Fenollosa 2021-07-01 09:46:33 +02:00 committed by GitHub
parent 7707916b62
commit 58952e05a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,14 @@
# Install # Install
## Django ``` sh
make docker.recreate.django
make run.loaddata
make run.server
```
https://programadorwebvalencia.com/django-chat-usando-websockets-con-salas-y-async/ Now open:
`http://api.localhost`
## Gulp ## Gulp
@ -16,53 +22,56 @@ Run.
gulp dev gulp dev
``` ```
# Config ## Tools
## Change path templates Lint
In `settings.py`. ```shell
make lint
``` python
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
``` ```
Update `DIRS`. Formatear
``` python ```shell
'DIRS': [str(BASE_DIR) + '/app/templates/'], make format
``` ```
# Run development Recrear imagen de Django
``` sh ```shell
make run.server make docker.recreate.django
``` ```
Now open: Hacer una nueva migración después de cambiar un model.
`http://api.localhost` ```shell
make makemigrations
```
### Other domains Migrar
```shell
make run.migrate
```
Cargar data mínima.
```shell
make run.loaddata
```
Generar data de desarrollo.
```shell
make run.loaddata.test
```
## Other domains
- Caddy: `http://api.localhost`. - Caddy: `http://api.localhost`.
- Gulp: `http://localhost:3000`. - Gulp: `http://api.localhost:3000`.
- Django: `http://localhost:8000`. - Django: `http://api.localhost:8000`.
- Mailhog: `http://localhost:8025`. - Mailhog: `http://api.localhost:8025`.
- Postgres: `localhost:5432`.
### Bash Django ### Bash Django