django-oscar-freeletter
Wires django-freeletter into django-oscar: registers a "product" issue-block type (and a "blog post" one, if django-oscar-blog is also installed), plus an Oscar dashboard section for managing issues and subscribers.
What this package does, and doesn't, do
- Registers freeletter's
"product"block type — an issue can feature a catalogue product, resolved via Oscar's ownProductmodel, with no new lookup endpoint (it reuses Oscar's existing dashboard product autocomplete,dashboard:catalogue-product-lookup). - Registers a
"blog_post"block type only ifoscar_blogis installed (checked at runtime viaapps.is_installed, not imported unconditionally) — an issue can feature adjango-oscar-blogpost. - An Oscar dashboard section (
oscar_freeletter.dashboard) under/dashboard/freeletter/: issue list/create/update/delete with an inline block editor (pick "html" free content, a product, or — if installed — a blog post, per block), a one-click "queue for sending" action, and a read-only subscriber list. - It does not ship its own models — everything it manages
(
Issue,IssueBlock,Subscriber) belongs todjango-freeletter; this package only adds Oscar-specific block types and a dashboard UI on top.
Installation
uv add django-oscar-freeletter
# or, with blog-post blocks too (pulls in django-oscar-blog):
uv add "django-oscar-freeletter[blog]"
Plain pip works the same way: pip install django-oscar-freeletter[blog].
Without the blog extra, this package still installs and works fine — it
just registers the "product" block type only.
INSTALLED_APPS = [
...,
"freeletter",
"oscar_blog.apps.OscarBlogConfig", # optional — enables "blog_post" blocks
"oscar_blog.dashboard.apps.BlogDashboardConfig", # optional
"oscar_freeletter.apps.OscarFreeletterConfig",
"oscar_freeletter.dashboard.apps.FreeletterDashboardConfig",
]
Run manage.py migrate (this package ships no migrations of its own —
freeletter's migration is what actually creates the tables).
Wiring the dashboard in
Same fork django-oscar-blog needs (Oscar's DashboardConfig.get_urls()
is a hardcoded list, not auto-discovered) — see this package's own
tests/dashboard.py for a worked example that mounts both
freeletter_dashboard and blog_dashboard in the same fork:
from django.apps import apps
from django.urls import include, path
from oscar.apps.dashboard.apps import DashboardConfig as OscarDashboardConfig
class DashboardConfig(OscarDashboardConfig):
def ready(self):
super().ready()
self.freeletter_app = apps.get_app_config("freeletter_dashboard")
def get_urls(self):
urls = super().get_urls()
urls.append(path("freeletter/", include(self.freeletter_app.urls[0])))
return urls
Then add a nav entry (e.g. under Content, alongside blog posts) via
OSCAR_DASHBOARD_NAVIGATION:
{
"label": _("Newsletter issues"),
"url_name": "dashboard:freeletter-issue-list",
},
Development
uv sync
uv run pytest
Requires django-freeletter and (for the "blog_post" tests)
django-oscar-blog — both wired in pyproject.toml's [tool.uv.sources]
as local path dependencies until they're published.
Metadata
Release files for django-oscar-freeletter 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_oscar_freeletter-0.1.0.tar.gz | 62.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_oscar_freeletter-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 75.0 kB
Release files / django_oscar_freeletter-0.1.0.tar.gz
| Download URL | django_oscar_freeletter-0.1.0.tar.gz |
|---|---|
| Size | 62.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d86254d0b60b857bd90fcc4af444496c34d18f3ebfe7c9674c53d608beb684b2
|
|
BLAKE2b-256 checksum How to use checksums |
479e9c5bc773c087dc3b52b9011a05182e85a5ac05eacf0d77f34fe356eced52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / django_oscar_freeletter-0.1.0-py3-none-any.whl
| Download URL | django_oscar_freeletter-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eca8bc9904c07b741bb87e998ffc446427d25297c1d0d31f9ebee9863cb8e00c
|
|
BLAKE2b-256 checksum How to use checksums |
402e154b8e2dbc929192a28352c1ced5ddf609b8698027b4ec073c8e9006d1db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|