kevinbowen777 / django-blog Goto Github PK
View Code? Open in Web Editor NEWA simple Django blog application allowing users to create, edit, and delete posts
License: MIT License
A simple Django blog application allowing users to create, edit, and delete posts
License: MIT License
Application is currently still sending email to the console log.
Set up to use SendGrid.
See https://gist.github.com/kevinbowen777/6ee3b3f66fac58326919782452f2007b for instructions on toolbar installation
Migrate repository from pipenv
to poetry
for consistant management of
project dependencies.
Added 5 new users for testing
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
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.
Migrate this repo from using pipenv
to poetry
for a more consistent dev experience across repositories.
Site looks archaic. Add some basic bootstrap in to improve.
#4fe8e6 resolves
Currently, the width of login and signup fields spans most of the width of the page.
We can reduce the width using the class
parameter in the form. For example:
<form class="col-md-6" method="post">
{% csrf_token %}
{{ form|crispy }}
<button class="btn btn-success" type="submit">Log In</button>
</form>
See Example: Stacked-to-horizontal section here: https://getbootstrap.com/docs/3.4/css/#grid-example-basic
Allow users to add, edit, and delete comments on posts. Include the author
name and timestamp on comments.
Add improved authentication & verification of accounts.
See allauth documentation: https://django-allauth.readthedocs.io/en/latest/
Add 3rd login with GitHub & document the process
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
Document the process of implementing crispy-forms and create a gist for future use.
Add a cancel button where appropriate and return user to previous page.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.