Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cookiecutter.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"app_name": "ephios_mycoolplugin",
"description": "My plugin does cool stuff",
"author": "Jon Doe <jondoe@example.com>",
"author_name": "Jon Doe",
"author_email": "jondoe@example.com",
"license": "MIT"
}
16 changes: 16 additions & 0 deletions {{ cookiecutter.app_name }}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
default_language_version:
python: python3
repos:
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v6.0.0
hooks:
- id: check-added-large-files
- repo: 'https://github.com/astral-sh/ruff-pre-commit'
rev: v0.15.0
hooks:
- id: ruff-check
- id: ruff-format
- repo: https://github.com/rtts/djhtml
rev: 3.0.6
hooks:
- id: djhtml
12 changes: 12 additions & 0 deletions {{ cookiecutter.app_name }}/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# {{ cookiecutter.app_name }}

{{ cookiecutter.description }}

## Development

This project uses uv to manage dependencies and run the application.
Pre-commit hookes are managed using prek.
Versioning is based on git tags.
The build backend includes a mechanism to automatically compile locales when building the package.

Make messages using ``ENV_PATH="../ephios/.env" django-admin makemessages -a``
1 change: 1 addition & 0 deletions {{ cookiecutter.app_name }}/plugintests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from tests.conftest import * # noqa
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

def test_{{ cookiecutter.app_name}}(django_app, superuser):
pass
56 changes: 46 additions & 10 deletions {{ cookiecutter.app_name }}/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,54 @@
[tool.poetry]
[project]
name = "{{ cookiecutter.app_name|replace('_', '-') }}"
version = "0.1.0"
dynamic = ["version"]
description = "{{ cookiecutter.description }}"
authors = ["{{ cookiecutter.author }}"]
authors = [
{name="{{ cookiecutter.author_name }}", email="{{ cookiecutter.author_email }}"},
]
license = "{{ cookiecutter.license }}"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
dependencies = [
# do not include ephios to avoid desync of locked versions, but make sure to include it in the test environment
]

[tool.poetry.dev-dependencies]
[dependency-groups]
dev = [
"pytest-django>=4.5.2,<5",
"djhtml>=3.0.6,<4",
"prek>=0.3.1",
"ruff>=0.15.0",
"pytest-env>=1.3.2",
]

[project.entry-points."ephios.plugins"]
"{{ cookiecutter.app_name }}" = "{{ cookiecutter.app_name }}.apps.PluginApp"

# build and versioning
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling", "uv-dynamic-versioning", "hatch-django-locales>=0.1.4"]
build-backend = "hatchling.build"
[tool.hatch.build.hooks.django-locales]
[tool.hatch.version]
source = "uv-dynamic-versioning"
[tool.uv-dynamic-versioning]
fallback-version = "0.0.0" # used if no VCS info is available, e.g. dependabot builds
[tool.uv]
cache-keys = [{ file = "pyproject.toml" }, { git = { commit = true, tags = true }}]

[tool.poetry.plugins."ephios.plugins"]
"{{ cookiecutter.app_name }}" = "{{ cookiecutter.app_name }}.apps.PluginApp"
# Testing, format and linting
[tool.ruff]
line-length = 100
[tool.ruff.format]
preview = true
[tool.ruff.lint]
preview = true
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "tests.settings"
pythonpath = [
"src", # to find the plugin source
"../ephios", # to find the ephios django project and ephios "tests.settings"/conftest fixtures
]
testpaths = ["plugintests"] # need a non-standard name to avoid conflicts with ephios' own tests dir
[tool.pytest_env]
ENV_PATH="../ephios/.env"
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ class PluginApp(PluginConfig):

class EphiosPluginMeta:
name = "{{ cookiecutter.app_name }}"
author = "{{ cookiecutter.author }}"
author = "{{ cookiecutter.author_name }}"
description = "{{ cookiecutter.description }}"
visible = True
force_enabled = False

def ready(self):
from . import signals # NOQA
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# {{ cookiecutter.app_name }} locale file for German (de)
# Copyright (C) {{ cookiecutter.author_name }}
# This file is distributed under the same license as the PACKAGE package.
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-02-13 13:25+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: {{ cookiecutter.author_name }}\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? "
"1 : 2;\n"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.urls import path

app_name = "{{ cookiecutter.app_name }}"
urlpatterns = [
# path("your-plugin-url/", YourPluginView.as_view(), name="{{ cookiecutter.app_name }}_viewname"),
]