Code Monkey home page Code Monkey logo

gcs02's Introduction

Django Basico

Ambiente de Dev

O ambiente de dev utilizar a box ubuntu/trusty64. Para o ambiente web deve ser instalado

sudo apt-get install -y python-pip python-dev libpq-dev postgresql postgresql-contrib
sudo pip install django flake8 psycopg2

Para o ambiente db (banco de dados), deve ser instalado

sudo apt-get install -y postgresql

Após ter tudo instalado, prepare o ambiente db com os seguintes comandos:

sudo su - postgres -c "psql -f /vagrant/db-config.sql"
sudo su - postgres -c 'echo "host all all 192.168.1.10/24 trust" >> /etc/postgresql/9.3/main/pg_hba.conf'
sudo su - postgres -c "echo listen_addresses=\\'*\\' >> /etc/postgresql/9.3/main/postgresql.conf"
sudo service postgresql restart

Após a preparação do ambiente db, prepare o ambiente web com os seguintes comandos.

python manage.py migrate
python manage.py loaddata db.fixture.json

Acesso

Para rodar o projeto:

python manage.py runserver 0:8000

O acesso deve ser feito através do localhost:8000.

gcs02's People

Contributors

alvesisaque avatar

Watchers

James Cloos avatar  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.