Model W Project Maker
This project maker is the simplest way to start a Model W project.
The goal is to be extremely simple:
curl -s https://pypi.run/modelw-project-maker/model_w.project_maker | python3.13
This will ask you a few questions and create the project's directory for you.
Prerequisites
In order to execute the script, you need:
- Python 3.13 (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-floworbrew install git-flowdepending on your OS) - Node and NPM (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
npm 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 the0001_initial.pymigration 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
pmanagescript in addition of themanage.pyscript. It's simply a wrapper to callmanage.pythrough 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.
A [...cmsPath] directory will be created in the front directory, which is a
catch-all for all the CMS paths.
Inside, $lib/components/ there is a cms directory, which contains the Svelte
components for the CMS such as blocks and pages.
To make a CMS page work, create a component in the cms directory with the same
name as the Wagtail page type, and it will automatically be imported and
rendered when landing on a page of that type.
Contributing
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.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 | |
|---|---|---|---|
| modelw_project_maker-2026.10.0.tar.gz | 630.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| modelw_project_maker-2026.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / modelw_project_maker-2026.10.0.tar.gz
| Download URL | modelw_project_maker-2026.10.0.tar.gz |
|---|---|
| Size | 630.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21e5e7f9f1cd784a236011354e4cab28545e6f20391dbbc63c2100c9d61f016e
|
|
BLAKE2b-256 checksum How to use checksums |
e94c9d09e3fe1df326238694b734ee25cb1716b2114bce3e15b20ceb238061e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.12.3 Linux/6.17.0-1022-azure
|
Release files / modelw_project_maker-2026.10.0-py3-none-any.whl
| Download URL | modelw_project_maker-2026.10.0-py3-none-any.whl |
|---|---|
| Size | 693.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f665ac70e36e9f241de00e7f50ed646c14c8b2ec5f2c75d2f5c905abfe3ea89e
|
|
BLAKE2b-256 checksum How to use checksums |
0387a0034988d478b7946b3080c2c89260e5d16a845bc207816fe4a295780c26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.12.3 Linux/6.17.0-1022-azure
|