Git Product home page Git Product logo

gammingportal's Introduction

Backend Guide

After cloning follow the steps to setup

  1. Create virtual environment with Pyenv/virtualenv for python
  2. pip install -r requirements.txt

To start the server

python manage.py run

To migrate the databsae

  1. python manage.py db init
  2. python manage.py db migrate
  3. python manage.py db upgrade

To add the models

  1. Create {model}.py files in the models folder
  2. import the same file in the models/init.py
  3. run the db migrate and upgrade command again

To create the routes

  1. Create the {route}.py file in the route folder
  2. import the file into routes/init.py
  3. if the routes are blueprint then register the blueprint under 'register_blueprints' function in the init.py files
  4. If the routes are flask RESTful, api.add_resource({RESTful_name}, '{route}')

To create the services

Add any interaction with data and models into the services folder

To create the utils functionality

Add the utility functions in the 'utils' folder.

To change the DB settings

  1. Open the settings.py in the root folder
  2. Change the database URI in SQLALCHEMY_DATABASE_URI based on the development env

gammingportal's People

Contributors

chiragb125 avatar chiragb7901 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.