Skip to content

ALU_Blog is an online platform built to connect all communities at ALU under one platform to share news and opportunities.

Notifications You must be signed in to change notification settings

ahmedmeshref/ALU_Blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ALU_Blog

Version 1.0.0

The African Leadership University is growing with two communities, one in Rwanda and another in Mauritius. From an institutional level, both campuses might be well linked and growing together under one institution. But, from the students' perspective, each community is separated and there doesn’t exist one platform that brings both communities together to facilitate and encourage the process of communication between members, opportunities and experience sharing between students, … etc. ALU Blog platform is meant to be a joint to link both communities together under one platform with all staff and students from both campuses together to share and discuss news, opportunities, issues, … etc.

Installation

Be sure to use the same version of the code as the version of the docs you're reading. You probably want the latest tagged version, but the default Git version is the master branch. ::

# clone the repository
$ git clone https://github.com/ahmedmeshref/ALU_Blog.git 
# navigate to the directory of the downloaded folder
$ cd ALU_Blog

Setup your database

Open SQL shell

# create a new database from sql shell
$ CREATE DATABASE ALU_Blog;

Use the package manager pip to install all required libraries.

# install all required packages from the requirements file
$ pip install -r requirements.txt

Edit Configuration file

Edit the following attributes from the config file

  • SECRET_KEY = 'Use any random 16 characters'
  • SQLALCHEMY_DATABASE_URI = "postgresql://UserName:Password@localhost:5432/ALU_Blog"
  • MAIL_USERNAME = "Your Gmail username"
  • MAIL_PASSWORD = "Your Gmail password"

Run

$ python app.py

Open http://127.0.0.1:5000 in a browser.

Instructions

  • If you use the register page, then the system will create an end user account
  • For super admin, register and then change your account to a super admin using sql
  • To add admins, you need to be register as a super admin.

Deployment Heroku

To deploy the website on Heroku

Install guinicorn locally

$ pip install gunicorn

Install Heroku CLI

https://devcenter.heroku.com/articles/heroku-cli

Login via CLI

$ heroku login

Create app

$ heroku create alublog

Create database

$ heroku addons:create heroku-postgresql:hobby-dev --app alublog

Get URI

$ heroku config --app alublog

# set the BADATBASE_URI to the output 

Deploy with Git

$ git add . 
$ git commit -m 'Final Deploy'
$ heroku git:remote -a alublog
$ git push heroku master

Add table to remote database

$ heroku run python
$ from blog import db
$ db.create_all()
$ exit()

Visit app

# command will direct you to the website
$ heroku open

Built With

  • Flask - The web framework used
  • Postgresql - Database management system
  • JavaScript - Used for async communication between the front-end and back-end
  • Jinja2 - Used for creating templates
  • Bootstrap - Used for styling the html

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Authors

License

MIT

About

ALU_Blog is an online platform built to connect all communities at ALU under one platform to share news and opportunities.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published