Skip to main content

django-project-core-settings

Secure, environment-aware Django project defaults with optional form/session and API/JWT authentication.

This package is a Django project foundation. Your project owns its user model, application structure, URLs, templates, deployment platform, and operational policies.

Quick Start

py -m venv .venv
.\.venv\Scripts\Activate.ps1
py -m pip install "django-project-core-settings"
django-admin startproject config .

Then configure your project according to the guided documentation.

Guided Documentation

Detailed installation, configuration, authentication, architecture, security, and development guidance is maintained separately in guided_docs/.

General setup

guided_docs/README.md https://github.com/wilfredpine/django-project-core-settings/tree/main/guided_docs

Use this first for the common Django project setup and package integration.

API/JWT projects

guided_docs/README-API.md

Use this for projects using API/JWT authentication.

For framework-independent frontend/CORS configuration, session-cookie guidance, trusted proxies, and optional scoped API keys, see guided_docs/FRONTEND_AND_API_KEYS.md.

The wheel-installed consumer example builds a wheel, installs it in a clean environment outside this checkout, and exercises session, frontend, JWT, API-key, and security behavior.

CORE_ENABLE_API=true
path(
    "api/auth/",
    include("django_project_core_settings.auth.api_urls"),
)

Session-based projects

guided_docs/README-SESSION.md

Use this for projects using Django form/session authentication.

path(
    "auth/",
    include("django_project_core_settings.auth.urls"),
)

Which guide should I use?

New Django project
       │
       ▼
guided_docs/README.md
       │
       ├── API/JWT ──────► guided_docs/README-API.md
       │
       └── Session ─────► guided_docs/README-SESSION.md

Additional files under guided_docs/ contain the recommended application architecture, AI-agent workflow, security guidance, and development conventions.

Package Options

Base package:

python -m pip install "django-project-core-settings"

API/JWT support:

python -m pip install "django-project-core-settings[api]"

API + CORS + Redis:

python -m pip install "django-project-core-settings[full]"

Security Baseline

The package provides secure Django-oriented defaults for areas such as:

  • password hashing;
  • CSRF;
  • secure production cookies;
  • HTTPS/HSTS;
  • CSP;
  • upload limits;
  • environment-based secrets;
  • authentication rate limiting;
  • API/JWT security.

These defaults are a foundation, not a production-readiness certification. Validate your application's configuration, infrastructure, secrets, TLS termination, backups, logging, and monitoring.

User Model

The package does not provide a project user model.

Your project owns the user model. For email authentication, the user model must expose an email field.

If role-based authentication is required, configure the project's role field according to the guided documentation.

Arbitrary public role assignment is forbidden. Projects may explicitly enable allow-listed self-selection for non-privileged model choices; see guided_docs/ROLE_REGISTRATION_AND_EMAIL.md.

Updating

Projects depend on the package rather than copied framework code:

python -m pip install --upgrade django-project-core-settings

Verification

Run the appropriate Django checks and tests:

python manage.py check
python manage.py check --deploy
python manage.py test

For API projects, apply the required migrations before testing:

python manage.py migrate

Examples

Runnable examples are available in:

guided_docs/examples/

Use the corresponding guided documentation for the complete setup and implementation flow.

License

MIT

Metadata

Release files for django-project-core-settings 1.0.4

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

Source distribution (sdist)

Source distribution for django-project-core-settings 1.0.4
File Size Uploaded Provenance Actions
django_project_core_settings-1.0.4.tar.gz 55.7 kB Without provenance Details for django_project_core_settings-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-project-core-settings 1.0.4
File Interpreter ABI Platform Actions
django_project_core_settings-1.0.4-py3-none-any.whl Python 3 none any Details for django_project_core_settings-1.0.4-py3-none-any.whl

Total release size: 103.0 kB

Release files / django_project_core_settings-1.0.4.tar.gz

Download URL django_project_core_settings-1.0.4.tar.gz
Size 55.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f6df72a484e12251fd12da66d37415eaff2227ee4eddf6b05a4c741911f96c1e
BLAKE2b-256 checksum
How to use checksums
66825c02834fe70453162317735de3056695ddfb9609682beea02060a56a75ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / django_project_core_settings-1.0.4-py3-none-any.whl

Download URL django_project_core_settings-1.0.4-py3-none-any.whl
Size 47.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
acc88da3505ded5a972dc7a305697ee13e2c6ee7f05f8b63944cd4d63bf840cb
BLAKE2b-256 checksum
How to use checksums
9e7b0c5e1c9b6e04f5379053ae669d21ccc3fe36997987990516914d1dcfeae5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for django-project-core-settings 1.0.4

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.

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