Install djcrud¶
Install the package¶
pip install --pre djcrud
This installs djcrud with all runtime dependencies including the Bulma UI framework.
Upgrading from djmvc¶
If your project uses the last djmvc release (Controller,
ModelController, djmvc.py), see Migrating from djmvc for the
full breaking-change guide and checklist.
Note
The --pre flag is required to install pre-release versions of dependencies
(currently django-autocomplete-light>=5.1).
Tip
Want to try djcrud first? See Try the demo for a quick walkthrough of the example project.
For local development (tests, docs, example project):
git clone https://github.com/jpic/djcrud.git
cd djcrud
pip install --pre -e ".[dev,docs]"
Create a Django project¶
django-admin startproject myproject
cd myproject
Configure settings¶
Import the djcrud apps and add Django’s contrib apps:
# myproject/settings.py
import djcrud.settings
INSTALLED_APPS = djcrud.settings.INSTALLED_APPS + [
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
# your apps with a djcrud.py module:
# "myapp",
]
djcrud.settings.INSTALLED_APPS includes djcrud core, Bulma UI, authentication,
autocomplete (DAL), site search, and audit logging. It does not include
djcrud_api (Bearer tokens), djcrud_drf (REST API), or djcrud_mcp
(agent MCP bridge) — enable API packages in DRF API and the
MCP client in Agents (MCP bridge) when you need them. The order ensures
dal and dal_alight load before django.contrib.admin.
Optional extras¶
Extra |
Install |
Purpose |
|---|---|---|
|
|
DRF ViewSets, OpenAPI schema at |
|
|
stdio MCP bridge ( |
|
|
pytest, tox, splinter |
|
|
Sphinx build |
Initialize the database¶
python manage.py migrate
python manage.py createsuperuser
Configure URLs¶
Wire the djcrud site in your project’s urls.py:
# myproject/urls.py
from django.contrib import admin
from django.urls import path
import djcrud
urlpatterns = djcrud.site.build().urlpatterns + [
path("admin/", admin.site.urls),
]
build() autodiscovers every installed app’s djcrud.py
module and builds the routing tree.
Start developing¶
python manage.py runserver
Visit http://localhost:8000/auth/login/ to log in with your superuser credentials.
Enable site search¶
djcrud_dal_topbar is included in djcrud.settings.INSTALLED_APPS and
provides a site-wide autocomplete search in the navbar. No additional
installation steps are required when using djcrud.settings.
Next steps¶
Tutorial: Start with Routing to create your first model router.
Reference documentation:
DRF API — optional DRF REST API and OpenAPI
SPA shell — SPA shell and client codegen
Agents (MCP bridge) — stdio MCP tools from the OpenAPI schema
djcrud_mcp — MCP bridge reference
djcrud_dal — Autocomplete for relation fields
djcrud_dal_topbar — Site-wide search in the navbar
djcrud_history — Audit logging and history views
djcrud_auth — Authentication views
djcrud_debug — Route introspection (development only)
Example project: See the full example project settings at djcrud_example/settings.py on GitHub.