-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move badge from Travis-CI to GH actions and prepare a GH action to automatically publish new releases upon tagging * attempt to fix failing test_email_change_view * add missing import to documentation * Replace 3rd party jsonfield against builtin Since Django-3.1 a JSONField has been added for all supported databases. This also drops support for Django-3.1 and below, since these versions reached their EOL. * use internal JSONField * exclude Django>=4 with Python-3.7 * Add pytz as external dependency
- Loading branch information
Showing
10 changed files
with
72 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Publish django-post_office | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
publish: | ||
name: "Publish release" | ||
runs-on: "ubuntu-latest" | ||
|
||
environment: | ||
name: deploy | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.9"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install build --user | ||
- name: Build 🐍 Python 📦 Package | ||
run: python -m build --sdist --wheel --outdir dist/ | ||
- name: Publish 🐍 Python 📦 Package to PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN_POST_OFFICE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,10 +27,11 @@ will otherwise be stripped for security reasons. | |
|
||
## Installation | ||
|
||
[![Build | ||
Status](https://travis-ci.org/ui/django-post_office.png?branch=master)](https://travis-ci.org/ui/django-post_office) [![PyPI version](https://img.shields.io/pypi/v/django-post_office.svg)](https://pypi.org/project/django-post_office/) ![Software license](https://img.shields.io/pypi/l/django-post_office.svg) | ||
[![Build Status](https://github.com/ui/django-post_office/actions/workflows/test.yml/badge.svg)](https://github.com/ui/django-post_office/actions) | ||
[![PyPI](https://img.shields.io/pypi/pyversions/django-post_office.svg)]() | ||
[![PyPI version](https://img.shields.io/pypi/v/django-post_office.svg)](https://pypi.python.org/pypi/django-post_office) | ||
[![PyPI](https://img.shields.io/pypi/l/django-post_office.svg)]() | ||
|
||
Install from PyPI (or [manually download from PyPI](http://pypi.python.org/pypi/django-post_office)): | ||
|
||
```sh | ||
pip install django-post_office | ||
|
@@ -311,6 +312,7 @@ inlined images, use the following code snippet: | |
|
||
```python | ||
from django.core.mail import EmailMultiAlternatives | ||
from django.template.loader import get_template | ||
|
||
subject, body = "Hello", "Plain text body" | ||
from_email, to_email = "[email protected]", "[email protected]" | ||
|
@@ -328,6 +330,7 @@ plain text body, use this code snippet: | |
|
||
```python | ||
from django.core.mail import EmailMultiAlternatives | ||
from django.template.loader import get_template | ||
|
||
subject, from_email, to_email = "Hello", "[email protected]", "[email protected]" | ||
template = get_template('email-template-name.html', using='post_office') | ||
|
@@ -550,7 +553,7 @@ POST_OFFICE = { | |
} | ||
``` | ||
|
||
`CONTEXT_FIELD_CLASS` defaults to `jsonfield.JSONField`. | ||
`CONTEXT_FIELD_CLASS` defaults to `django.db.models.JSONField`. | ||
|
||
### Logging | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters