Skip to content

Commit 7d4418f

Browse files
mpasternakclaude
andcommitted
Prepare for first public release: rename to django-sites-blog
The PyPI name 'django-miniblog' is owned by an unrelated project (pascalpepe/django-miniblog), so the distribution is renamed to 'django-sites-blog' before publication to avoid collision. The Python import package stays 'miniblog' to preserve INSTALLED_APPS ergonomics for any existing users. - Rename PyPI distribution: pyproject.toml [project] name - Fill in [project.urls]: Homepage, Repository, Issues, Changelog - README: add CI/Python/Django/License badges, Why?/Features sections, Django x Python support matrix, uv install command, fix iplweb owner in clone URL - example/README.md, base.html: reflect new dist name Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9efd38d commit 7d4418f

4 files changed

Lines changed: 63 additions & 18 deletions

File tree

README.md

Lines changed: 56 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# django-miniblog
1+
# django-sites-blog
2+
3+
[![Tests](https://github.com/iplweb/django-sites-blog/actions/workflows/tests.yml/badge.svg)](https://github.com/iplweb/django-sites-blog/actions/workflows/tests.yml)
4+
[![Python](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https://github.com/iplweb/django-sites-blog)
5+
[![Django](https://img.shields.io/badge/django-5.2%20LTS%20%7C%206.0-0c4b33)](https://github.com/iplweb/django-sites-blog)
6+
[![License](https://img.shields.io/github/license/iplweb/django-sites-blog)](LICENSE)
27

38
Small Django blog / news app with multi-site support
49
(`django.contrib.sites`).
@@ -7,10 +12,57 @@ Lets editors restrict an article to one or more `Site` objects, or
712
leave the assignment empty so the article appears on every site that
813
runs the same Django project.
914

15+
## Why?
16+
17+
Many Django projects host multiple sites — a corporate front page, a
18+
research portal, project subsites — from a single codebase using
19+
`django.contrib.sites`. Most blog/news apps either ignore that scenario
20+
or expect a separate deployment per site.
21+
22+
`django-sites-blog` keeps one article store and lets editors say, per
23+
article, whether it should appear on _every_ site (the default) or be
24+
restricted to a chosen subset. One schema, one query, no middleware
25+
gymnastics.
26+
27+
## Features
28+
29+
- Per-article site assignment via M2M to `django.contrib.sites.models.Site`.
30+
- "Empty M2M = visible everywhere" default — restrict only when you need to.
31+
- `draft`/`published` status via `model_utils.StatusModel`; admin-aware
32+
`get_absolute_url` so drafts link back into the admin.
33+
- Split-marker excerpts via `model_utils.SplitField`
34+
(marker configurable through the `SPLIT_MARKER` setting).
35+
- Multi-site-aware `ArticleDetailView` (slug-based, filters by `SITE_ID`).
36+
- `Article.on_site` `CurrentSiteManager` for pure
37+
"current-site only" semantics when the empty-equals-all default isn't
38+
what you want.
39+
- Polish translation included; rest of the UI is `gettext_lazy`-ready.
40+
- Admin with `filter_horizontal`, `list_filter`, slug prepopulation.
41+
42+
## Supported versions
43+
44+
### Django × Python
45+
46+
| Django | 3.10 | 3.11 | 3.12 | 3.13 | 3.14 | Status |
47+
|---------|------|------|------|------|------|-----------------------------------------|
48+
| 5.2 LTS |||||| Active LTS (extended support Apr 2028) |
49+
| 6.0 |||||| Mainstream Aug 2026, extended Apr 2027 |
50+
51+
Verified against the CI matrix in
52+
[`.github/workflows/tests.yml`](.github/workflows/tests.yml). Also
53+
requires [django-model-utils](https://pypi.org/project/django-model-utils/)
54+
≥ 4.5 (for `SplitField`, `TimeStampedModel`, `StatusModel`).
55+
1056
## Installation
1157

1258
```bash
13-
pip install django-miniblog
59+
uv add django-sites-blog
60+
```
61+
62+
or with pip:
63+
64+
```bash
65+
pip install django-sites-blog
1466
```
1567

1668
Add the app and `django.contrib.sites` to `INSTALLED_APPS`:
@@ -58,13 +110,6 @@ Article.objects.filter(
58110
If you want pure "current-site only" semantics (drop the empty-equals-all
59111
behaviour), use the `Article.on_site` `CurrentSiteManager` instead.
60112

61-
## Requirements
62-
63-
- Python ≥ 3.10
64-
- Django ≥ 5.2 (tested against 5.2 LTS and 6.0)
65-
- [django-model-utils](https://pypi.org/project/django-model-utils/)
66-
≥ 4.5 (for `SplitField`, `TimeStampedModel`, `StatusModel`)
67-
68113
## Settings
69114

70115
| Setting | Default | Purpose |
@@ -84,8 +129,8 @@ The package ships two minimal templates:
84129
## Development
85130

86131
```bash
87-
git clone https://github.com/<owner>/django-miniblog.git
88-
cd django-miniblog
132+
git clone https://github.com/iplweb/django-sites-blog.git
133+
cd django-sites-blog
89134
uv sync --all-extras
90135
DJANGO_SETTINGS_MODULE=tests.settings uv run pytest
91136
```

example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Example project for `django-miniblog`
1+
# Example project for `django-sites-blog`
22

33
Bare-minimum Django project that installs `miniblog` and exposes its
44
URLs at `/articles/`.

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["setuptools>=75.0"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
name = "django-miniblog"
6+
name = "django-sites-blog"
77
version = "0.1.0"
88
description = "Small Django blog/news app with multi-site support (django.contrib.sites)."
99
readme = "README.md"
@@ -46,10 +46,10 @@ dev = [
4646
]
4747

4848
[project.urls]
49-
# Filled in after the GitHub remote is added.
50-
# Homepage = "https://github.com/<owner>/django-miniblog"
51-
# Repository = "https://github.com/<owner>/django-miniblog"
52-
# Issues = "https://github.com/<owner>/django-miniblog/issues"
49+
Homepage = "https://github.com/iplweb/django-sites-blog"
50+
Repository = "https://github.com/iplweb/django-sites-blog"
51+
Issues = "https://github.com/iplweb/django-sites-blog/issues"
52+
Changelog = "https://github.com/iplweb/django-sites-blog/blob/main/CHANGELOG.md"
5353

5454
[tool.setuptools.packages.find]
5555
where = ["src"]

src/miniblog/templates/miniblog/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{# Minimal base template shipped with django-miniblog. #}
1+
{# Minimal base template shipped with django-sites-blog. #}
22
{# Override this in your project by placing miniblog/base.html in your TEMPLATES dirs. #}
33
<!DOCTYPE html>
44
<html lang="{{ LANGUAGE_CODE|default:'en' }}">

0 commit comments

Comments
 (0)