You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Celestino Rey 9065dfe63e Corrijo api para que busque coche por matrícula 9 months ago
Yamls Corrijo api para que busque coche por matrícula 9 months ago
nginx Cambio a puerto 8080 9 months ago
src Corrijo api para que busque coche por matrícula 9 months ago
Dockerfile Expongo puerto 8080 9 months ago
README.md Corrijo api para que busque coche por matrícula 9 months ago
entra.sh Limpio migrations 9 months ago
nuevaapp.sh Limpio migrations 9 months ago

README.md

Versión para openshift

Instalación

Crear un proyecto y luego añadir una app desde Agregar, importar desde git.

oc new-app http://gitea.reymota.es/creylopez/ReyMotaAppsOC.git -e DEBUG="False" -e VERSION=11.0 --name='reymota'

Tal y como está la estructura de directorios, deberia detectar automáticamente una compilación Python

python manage.py createsuperuser

python manage.py makemigrations

python manage.py migrate

Comprobar la base de datos

Con la shell entraPsql.sh:

\l para listar las BD

\c reymota para usar nuestra db \dt para ver las tablas

De dónde cogí ideas

https://learndjango.com/tutorials/django-login-and-logout-tutorial

Username: {{ user.username }}

User Full name: {{ user.get_full_name }}

User Group: {{ user.groups.all.0 }}

Email: {{ user.email }}

Session Started at: {{ user.last_login }}

Para funcionar con gunicorn y nginx

https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/

Cambiar la secuencia de lo sid

ALTER SEQUENCE tablename_id_seq RESTART WITH nn;

esto se hace cuando restauro un volcado de la bd sobre una instalación nueva. Si hay índices ya creados, hay que reinciar a partir del último.