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 ☺️ !
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.
-
The
Blog
model: --author = models.ForeignKey(User, on_delete=models.CASCADE, help_text='Article Publisher')
- which references to theUser
model. -
The
Comment
model: --blog = models.ForeignKey(Blog, on_delete=models.CASCADE, related_name="comments", null=True, blank=True)
- which references toBlog
model to get the currentblog
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 DjangoUser
model. By extending this model, we get the ability to add more functionality without creating a customUser
model which can sometimes be time-consuming.
git clone git@github.com: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.
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.
- Email sending system for registration
- Token generation on successful registration
- Automatic Comment reviewal system
- Automatic article reviewal system
Feel free to contribute! I'm open for any changes or improvements. 😀