项目作者: Harsh-2909

项目描述 :
Django Blog app with Account Creation and Authentication.
高级语言: Python
项目地址: git://github.com/Harsh-2909/Django-Blog.git
创建时间: 2020-07-30T08:50:34Z
项目社区:https://github.com/Harsh-2909/Django-Blog

开源协议:MIT License

下载


Django Blog App

A Django blog app created using Django v3 and Python 3.8 for educational purpose. This is my first Django project so it’s unrefined around the edges.

Live Site running on Heroku: https://mydjangoblogapp2.herokuapp.com/

Demostration

CREATING A POST

Creating a Post

UPDATING AND DELETING POST

Updating and Deleting a Post

ACCOUNT CREATION AND SIGN IN

Account Creation and Login

How to Setup in Localhost

  1. Clone this repository.
  2. Open the cloned repository.
  3. Install dependencies using pip install -r requirements.txt
    OR
    Install pipenv using pip install pipenv and initialise a Virtual Machine using pipenv install in the directory.
  4. Set environment variables like SECRET_KEY, DEBUG_VALUE, EMAIL_USER, EMAIL_PASS.
  5. Run the Django Server using python manage.py runserver and then goto localhost:8000 or 127.0.0.1:8000 and see the server running.

Environment Variables:

SECRET_KEY: Django secret key which can be any long hexadecimal value. Django recommends atleast 50 characters to make it secure.
DEBUG_VALUE: Set it as “True” for Debug environment and “False” for Production.
EMAIL_USER: The email address that will be used to email incase somebody forgets password.
EMAIL_PASS: The password to that email address. Refer to App Passwords if the email has 2 factor auth.

How to Setup for Production

Refer on how to deploy Python apps in Heroku here and Django app configuration here.

Features

  • Create, update and delete posts.
  • Create account and Login in it.
  • Can send emails incase the user forgets password.
  • Profile System with a profile image.
  • Follows most of the Django security checks.
  • Uses Django Class Views for handling Blog Posts.

Known Issues:

  • Profile image only works in development environment for me, apparantly hosting images in AWS S3 bucket can fix this problem in production.

Please make a GitHub issue if any other bugs are found.

Notes

This project was created on Ubuntu-20.04 LTS and tested under Windows 10 and Ubuntu, and is expected to work fully in other systems too.

This project is still under development. Parts of the source codes may not be well documented. Also suitable prompts may not be available for the user at the moment.

More features and fixes are yet to come. Meanwhile suggestions, ideas, bug reports are welcomed.