A simple POC for Blog application, build with Django 2.
As commons simple blog platform, here are the essential features:
- Multi user authorization.
- Post category and tags
- Post comments
- Admin-Page: Manage users, categories, tags, posts, comments
- Front-Page: Home, About, Archive, Categories, Tags, Post
- Responsive view for both admin & front page.
All admin page operations are base on Django Admin page.
-
Python 3.6.x or more updated.
-
Django 2.x, I used Django 2.1 when this project was built.
-
Django CKEditor, for wysiwyg editor.
-
Unittests, unit test framework.
-
PyHamcrest, objects matcher test lib.
-
Unittests.Mock, mock test lib.
-
Coverage, coverage unit test lib.
Or view the requirements.txt
file.
From projecr root, run:
pip install -r requirements.txt
-
Blog Setup
For blog setup please open and edit the
blog/blogsettings.py
with your own preference. -
For first time, run:
# create all required migration py manage.py makemigrations # execute the migration script py manage.py migrate
# run the Django unit test
py manage.py test
# run the coverage unit test
coverage run --source='.' manage.py test blog
# view terminal coverage report
coverage report
# view html coverage report
coverage html
# erase/remove gathered data
coverage erase
To run as local server:
py manage.py runserver
Main page (front-page) can be access from http://localhost:8000
-
Default admin page url is http://localhost:8000/admin
Default admin page account is username:
admin
and password:admin123
Coming soon..
- Django - Writing and Running Test
- Codecov Python Example
- Set Up Travis CI For Django project
- Deploy Django application on Heroku
Copyright 2018 Maikel Chandika (mkdika@gmail.com). Code released under the Apache License, Version 2.0. See LICENSE file.