Giter Site home page Giter Site logo

trellixvulnteam / exo-currency_vlzk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sorianomarmol/exo-currency

0.0 0.0 0.0 13.72 MB

ExoCurrency​ will be a web platform that allows users to calculate currency exchange rates - fixer.io integration

Shell 0.02% JavaScript 1.63% Python 96.15% CSS 1.15% HTML 1.05%

exo-currency_vlzk's Introduction

Toda la información se encuentra en: "Documentación_ExoCurrency_v1.pdf"


Pasos para lanzar el proyecto Django

Se recomienda usar virtualenv.

1) crear virtualenv

sudo apt-get install python3-venv
python3 -m venv exo_investing

2) una vez creado, localizar el activate para activarlo y comenzar a trabajar

cd ~/virtualenvs/exo_investing/
source exo_investing/bin/activate


Instalar dependencias

pip install -r requirements.txt

Hay un warning que no afecta para poder trabajar, es el siguiente:

Building wheels for collected packages: unicode-slugify
 Running setup.py bdist_wheel for unicode-slugify ... error
 Complete output from command /home/rsoriano/exo_investing/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-suh28xwu/unicode-slugify/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpcf03ufmnpip-wheel- --python-tag cp35:
 usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
    or: -c --help [cmd1 cmd2 ...]
    or: -c --help-commands
    or: -c cmd --help
 
 error: invalid command 'bdist_wheel'
 
 ----------------------------------------
 Failed building wheel for unicode-slugify
 Running setup.py clean for unicode-slugify

No afecta para trabajar y si se vuelve a ejecutar el pip install no vuelve a aparecer


Migrar y crear super usuario

Dentro de la carpeta exo-currency

python manage.py migrate
python manage.py collectstatic
python manage.py createsuperuser

La migración nº 2 cargará las monedas de ejemplo. Se encuentran en settings (EXAMPLE_CURRENCIES)

Lanzar servidor, acceder al panel de administración, y dar de alta los Provider (uno por cada adapter)

http://127.0.0.1:8000/admin/exchange_rates/provider/add/
Ambos deben estar activo
Se recomienda establecer en el orden primero el de Fixer




Algunos settings a destacar

FIXER_FORCE_EXCEPTION
Por defecto a False, permite forzar una excepción el Fixer para probar el siguiente Provider (poder probar como responde ante fallos, el orden, el mock, etc.)
SHOW_PROVIDER
Devolverá el provider con los datos. 
Poder ver la fuente de los datos almacenados
 RANDOM_RANGE_INIT / RANDOM_RANGE_END
Valores aleatorios para los Rates del mock

Cuando esté todo a punto, se puede acceder a http://127.0.0.1:8000/api/v1/currency_rates/ que debe devolver los datos del día.

exo-currency_vlzk's People

Contributors

sorianomarmol avatar trellixvulnteam 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.