Giter Site home page Giter Site logo

kevinbowen777 / django-blog Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 5.39 MB

A simple Django blog application allowing users to create, edit, and delete posts

License: MIT License

Python 6.81% HTML 3.27% CSS 42.92% JavaScript 45.68% Dockerfile 0.20% Shell 1.12%

django-blog's People

Contributors

kevinbowen777 avatar

Watchers

 avatar  avatar  avatar

django-blog's Issues

Migrate to Poetry

Migrate repository from pipenv to poetry for consistant management of
project dependencies.

Override allauth email & password templates

Create new template to match our theme and override the default django-allauth templates for the following:

password_change.html
password_reset_done.html
password_reset_from_key_done.html
password_reset_from_key.html
password_reset.html

Reverse order of posts

When a user makes a new post it should be posted to the top of the page not
the bottom as it is current set up to do.

Add bootstrap

Site looks archaic. Add some basic bootstrap in to improve.

Add comments to posts

Allow users to add, edit, and delete comments on posts. Include the author
name and timestamp on comments.

Set up django-environs

Project has not been set up to use .env files.

Django security best practices - 20220323
============================================
https://pypi.org/project/environs/
python manage.py check –deploy

1. Install environs[django]
-------------------------------
pipenv install environs[django]
poetry add environs[django]

2. Edit config/settings.py
-------------------------------
from environs import Env

env = Env()
env.read_env()

2a. Replace defaults with the following, as appropriate:
----------------------------------------
DEBUG = env.bool("DEBUG", default=False)
SECRET_KEY = env.str("SECRET_KEY")
ALLOWED_HOSTS = ['localhost', '127.0.0.1']
EMAIL_HOST_PASSWORD = env.str("EMAIL_HOST_PASSWORD")
???
DATABASES = {
    "default": env.dj_db_url("DATABASE_URL", default="postgres://postgres@db/postgres")
}
-----------------------

3. Create .env file:
-----------------------
touch .env

Generate new secret key:
python -c 'import secrets; print(secrets.token_urlsafe())'


4. Add the following to .env file as appropriate:
-----------------------------------------------
export DEBUG=True
export SECRET_KEY=blah-blah-blah
export EMAIL_HOST_PASSWORD =
# old key
# SECRET_KEY = 'django-insecure-blah-blah-blah

Add cancel buttons

Add a cancel button where appropriate and return user to previous page.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.