Giter VIP home page Giter VIP logo

gdsc-plm-backend-02's Introduction

About GDSC-PLM-BACKEND-02

  • A series of activities provided to learn Django as a whole and as a backend

Requirements

Setup

  • Virtual Environment
  1. Use virtualenv to add a virtual environment
    virtualenv venv
  1. Activate the environment
    source venv/bin/activate  #Ubuntu
  1. Deactivate enviroment
    deactivate
  1. Remove environment
    rm -rf venv

Check this info for windows

  • Install requirements for python3
  1. (Optional) Upgrade Tools
    pip3 install --upgrade setuptools #pip only for Windows
  1. (Optional) Upgrade Pip
    python3 -m pip install --upgrade pip #python only for Windows unless there is other version
  1. Install requirements in requirements.txt
    pip3 install -r requirements.txt
  • Environment Variables
  1. In source folder aligned with manage.py create .env file
    plmat-drf\
        ... # other files
        .env
        manage.py
  1. Create variables inside env file
    1. For development, copy the variables inside the development.env to .env
    2. For production, copy the variables inside the production.env to .env
  • Setup Postgresql
  1. Follow the installation on this guide
  2. By default
    server: localhost
    database: postgres
    port: 5432
    username: postgres
    password: <your password entered via installation>
  1. Those keys will be used via .env DATABASE_URL, replace:
    DATABASE_URL = "postgresql://<yourusername>:<yourpassword>@<yourhost>:<yourport>/<yourdatabase>"

    e.g  DATABASE_URL = "postgresql://root:123@root:5432/test"
  • Common Commands for Django
  1. Makemigrations
    python3 manage.py makemigrations
  1. Migrate Applications
    python3 manage.py migrate

Run Servers

  1. Run server for Django
    python3 manage.py runserver (port) # default is 8000

gdsc-plm-backend-02's People

Contributors

kiel-hyre 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.