Skip to content

illegalbyte/djangoblog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

djangoblog 👨‍💻

Test Workflow

A blogging platform built on Django and Python – deployable with PythonAnywhere.com.

Snake Gif

Functionality

A list of existing and planned functionality for my DjangoBlog project.

  • Build models for article content and link with Django admin console
  • Ability to publish posts via the admin console
  • Publish new posts via a webform
  • Edit existing posts
  • Hide the edit functionality for non-authenticated users
  • Add tests for requesting index page
  • Add tests for requesting an individual post's page
  • Add tests for submitting an edit
  • Add tests for posting via webform
  • CI/CD using GitHub Actions
  • Function to create draft posts
  • Additional security via Django decorators and login url
  • Add comment function

Django Basics

Running the server

The Django server is started via the runserver command.

python3 manage.py runserver

Initialising the Admin Panel with a user

python3 manage.py createsuperuser

PythonAnywhere

Updating static files (e.g. CSS) must be done manually via the PythonAnywhere bash console using the following command:

python3 manage.py collectstatic

Once you have a user setup, you can access Django's awesome Admin panel at /admin/. For added security this url can be changed to something more obscure via /mysite/urls.py

Adding models to the database

When creating a new Django project, you must create a models.py file. This file contains the database models. Any additions to the models.py file will only be reflected in the database if you run the following commands:

python3 manage.py makemigrations blog
python3 manage.py migrate blog

Thanks to DjangoGirls for the amazing learning materials

About

A modest blogging platform built on Django and Python.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages