You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update project management and venv strategy docs
- Fix incorrect --random flag (omitting name generates random project name)
- Document --wagtail, --qe, and stackable flag examples
- Add "Installing Local Clones" section for the new --with flag
- Document auto-venv creation behaviour in both project-management and venv-strategy
- Update Virtual Environments section to remove outdated limitation note
4. **Activated venv** - The current ``sys.executable`` or shell-activated Python if it is inside a venv
107
107
5. **Auto-detected venv** - If exactly one venv exists in the base directory, it is used automatically
108
-
6. **Error** - Installation to system Python is not allowed
108
+
6. **Auto-created venv** (``dbx project add`` only) - If no venv is found, one is created automatically at the ``projects/`` group level and Django is bootstrapped into it
109
+
7. **Error** - Installation to system Python is not allowed (all other commands)
109
110
110
111
You'll see clear messages indicating which venv is being used:
Omitting the project name generates a random name from adjectives and nouns (e.g., ``swift_seal``, ``brave_eagle``).
73
+
74
+
If no virtual environment exists when ``dbx project add`` runs, one is created automatically at the ``projects/`` group level and Django is installed into it before scaffolding begins.
60
75
61
76
Project Structure
62
77
-----------------
@@ -310,6 +325,26 @@ This will:
310
325
311
326
When using the ``--directory`` flag, you must specify the project name explicitly.
312
327
328
+
Installing Local Clones
329
+
-----------------------
330
+
331
+
The ``--with`` flag installs one or more local clones (managed by ``dbx clone``) as editable packages into the project venv immediately after project creation:
Each ``--with`` value is looked up by name using the same discovery logic as ``dbx install`` (respecting group priority from your config). If a clone is not found locally a warning is printed and that repo is skipped — the project is still created successfully.
345
+
346
+
This is useful when you want to develop against a local fork or in-progress version of a library rather than the PyPI release. For a dependency already in ``pyproject.toml`` (e.g. ``django-mongodb-extensions``), specifying ``--with`` reinstalls it from the local clone, overriding the PyPI version.
347
+
313
348
Virtual Environments
314
349
--------------------
315
350
@@ -323,11 +358,11 @@ Projects use a shared virtual environment in the ``projects/`` directory:
323
358
# List all virtual environments
324
359
dbx env list
325
360
326
-
**Current Limitation**: The virtual environment is created at the ``projects/`` level, not per individual project. This means all projects in the ``projects/`` directory share the same virtual environment.
361
+
**Auto-creation**: If no virtual environment is found when ``dbx project add`` runs, one is created automatically at the ``projects/`` group level (``base_dir/projects/.venv``) and Django is bootstrapped into it before project scaffolding begins. You do not need to run ``dbx env init`` manually before your first ``dbx project add``.
327
362
328
363
.. note::
329
364
330
-
**Future Enhancement**: Per-project virtual environments (e.g., ``projects/myproject/.venv``) may be added in a future release. For now, if you need isolated environments for different projects, you can use the ``--directory`` flag to create projects in separate locations and manage their virtual environments independently.
365
+
All projects in the ``projects/`` directory share the same virtual environment. If you need full isolation, use the ``--directory`` flag to create projects in separate locations and manage their virtual environments independently.
0 commit comments