Getting Started
The django-logikal
library provides a highly enhanced Django development experience via various
mighty utilities:
Standard settings modules
A greatly extended Jinja template backend
Paranoid mode to ensure private pages don’t become public accidentally
HTML validation during development and testing
Views, URLs and paths for common utilities
Simple email sending
An improved migration writer for nicely formatted migration files
General commands for invoking management commands and starting a development server
Management commands for working with synthetic data for local development and testing, translation file management and static site generation
Our goal is to make Django development simpler and more powerful at the same time.
Installation
You can simply install django-logikal
from pypi:
pip install django-logikal
Dynamic Sites
You may install the library with support for dynamic sites via the dynamic
extra:
pip install django-logikal[dynamic]
Static Sites
If you intend to generate static pages you should install the library with the static
extra:
pip install django-logikal[static]
Bibliography
Additionally, you may also use the bibliography
extra to install django-logikal
with
support for bibliographies
:
pip install django-logikal[bibliography]
Services
The PostgreSQL and v.Nu Docker Compose
services must be available for local development and testing. We recommend adding the following
services to your project’s compose.yml
file:
services:
validator:
image: ghcr.io/validator/validator:23.4.11
ports: [{target: 8888}]
postgres:
image: postgres:14.4
environment:
POSTGRES_DB: local
POSTGRES_USER: local
POSTGRES_PASSWORD: local
ports: [{target: 5432}]
volumes:
- type: volume
source: postgres_data
target: /var/lib/postgresql/data
healthcheck:
test: pg_isready --username local --host 127.0.0.1
interval: 3s
timeout: 3s
retries: 5
volumes:
postgres_data:
Settings
Once installed, you can simply import the appropriate standard settings module in your project:
from django_logikal.settings import Settings
from django_logikal.settings.dynamic_site.dev import DevSettings
Settings(globals()).update(DevSettings)
That’s it! The included settings modules automatically activate all relevant features, so once your project-specific settings and URL patterns are defined, you can start developing right away:
$ run
...
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.