Code Monkey home page Code Monkey logo

vortex's Introduction

Vortex

Dependencias

pip freeze > requirements.txt

Django 4.2
psycopg2 2.9.6

Activar el entorno virtual Ejecuta el siguiente comando en la consola en la carpeta raiz de del proyecto

.\venv\Scripts\activate

Si genera error ejecuta esto en con permisos de administrador

Set-ExecutionPolicy Unrestricted

para visualisar los cambios en el administrador de django

python manage.py createsuperuser

http://127.0.0.1:8000/admin/login/?next=/admin/

configurar la base de datos Trasporte/settings.py

Linea: 77 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'trasporte', 'USER': 'postgres', 'PASSWORD': 'holk', 'HOST': 'localhost', 'PORT': '5432', } } y ejecutar las migraciones

crear una BD en postgreSQL: trasporte

python manage.py makemigrations

python manage.py migrate

python manage.py runserver

Http

GET

http://127.0.0.1:8000/api/conductor/ http://127.0.0.1:8000/api/pedido/ http://127.0.0.1:8000/api/vehiculos/ agregar id al final para ver solo un registro

POST

http://127.0.0.1:8000/api/conductor/ { "identificacion": "12312", "apellido": "holk", "nombre": "gato", "telefono": "12312", "direccion": "cra 123" }

http://127.0.0.1:8000/api/pedido/ { "tipo_pedido": "prueba21", "direccion": "Cra 17 66-41dd", "conductor_id": 1 }

http://127.0.0.1:8000/api/vehiculos/ { "modelo": "2020", "placa": "ABC1234", "capacidad": "4" }

PUT

http://127.0.0.1:8000/api/conductor/1 { "identificacion": "12312", "apellido": "holk", "nombre": "gato", "telefono": "12312", "direccion": "cra 123" }

http://127.0.0.1:8000/api/pedido/1 { "tipo_pedido": "prueba21", "direccion": "Cra 17 66-41dd", "conductor_id": 1 }

http://127.0.0.1:8000/api/vehiculos/1 { "modelo": "2020", "placa": "ABC1234", "capacidad": "4" }

DELETE

http://127.0.0.1:8000/api/conductor/1 http://127.0.0.1:8000/api/pedido/1 http://127.0.0.1:8000/api/vehiculos/1

vortex's People

Contributors

holk26 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.