Skip to main content

PyPI version Code style: black

Django Xprez

A flexible Django CMS with built-in modules and easy custom modules.

The backend works well with Django admin but can also be used standalone.

Features

  • Structure
    • Containers — apply or extend in your own models (e.g. Page, Article).
    • Sections — rows with max-width, background (part of the structure).
    • Modules (content blocks)
      • Built-in: text, quote, gallery, files, video, numbers, code input, code template, anchor.
      • Custom: simply subclass Module in your app; they auto-register and appear in the same admin UI and frontend.
  • Responsive
    • Layout (visibility, columns, padding, margin, colspan) per breakpoint.
    • Responsive images (srcset, breakpoint-aware sizes).
  • Styles
    • Ready-made frontend CSS included.
    • Or import xprez SCSS into your build.
  • Clipboard and symlinks — Copy modules or sections; paste into another page or paste as symlink to reuse the same content.

Quick start

  1. Install django-xprez:
pip install django-xprez
  1. Add following apps to your settings.INSTALLED_APPS:
INSTALLED_APPS = [
        ...
        'sorl.thumbnail',
        'xprez',
        ...
    ]
  1. Run python manage.py migrate to create xprez models.

  2. Make sure request context processor is enabled in settings:

TEMPLATES = [
        ...
        'OPTIONS': {
            'context_processors': [
                ...
                'django.template.context_processors.request',
                ...
            ]
        },
        ...
    ]
  1. Include the xprez urls in your project urls.py like this:
path('xprez/', include('xprez.urls')),
  1. Create models:
from xprez.models import Container

class Page(Container):
    title = models.CharField(max_length=255)
    slug = models.SlugField(max_length=255, unique=True)

    def __str__(self):
        return self.title
  1. Register models in admin:
from django.contrib import admin
from xprez.admin import XprezAdmin
from .models import Page

@admin.register(Page)
class PageAdmin(XprezAdmin):
    pass
  1. Render page in template:
{% load xprez %}
<link rel="stylesheet" href="{% url 'xprez:css_variables_global' %}">
{% xprez_front_media page %}
{% include 'xprez/container.html' with container=page %}
  1. (optional) Add a custom module:
from xprez.models import Module

class MyModule(Module):
    title = models.CharField(max_length=200)
    count = models.PositiveIntegerField(default=0)
    is_featured = models.BooleanField(default=False)

    front_template_name = "myapp/modules/my.html"

    class Meta:
        verbose_name = "My module"

See the built-in modules source for more examples.

  1. (optional) Change sorl thumbnail backend in settings — for SEO-friendly thumbnail filenames and deferred generation:
THUMBNAIL_BACKEND = "xprez.contrib.sorl_thumbnail.LazyNamingThumbnailBackend"

For user documentation, see docs/user/README.md.

For an example, see the example_app in this repository.

For development and contributing, see docs/development.md.

Metadata

Release files for django-xprez 0.3.18

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-xprez 0.3.18
File Size Uploaded Provenance Actions
django_xprez-0.3.18.tar.gz 2.4 MB Without provenance Details for django_xprez-0.3.18.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-xprez 0.3.18
File Interpreter ABI Platform Actions
django_xprez-0.3.18-py3-none-any.whl Python 3 none any Details for django_xprez-0.3.18-py3-none-any.whl

Total release size: 5.0 MB

Release files / django_xprez-0.3.18.tar.gz

Download URL django_xprez-0.3.18.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
340160c5808e6f2fa82cc0521f4d567c14be958fc7d15031a76db46358098d62
BLAKE2b-256 checksum
How to use checksums
fb09d5e512f00f2509b4e8f748ac65b4f1cf061466cce0b7ff4ee76b042e373a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / django_xprez-0.3.18-py3-none-any.whl

Download URL django_xprez-0.3.18-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
69ca8e94083c266a53fa6e0c55aefe8c4ea19399735b9bbfc25642478cca0a04
BLAKE2b-256 checksum
How to use checksums
8533d290ef25cb7f3f78fdd9943973d5c626e7dd1f246f3461a48af829375002
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for django-xprez 0.3.18

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.

Release history Release notifications | RSS feed

This release

0.3.18 This release

2 release files No provenance

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