Skip to main content

Model W Project Maker

This project maker is the simplest way to start a Model W project.

The goal is to be extremely simple:

uvx --from modelw-project-maker --python 3.14 project_maker

This opens a wizard in your terminal:

  • On the left, the options: the project's name, its location (with a folder picker) and the components to include. The names derived from the project's name (Python package, folder) can be overridden, and are checked as you type.
  • On the right, a live preview: where the project goes, its names, its URLs, what snow.yml deploys and the tree of the files that will be generated.

Create the project with Ctrl+G (or the button), then follow the steps of the generation. The default location is ~/dev, change it with --dev-dir or the MODEL_W_DEV_DIR environment variable.

Prerequisites

In order to execute the script, you need:

  • Python 3.14 (you can use pyenv to load it in your current shell)
  • Poetry (follow the instructions on their website)
  • Git (you know where to get it)
  • Git Flow (apt install git-flow or brew install git-flow depending on your OS)
  • Node and PNPM (get it your favorite way)
  • PostgreSQL and Redis (if you enable the API side)

What to do next

Once the script is done, you'll have a directory with the project's name. You can then cd into it and start working on it.

Environment setup

You can start by installing the dependencies:

# If you enabled the API
cd api
poetry install
cd ..

# If you enabled the frontend
cd front
pnpm install

If you enabled the API, you then need to create the database:

sudo -u postgres psql -c "CREATE DATABASE <project_name>"
sudo -u postgres psql -c "CREATE USER <project_name> WITH LOGIN PASSWORD '<project_name>'"
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE <project_name> TO <project_name>"

Finally, have a look at api/.env and/or front/.env and make sure that values there are correct.

For the Django side, until you add more settings by yourself to settings.py, you can use all the settings from the Model W Django Preset.

If you've enabled Wagtail, you need to configure the storage environment variables, which should be commented out in your .env. You need to check with someone in charge of the infrastructure to get those values (if it's yourself, you're in luck).

Django models customization

Something important in Django is to customize the User model to your needs. Even if you don't need it right now, you'll eventually be happy that you did it because you'll always need to add fields to it.

Thus one of the first things you should do is to go check in the people app's models the custom User model that is provided by default in this template. Modify it to your needs.

Note — If you modify the User model and you are not satisfied with the initial migration then you can delete it and create it anew. The only thing is that you'll have to manually add CreateExtension("citext") on top of the operations list in the 0001_initial.py migration file.

If you've enabled Wagtail, the same applies for the Image and Document models present in the cms app.

Still in Wagtail, the root page is replaced by a HomePage (defined in cms/models.py) in one of the migrations generated by the template. If that's not okay for you, now is the time to change it. However most likely it's going to be convenient for you, because otherwise you'll need to do it manually in Wagtail's admin. The only drawback is that when you'll want to add fields to the HomePage you will have to figure default values.

Once you've adjusted all the models to your needs, feel free to make the migrations and run them:

api/pmanage makemigrations
api/pmanage migrate

Note — You'll notice that there is a pmanage script in addition of the manage.py script. It's simply a wrapper to call manage.py through the Poetry virtual environment.

SvelteKit/Wagtail integration

If you have chosen a CMS, there will be a SvelteKit/Wagtail integration, using Wagtail's v2 API.

The front/src/routes/(site)/(cms)/[...cmsPath=cmsPath] route is a catch-all for all the CMS paths. Inside $lib/components/cms/ you'll find the Svelte components for the CMS:

  • pages/ — One component per Wagtail page type, with the same name. It is automatically imported and rendered when landing on a page of that type.
  • blocks/ — One component per StreamField block, with the same name. The StreamField component renders them, nothing to register.
  • snippets/ — One component per previewable snippet, rendered by the snippet preview.

The wizard can also add a demo snippet, to show how snippet previews work.

Have a look at the front's README for the rest (layout, menus, session and route rules).

Contributing

Tests

The test suite generates a project for every combination of options and checks it:

make test       # Generates every combination and checks them statically
make test_slow  # Installs, lints, type-checks and builds some of them

The slow tests need network access, pnpm and poetry.

Formatting

make format  # Formats the project maker and the template
make lint    # Checks what the CI checks

The template itself only needs to be formattable (template directives would make most linters unhappy). Generated projects, on the other hand, must pass all their linters: the project maker runs Ruff with auto-fix and Prettier on them, and the tests check that nothing remains.

Releasing

If you're developing this package and you want to make a release, you can simply run:

make release VERSION=<version>

Then you'll still need to push the branches and tags.

Metadata

Release files for modelw-project-maker 2026.10.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for modelw-project-maker 2026.10.2
File Size Uploaded Provenance Actions
modelw_project_maker-2026.10.2.tar.gz 688.9 kB Without provenance Details for modelw_project_maker-2026.10.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for modelw-project-maker 2026.10.2
File Interpreter ABI Platform Actions
modelw_project_maker-2026.10.2-py3-none-any.whl Python 3 none any Details for modelw_project_maker-2026.10.2-py3-none-any.whl

Total release size: 1.5 MB

Release files / modelw_project_maker-2026.10.2.tar.gz

Download URL modelw_project_maker-2026.10.2.tar.gz
Size 688.9 kB
Tags Source
SHA-256 checksum
How to use checksums
97b96588c6f265f2584025f83628b212b90c8a2f6bd161266729b04e1624eb28
BLAKE2b-256 checksum
How to use checksums
5b8f7711d721ff6f148e726db59a3cf36095514b6f372a2ef55318afc3bff488
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.4 Linux/7.0.0-1019-azure

Release files / modelw_project_maker-2026.10.2-py3-none-any.whl

Download URL modelw_project_maker-2026.10.2-py3-none-any.whl
Size 781.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64edaae39546b3c8ca22f6576719819fbcebc7f8c784140788add97d28ddf5bf
BLAKE2b-256 checksum
How to use checksums
222fbb78e666a5fd4a08cd94c16e62eaf011c2bfebe97cb100de234f569b1372
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.4 Linux/7.0.0-1019-azure

Security for modelw-project-maker 2026.10.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2026.10.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page