TheFortyseven is a free and open source django based blogging website along with a personal portfolio. This website contains many features including group based user accesses, blog based comments, admin access and much more.
NOTE: I'll continuously be updating this template and add new features, make sure you fork it and in case you like it, please don't forget to leave a STAR!
The LIVE VERSION of this website can be seen here:
Blog: https://thefortyseven.dev
Portfolio: https://thefortyseven.dev/portfolio
Features:
Complete List of Features:
- Responsive and Minimal Design
- Latest Bootstrap 5 and Django 4
- Secret /admin URL (define your own URL for admin login page)
- REST API based user Login and Signup
- Group based user access
- reCaptcha Integrated Login/Signup Page
- Cookie Consent box
- Blog based Unique IP based view count
- Email based user account verification
- Email based user password reset option
- Editable User Profile
- Froala Editor for writing blogs
- Search Blogs and Users
- Most Viewed Blogs and Recently Updated Blogs section
- Preview Blog before sending for approval
- User Types:
- Superuser
- Edit/Delete any blog from ANY user .
- Approve a blog and make it live.
- Manage user account (Block any user account, Change Password, Edit User Profile Data).
- Resend Verification Email.
- View Contact Messages.
- Manage Subscriptions .
- Staff
- Create/Edit/Delete own blogs.
- See a List of own blogs along with it's Publish Date and Total Views in 'My Blogs' section.
- Viewer
- Comment on any blog
- AWS Deployment Ready
- About, Legal, Contact, Donate Pages
- Sensitive Credentials are stored as ENV variables
Features Demo:
Services - Technologies Used:
The technologies used are listed below:
- Frontend: Bootstrap
- Backend: Django
- Database: PostgreSQL
The technologies used are listed below:
- Server: Apache
- Hosted on: AWS EC2
- Email SMTP: AWS SES
- Static Content: AWS S3
- Database: AWS RDS Postgres and Local
- SSL: Free SSL from CertBot Integrated
Defaults:
By default,
- A user created through signup page is a **Viewer** user type.
- A blog needs to be sent for review so as to get an approval and make it live, until then it sits in the user profile only.
- Editing a blog will take it down from live and it needs an approval again.
- Search Bar will query through Blog Titles and Users FirstName, LastName.
Quick Start Guide:
In order to get this template working, please make sure you follow the steps mentioned below:
(I'm assuming that you already have Python3 and PIP Installed!)
A] GETTING THE PROJECT RUNNING ON YOUR LOCAL SERVER
Download the project from GitHub
Install requirements.txt
Create an account on Google reCaptcha > v3 Admin Console > Create > reCaptcha type: reCaptcha v3 > Domains: 127.0.0.1 > Accept > Submit
Get the GOOGLE_RECAPTCHA_SITE_KEY and GOOGLE_RECAPTCHA_SECRET_KEY
Create a file in your project directory with name as .env and add below code in it.
#=========== DJANGO APP CONFIG ===========
ADMIN_URL = <ANY PATH YOU WISH TO SET INSTEAD OF DEFAULT /ADMIN> #IF SET AS SECRET, YOU'LL HAVE TO LOGIN TO YOUR DJANGO ON /SECRET URL
SECRET_KEY = <YOUR UNIQUE DJANGO SECRET KEY> #YOU CAN GENERATE THIS ONLINE
DEBUG = True
ALLOWED_HOSTS = '127.0.0.1'
CSRF_TRUSTED_ORIGINS = 'http://127.0.0.1'
#============== SET TO True IN PRODUCTION =============
SESSION_COOKIE_SECURE = False
CSRF_COOKIE_SECURE = False
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_SSL_REDIRECT = False
SECURE_HSTS_PRELOAD = False
SECURE_HSTS_SECONDS = 3600
#=========== GOOGLE CAPTCHA CONFIG ===========
GOOGLE_RECAPTCHA_SITE_KEY = <YOUR SITE KEY>
GOOGLE_RECAPTCHA_SECRET_KEY = <YOUR SECRET KEY>
#=========== EMAIL CONFIG ===========
EMAIL_FROM_VERIFY = <YOUR GMAIL ADDRESS>
EMAIL_FROM_RESET = <YOUR GMAIL ADDRESS>
EMAIL_MAIL_SUBJECT = Confirm Your Email
EMAIL_MAIL_HTML = verification-email.html
EMAIL_MAIL_PLAIN = mail_body.txt
EMAIL_TOKEN_LIFE = 3600
EMAIL_PAGE_TEMPLATE = email-confirmation.html
EMAIL_PAGE_DOMAIN = http://127.0.0.1
EMAIL_MULTI_USER = True
EMAIL_HOST = smtp.gmail.com
EMAIL_PORT = 587
EMAIL_HOST_USER = <YOUR GMAIL ADDRESS>
EMAIL_HOST_PASSWORD = <YOUR GMAIL PASSWORD>
EMAIL_USE_TLS = True
#=========== LOCAL POSTGRES DATABASE CONFIG ===========
DB_ENGINE = django.db.backends.postgresql
DB_NAME = <YOUR DATABASE NAME> #THE ONE YOU SET WHILE INSTALLING POSTGRESQL
DB_USER = <YOUR USER NAME> #THE ONE YOU SET WHILE INSTALLING POSTGRESQL
DB_PASSWORD = <YOUR DATABASE PASSWORD> #THE ONE YOU SET WHILE INSTALLING POSTGRESQL
DB_HOST = localhost
DB_PORT = 5432
Run below commands,
#To Setup DB
python manage.py makemigrations
python manage.py migrate
#To run the server
python manage.py runserver
If you go to http://127.0.0.1 you should be able to use the website in the development mode (DEBUG = True)
GitHub Repo:
Click on the below card to checkout the repo on GitHub