petrichbg / blogthedata

Django blog site

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

blogthedata

A blog about Python and JavaScript web development

Build Status Coverage Status License

image


Table of Contents

Installation

    # first install Python 3.8.10 (have not tested newer versions, but they could work)
    $ git clone https://github.com/jsolly/blogthedata.git
    $ python3 -m venv blogthedata/django_project/venv
    $ source blogthedata/django_project/venv/bin/activate
    $ pip install --upgrade pip
    $ python3 -m pip install -r blogthedata/django_project/requirements/requirements.txt -c blogthedata/django_project/requirements/constraints.txt

Setup

  • See commented out Database section in django_project/settings.py to use sqllite database or postgres
  • $ python3 manage.py migrate
  • rename 'sample.env' to .env and change the values to match your setup (database passwords, secret keys, etc)
  • $ python3 manage.py runserver

Features

Functional Features

  • User login (header links removed in commit:5c050a5b68d9c8ce7dcf90fdef44377cc28eab6b)
  • Create posts filtered by category or author
  • Create Comments (Removed in jsolly#77)
  • User profile with avatar (automatic sizing and compression using Pillow)
  • Ckeditor 5 for rich text (also includes spell check, code snippets, character counter, and more!)
  • Multiple categoires to organize posts
  • Post views and likes (Removed in jsolly#77)
  • Newsletter Sign up πŸ—ž
  • Github Integration to show active issue backlog without leaving blog (removed in jsolly#121)
  • Slugified URLs
  • Open Graph protocol compliant social media sharing
  • Global search
  • Ko-Fi donation button β˜•οΈ
  • Leaflet.js and OpenLayers maps πŸ—Ί
  • Display site visitors in a web map

Non-Functional Features

  • Robots.txt, security.txt, and sitemap.xml
  • Honeypot Admin page (Removed in jsolly#105)
  • Git hooks for automatic static file generation
  • GitActions CI integration with coverage, linting, and testing
  • Bootstrap 5
  • Compatible with Sqllite or postgres
  • Optimized for Performance, SEO, and A11Y
  • Latest Django 4.x
  • Fully PEP 8 compliant (with some exceptions*)
  • 100% unit code coverage
  • 100% linted with flake8
  • Static scans with CodeQL and pip dependency checks with Dependabot
  • Formatted with Black
  • Strict Content Security Policy preventing inline styles and scripts
  • Subresource Integrity
  • A+ Score on Mozilla Observatory
  • Excellent scores on Google Lighthouse
  • Custom 404 page

Coverage, Tests, Linting

Contained within tests/

Coverage

$ coverage run -m pytest django_project

$ coverage report -m --skip-covered

Test

$ python3 -m pytest django_project

Lint

$ flake8 django_project

Also see the actions tab to see if everything is passing.


Contributing

Want to work on this with me? DM me @_jsolly

Step 1

  • Option 1

    • 🍴 Fork this repo!
  • Option 2

    • πŸ‘― Clone to your local machine using https://github.com/jsolly/blogthedata.git

Step 2

  • HACK AWAY! πŸ”¨πŸ”¨πŸ”¨

Step 3


Team

John Solly
jsolly
github.com/jsolly

Support

Reach out to me at one of the following places!


Donations

Buy Me a Coffee at ko-fi.com


License

License

About

Django blog site

License:MIT License


Languages

Language:CSS 41.9%Language:JavaScript 35.8%Language:Python 14.6%Language:HTML 6.9%Language:Shell 0.8%