engineervix / blog-post--django-markdown-powered-emails

This is a contrived Django project created as part of a blog post

Home Page:https://blog.victor.co.zm/markdown-powered-emails-in-django

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Markdown-powered emails in Django

An example Django application to illustrate the concept. See blog post here

CI/CD

Python312 Node20 Code style: black Conventional Commits

First things first

I recommend you test this with Python 3.12, because that's what I used for this particular project. However, it should hopefully work with lower Python versions such us 3.10 and 3.11. You can use pyenv to install multiple python versions on your machine.

You'll also need Node.js 20 on your machine. You can use tools such as nvm, volta, etc. to simplify managing Node.js versions on your machine.

  1. In your virtual environment, install Python dependencies

    pip install -r requirements.txt
  2. Install Node.js dependencies

    npm install

Getting Started

  • Apply database migrations

    ./manage.py migrate
  • Create a superuser

    ./manage.py createsuperuser
  • Create some test events

    ./manage.py create_events
  • Simultaneously run the Django development server and the MailDev SMTP Server

    honcho start

You can access the dev server at http://127.0.0.1:8000. As indicated above, this project uses MailDev for viewing and testing emails generated during development. The MailDev server is accessible at http://127.0.0.1:1080.

When you register for an event, you should receive an email.


About

This is a contrived Django project created as part of a blog post

https://blog.victor.co.zm/markdown-powered-emails-in-django

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 46.9%Language:CSS 31.6%Language:HTML 21.4%Language:Procfile 0.1%