Skip to content

Commit cfc0cd7

Browse files
committed
Docs: Translate dev setup to Spanish
1 parent 2cb803a commit cfc0cd7

1 file changed

Lines changed: 29 additions & 29 deletions

File tree

docs/dev.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,69 @@
1-
# Development setup
1+
# Configuración para desarrollo
22

3-
## Docker environment
3+
## Entorno de Docker
44

5-
This project needs a variety of requirements and it's highly recommended to set up a development environment through [Docker](https://www.docker.com/).
5+
Este proyecto tiene requisitos variados que hacen altamente recomendable configurar un entorno de desarrollo usando [Docker Compose](https://docs.docker.com/compose/).
66

7-
1. Clone this repository.
8-
2. Launch containers (building if proceed):
7+
1. Clona este repositorio.
8+
2. Inicia los contenedores:
99
```console
10-
$ docker-compose up # leave this running and open new tab
10+
$ docker-compose up # Deja esto ejecutando y abre una nueva pestaña
1111
```
12-
3. Run the database migrations:
12+
3. Ejecuta las migraciones de la base de datos:
1313
```console
1414
$ docker-compose exec web ./manage.py migrate
1515
```
16-
4. Add initial test data to the DB (You will need this to test the web app):
16+
4. Añade datos iniciales de pruebas a la base datos (necesitarás esto para testear la app):
1717
```console
1818
$ docker-compose exec web ./manage.py dbload
1919
```
2020

2121
---
2222

23-
> Instead of 3) and 4) you can load a (production) database dump using:
23+
> Si dispones de un volcado de la base de datos de pruebas o producción, puedes cargarlo así, en sustitución de los pasos 3 y 4:
2424
2525
```console
2626
$ docker-compose exec -T database /bin/bash -c \
2727
'PGPASSWORD=$POSTGRES_PASSWORD psql -U $POSTGRES_USER -d $POSTGRES_DB' < /path/to/db_dump.sql
2828
```
2929

30-
> If you want to reproduce this last step afterwards, first be sure to remove the database volume with: `docker volume rm pycan-web_database-data`.
30+
> Para reproducir este último paso más adelante, asegúrate primero de borrar el volumen de la base datos con: `docker volume rm pycan-web_database-data`.
3131
3232
---
3333

34-
5. Create a default superuser:
34+
5. Crea un superusuario:
3535
```console
3636
$ docker-compose exec web ./manage.py create_default_admin # admin | admin
3737
```
3838

39-
That's it, now visit http://localhost:8000/
39+
Eso es todo, ahora puedes visitar http://localhost:8000/
4040

41-
> Note that both the database and the web app bind their ports to the host. If you have port conflicts, you can export the environment variables `PYCAN_DB_PORT` and, `PYCAN_APP_PORT` to the desired ports in the host for, respectively, the database and the app, before running `docker-compose up`.
41+
> Nótese que tanto la base de datos y la app web enlazan sus puertos de los contenedores a los del sistema host. Si tienes conflictos con puertos, puedes exportar las variables de entorno `PYCAN_DB_PORT` y, `PYCAN_APP_PORT` con los puertos elegidos en el sistema host para, respectivamente, la base de datos y la app, antes de ejecutar `docker-compose up`.
4242
43-
### Administrative interface
43+
### Interfaz Administrativa
4444

45-
You can access the Django administrative interface visiting http://localhost:8000/admin using credentials: `username: admin` | `password: admin`
45+
Puedes acceder a la interfaz administrativa de Django yendo a https://docs.docker.com/compose/ y usando las credenciales `admin` / `admin`.
4646

47-
### Media
47+
### Multimedia
4848

49-
If you have a bunch of (production) files for media, you can leave them in the folder `$PROJECT/media`. A docker volume is set up to collect them from there.
49+
Si dispones de ficheros multimedia para testing o como copias de producción, puedes ponerlos en el directorio `$PROJECT/media`. Hay un volumen de Docker Compose configurado para cargarlos desde ahí.
5050

51-
## Code style
51+
## Estilo de código
5252

53-
Some hints should be followed in order to homogenize **Python** code style:
53+
Intentamos homogeneizar nuestro estilo de código en Python:
5454

55-
- Indenting with 4 spaces.
56-
- Max line length: 79 chars.
57-
- Imports ordering like in [PEP8](https://www.python.org/dev/peps/pep-0008/#imports).
58-
- Python linter: [Flake8](https://flake8.pycqa.org/en/latest/)
59-
- Python autoformatter: [Black](https://github.com/psf/black)
55+
- Indentado con 4 espacios.
56+
- Máximo ancho de línea: 79 caracteres.
57+
- Orden de imports como indica [PEP8](https://www.python.org/dev/peps/pep-0008/#imports).
58+
- Linter de Python: [Flake8](https://flake8.pycqa.org/en/latest/)
59+
- Autoformateador de Python: [Black](https://github.com/psf/black)
6060

61-
## VSCode over Docker
61+
## VSCode y Docker
6262

63-
One of the multiple options for editing code is [Visual Studio Code](https://code.visualstudio.com/). A nice feature is to link a remote container and configure the IDE installing the required tools on it.
63+
Si usas [Visual Studio Code](https://code.visualstudio.com/), puedes enlazar un contenedor remoto y configurar el IDE para usarlo.
6464

65-
In order to use the Docker development environment in VSCode you have to install the extension [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).
65+
Para usar el entorno de desarrollo Docker Compose en VSCode, instala la extensión [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers).
6666

67-
The folder `.devcontainer` already contains the necessary files to enable the Docker "remote" container. Just follow [these instructions](https://code.visualstudio.com/docs/remote/containers) to enable it.
67+
El directorio `.devcontainer` contiene la configuración necesaria para dar soporte a esta integración. Sigue [estas instrucciones](https://code.visualstudio.com/docs/remote/containers) para habilitarlo.
6868

69-
> A good tutorial for setting up VSCode over Docker was broadcasted by Python Malaga. [Check it out](https://www.youtube.com/watch?v=mxpq0ntJ8T8)!
69+
> Python Malaga tiene un buen [tutorial de cómo configurar VSCode usando Docker](https://www.youtube.com/watch?v=mxpq0ntJ8T8).

0 commit comments

Comments
 (0)