Giter Club home page Giter Club logo

backend's Introduction

Cynthesize

Django Backend

Join the chat at https://gitter.im/oppia/oppia-chat

Setting up PostgreSQL

Django version

This project will focus on Django 2.0.7.

Getting started (Windows):

  1. Install Python 3.6.
  2. Clone this repository or download the zip
    git clone https://github.com/Cynthesize/backend/
  3. Make sure you're in the directory you just created:
    cd backend
  4. Create a Python venv:
    virtualenv .venv
  5. Activate the venv:
    "source .venv/bin/activate"
  6. Install Python requirements:
    pip install -r requirements.txt
  7. Move to source directory:
    cd src/
  8. Set required environment variables:
    export POSTGRESQL_ADDON_DB='<DB_NAME>'
    export POSTGRESQL_ADDON_HOST='<DB_HOST>'
    export POSTGRESQL_ADDON_PASSWORD='<DB_PASSWORD>'
    export POSTGRESQL_ADDON_PORT='<DB_PORT>'
    export POSTGRESQL_ADDON_USER='<DB_USER>'
    export DJANGO_SECRET='<YOUR_DJANGO_SECRET>'
  9. Migrate models to database and Collect static files:
    python manage.py makemigrations users
    python manage.py makemigrations ideas
    python manage.py migrate users
    python manage.py migrate ideas
    python manage.py collectstatic
  10. Run development server:
    python manage.py runserver <PORT_NUMBER>

Deploy (Docker):

Required environment variables:

  POSTGRESQL_ADDON_DB='<DB_NAME>'
  POSTGRESQL_ADDON_HOST='<DB_HOST>'
  POSTGRESQL_ADDON_PASSWORD='<DB_PASSWORD>'
  POSTGRESQL_ADDON_PORT='<DB_PORT>'
  POSTGRESQL_ADDON_USER='<DB_USER>'
  DJANGO_SECRET='<YOUR_DJANGO_SECRET>'

See Dockerfile for details.

License

This project follows the GNU GPLv3. See the LICENSE for details.

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.