Django Social Network
A Social Network derived from the open source Bootcamp project, with new features and design.
Demo: https://www.antisocialnetwork.live
New features include:
- New design
- Login with Facebook
- Content filtering (filter what users post)
- Add or Follow friends
- Chat with friends
- See friends login and posts activity
- Dark mode
The project has four basic apps:
- Feed (A Twitter-like microblog)
- Articles (A collaborative blog)
- Question & Answers (A Stack Overflow-like platform)
- Messenger (A basic chat-a-like tool for asynchronous communication.)
Technology Stack
- Python 3.6.x / 3.7.x
- Django 3
- PostgreSQL
- Redis 5.0
- Daphne
- Caddy
- Docker
- docker-compose
- WhiteNoise
- Bootstrap 4
- jQuery 3
- Django-channels (for WebSockets)
- Sentry
- Mailgun
- Cookiecutter
Create tables in DB
$ python manage.py migrate
Run application
$ python manage.py runserver
Test coverage
To run the tests, check your test coverage, and generate a simplified coverage report:
$ pytest
To generate an HTML report:
$ coverage html $ open htmlcov/index.html
To check the report in console:
$ coverage report -m
Sentry
Sentry is an error logging aggregator service. You can sign up for a free account or download and host it yourself. The system is setup with reasonable defaults, including 404 logging and integration with the WSGI application.
You must set the DSN url in production.
Deployment
The following details how to deploy this application.
Heroku
See detailed cookiecutter-django Heroku documentation.
Docker
See detailed cookiecutter-django Docker documentation.
Flat pages
Load initial data for flatpages from fixtures folder:
$ python manage.py loaddata fixtures/flatpages_data.json