Skip to content

Fully functional Django Heroku school website running on SQLite3 locally and Postgres in Production.

License

Notifications You must be signed in to change notification settings

mundiakaluson/mariseco

Repository files navigation

Django Powered School Website

TravisCI (.org) build status License: GPL v3 Updates Python 3 Maintenance Maintaner Website shields.io Documentation Status PRs Welcome

This Django app is configured to use SQLite3 on the development server and Postgres in the Heroku Production server. However, you can configure a local Postgres server which will also run in production. 😊

The reason why I made a configuration for two different servers is because the django app might finish up all the space on the free heroku Postgres server. Two Databases, more space ☺️!

Features

This website is Django Powered with many different features.

  • User Registration with approval system
  • Blog system with admin approval
  • Comment system with admin approval
  • Event management system
  • Control Panel for dispalying admin contents within the web interface

Apart from these features, the web application also has different relationships in the database.

Relationships

  • The Blog model: -- author = models.ForeignKey(User, on_delete=models.CASCADE, help_text='Article Publisher') - which references to the User model.

  • The Comment model: -- blog = models.ForeignKey(Blog, on_delete=models.CASCADE, related_name="comments", null=True, blank=True) - which references to Blog model to get the current blog in context which will be posted to the database.

  • The Profile model: -- user = models.OneToOneField(User, on_delete=CASCADE, related_name='user_profile', null=True) - This acts as a reference to the Django User model. By extending this model, we get the ability to add more functionality without creating a custom User model which can sometimes be time-consuming.

Installation and running the App

git clone [email protected]:mundiakaluson/mariseco.git
cd mariseco
pipenv install [OR] pip install -r requirements.txt
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver

Don't forget to turn DEBUG to True for development purpose.

Running Tests

Test directory: /main/tests

I have written minimal tests for the app which cover urls and some of the models. If you want to modify the tests, use python manage.py test to run your custom tests.

Still Working on...

  • Email sending system for registration
  • Token generation on successful registration
  • Automatic Comment reviewal system
  • Automatic article reviewal system

Development

Feel free to contribute! I'm open for any changes or improvements. 😀