Django backend of Helium's planner application

Overview

CI/CD Codecov Python Versions GitHub License

Helium Platform Project

Prerequisites

  • Python (>= 3.6)
  • Pip (>= 9.0)
  • MySQL (>= 5.7)
  • Redis (>= 3.2)

Getting Started

The Platform is developed using Python and Django.

Project Setup

If developing on Mac, first install Homebrew and install MySQL with brew install mysql.

To setup the Python/Django Platform build environment, execute:

make install

This project is configured to work with a Virtualenv which has now been setup in the .venv folder. If you're unfamiliar with how this works, read up on Virtualenv here. The short version is, virtualenv creates isolated environments for each project's dependencies. To activate and use this environment when developing, execute:

source .venv/bin/activate

All commands below will now be run within the virtualenv (though make commands will always automatically enter the virtualenv before executing).

To ensure the database is in sync with the latest schema, database migrations are generated and run with Django. To run migrations, execute:

make migrate

Once migrations have been run, you can create a super user, which is a standard user that also has access to the /admin site.

python manage.py createsuperuser

Before commits are made, be sure to run tests and check the generated coverage report.

make test

Development

Modules

The Platform project is split up into several modules, all contained within this repository. They are independent modules that can be deployed separately, functioning on separate nodes for scalability.

The project's base configuration is defined under conf. Application-specific configuration variables should have their application name as their prefix.

  • auth
  • common
  • feed
  • importexport
  • planner

Vagrant Development

To emulate a prod-like environment, use the Vagrant box. It's setup is described more thoroughly in the deploy project. This is the recommended way to develop and test for production as this environment is provisioned in the same way other prod-like environments are deployed and interacts with related projects as necessary.

As the Vagrant environment does take a bit more time to setup (even though the setup is largely automated) and can consume more developer and system resources, the local development environment described below is the quickest and easiest way to get up and running.

Local Development

This is the simplest way to get started with minimal effort. To get going (assuming you have followed the "Getting Started" directions above), you should have the ENVIRONMENT environment variable set to "dev".

Now you're all set! To start the development server, execute:

bin/runserver

A development server will be started at http://localhost:8000.

If the USE_NGROK environment variable is set when a dev server is started (using runserver, pyngrok will be used to open a ngrok tunnel.

Additionally, this project also contains a worker that executes asynchronous or scheduled tasks, and the above server can be started with this worker as well. When developing locally, it is less necessary to run this worker (when ENVIRONMENT is "dev", tasks are executed synchronously), but it may still be useful, especially for testing scheduled tasks, so a standalone executable is provided for convenience. To start the server with the worker, ensure Redis is installed locally and instead execute:

bin/runserver --with-worker

Note that credentials to third-party services (for example, AWS services like SES) need to be set in the .env file before those services will work properly. Do NOT commit real credentials to third-party services, even in example files.

Frontend

The frontend is served from a separate repository and can be found here.

Note that the frontend was previously bundled, rendered, and served as a part of this project, but it was pulled out into its own project with the with 1.4.0 release. For reference, checkout the 1.3.8 tag or download it here to see how this was previously done.

Documentation

Auto-generated API documentation is accessible via any environment at /docs. Additional documentation can be found on the Platform Wiki.

A music recommendation REST API which makes a machine learning algorithm work with the Django REST Framework

music-recommender-rest-api A music recommendation REST API which makes a machine learning algorithm work with the Django REST Framework How it works T

The Reaper 1 Sep 28, 2021
Repo for All the Assignments I have to submit for Internship Application !😅

Challenges Repository for All the Assignments I have to submit for Internship Application ! 😅 As You know, When ever We apply for an Internship, They

keshav Sharma 1 Sep 08, 2022
Exploit Discord's cache system to remote upload payloads on Discord users machines

Exploit Discord's cache system to hide payloads PoC Remote upload embedded payload from image using EOF to Discord users machines through cache. Depen

cs 169 Dec 20, 2022
Source files for a free pyRevit toolbar.

pyRoovit (WIP) What is this? PyRoovit is/will be a toolbar for the use with pyRevit built by Gavin Crump (aka Aussie BIM Guru). Having used and taught

Gavin Crump 11 Nov 10, 2022
Simply integrate Summernote editor with Django project.

django-summernote Summernote is a simple WYSIWYG editor. django-summernote allows you to embed Summernote into Django very handy. Support admin mixins

Summernote 936 Jan 02, 2023
APIs for a Chat app. Written with Django Rest framework and Django channels.

ChatAPI APIs for a Chat app. Written with Django Rest framework and Django channels. The documentation for the http end points can be found here This

Victor Aderibigbe 18 Sep 09, 2022
Django admin CKEditor integration.

Django CKEditor NOTICE: django-ckeditor 5 has backward incompatible code moves against 4.5.1. File upload support has been moved to ckeditor_uploader.

2.2k Dec 31, 2022
Domain-driven e-commerce for Django

Domain-driven e-commerce for Django Oscar is an e-commerce framework for Django designed for building domain-driven sites. It is structured such that

Oscar 5.6k Jan 01, 2023
Django React Project Setup

Django-React-Project-Setup INSTALLATION: python -m pip install drps USAGE: in your cmd: python -m drps Starting fullstack project with Django and Reac

Ghazi Zabalawi 7 Feb 06, 2022
Analytics services for Django projects

django-analytical The django-analytical application integrates analytics services into a Django project. Using an analytics service with a Django proj

Jazzband 1.1k Dec 31, 2022
It takes time to start a Django Project and make it almost production-ready.

It takes time to start a Django Project and make it almost production-ready. A developer needs to spend a lot of time installing required libraries, setup a database, setup cache as well as hiding se

Khan Asfi Reza 1 Jan 01, 2022
django+bootstrap5 实现的 个人博客

项目状态: 正在开发中【目前已基本可用】 项目地址: https://github.com/find456789/django_blog django_blog django+bootstrap5 实现的 个人博客 特点 文章的历史版本管理(随时回退) rss、atom markdown 评论功能

名字 3 Nov 16, 2021
WeatherApp - Simple Python Weather App

Weather App Please star this repo if you like ⭐ It's motivates me a lot! Stack A

Ruslan Shvetsov 3 Apr 18, 2022
PWA is a simple Django app to develope and deploy a Progressive Web Application.

PWA PWA is a simple Django app to develope and deploy a Progressive Web Application. Detailed documentation is in the "docs" directory. Quick start Ad

Nima 6 Dec 09, 2022
TinyApp - A Python (Django) Full Stack Application for shortening URLs

TinyApp A Python (Django) Full Stack Application for shortening URLs. How to sta

Li Deng 1 Jan 23, 2022
Django Audit is a simple Django app that tracks and logs requests to your application.

django-audit Django Audit is a simple Django app that tracks and logs requests to your application. Quick Start Install django-audit pip install dj-au

Oluwafemi Tairu 6 Dec 01, 2022
Simple application TodoList django with ReactJS

Django & React Django We basically follow the Django REST framework quickstart guide here. Create backend folder with a virtual Python environment: mk

Flavien HUGS 2 Aug 07, 2022
Django-Docker - Django Installation Guide on Docker

Guía de instalación del Framework Django en Docker Introducción: Con esta guía p

Victor manuel torres 3 Dec 02, 2022
Django Login Api With Python

How to run this project Download and extract this project Create an environment and install all the libraries from requiements.txt pip freeze -r requi

Vikash Kisku 1 Dec 10, 2021
Add a help desk or knowledge base to your Django project with only a few lines of boilerplate code.

This project is no longer maintained. If you are interested in taking over the project, email Zapier 487 Dec 06, 2022