bluelearn Exclusive Forest App!!
Explore the code »
Visit the site
·
Report Bug
·
Request Feature
Table of Contents
blueforest is a pomodoro app made for bluelearn Discord Server.
Major Frameworks used in the development and Production of this web app is as follows
Setting up the project locally maybe headache for the first time but believe me it is very easy.
- Python
Python version 3.9.2 is used in this project
- Django installed globally
pip install django -g
- Postgres
PostGres
Download and Install postgres from the link below
- Virtualenv
pip install virtualenv
- You should compulsorily become a member of bluelearn Discord Server link -> bluelearn
-
Create a Virtual enviornment
python -m venv csenv
source ./csenv/Scripts/activate
-
Clone the repo
git clone https://github.com/Clinify-Open-Sauce/ClinifyForest.git
-
Install requirements
pip install -r requirements.txt
-
Setup the database
- Search and open psql from windows search
- create and connect to localhost:5432
- setup new password for postgres
- run below command
CREATE DATABASE clinifyforest;
-
Creating a Discord Application
- Visit the Discord Developers Portal
- Login if you are not
- Click on "New Application"
- Name your application whatever you want
- Head over to
OAuth2
section and click onAdd Redirect
- Add this url
http://127.0.0.1:8000/login/redirect
- Click on
Save Changes
- Now under
OAuth2 URL Generator
- Select redirect url as
http://127.0.0.1:8000/login/redirect
- Under scopes, select
identify
andguilds
- A new url will be generated at the bottom. Copy it!
-
Environment Variables
- In the root folder where
manage.py
file lies, create a new.env
file - Paste the below text to
.env
file
SECRET_KEY=secretkey DBENGINE=django.db.backends.postgresql DBNAME=clinifyforest DBUSER=postgres DBPASSWORD=<yourpassword> DBHOST=localhost DBPORT=5432 OAUTHURL=<your-oauth-url> REDIRECT_URL=http://127.0.0.1:8000/login/redirect CLINIFY_SERVER_ID=740589508365385839 MY_DISCORD_CLIENT_ID=<your-discord-client-id> MY_DISCORD_CLIENT_SECRET=<your-discord-client-secret>
- replace
<yourpassword>
with your postgres password which you just set in step 4 - replace
<your-oauth-url>
with the oauthurl you copied at last in the step 5 - replace
<your-discord-client-id>
with your discord developers client id - replace
<your-discord-client-secret>
with your discord developers client secret
- In the root folder where
-
Create local settings
- Open the folder in any code editor
- Head over to the
ClinifyForest
Folder - Create a new file called
local_settings.py
- Paste this code in the file
import os from .settings import BASE_DIR DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = ['127.0.0.1', 'localhost', '0.0.0.0'] TZC = 0
- save
local_settings.py
-
Make migrations
python manage.py makemigrations
python manage.py sqlmigrate login 0001 python manage.py sqlmigrate main 0001 python manage.py sqlmigrate search 0001
python manage.py migrate
-
Run the server
python manage.py runserver
Now you are good to go visit localhost:8000
-
Create Super User
python manage.py createsuperuser
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Your Name - @tiluckdave -
Discord Tag - @tiluckdave#4120
Project Link: https://github.com/Clinify-Open-Sauce/ClinifyForest