Skip to main content

Help building extra widgets for forms and speciall methods to render forms in templates

Project description

Gentelella documentation Gentelella supported python version Gentelella test status Gentelella Logo

Build beautiful Django applications faster with djgentelella — a comprehensive widget and utility library that seamlessly integrates Bootstrap 5 with popular JavaScript libraries into Django’s form system.

Stop writing repetitive frontend code. Django Gentelella Widgets provides 40+ production-ready form widgets, a complete CRUD system with permissions, and enterprise features like soft-delete, audit logging, and chunked file uploads — all styled with the elegant Gentelella admin theme.

Why Django Gentelella Widgets?

For Developers Who Value Their Time

  • Drop-in widgets — Replace Django’s basic form widgets with rich, interactive components. Select2 autocomplete, date range pickers, WYSIWYG editors, and more work out of the box.

  • Multiple form layouts — Render forms as horizontal, inline, grid, or plain layouts with a single method call (form.as_horizontal(), form.as_grid()).

  • Complete CRUD views — Build admin interfaces in minutes with permission-aware list, create, update, and delete views.

For Applications That Need to Scale

  • Soft delete & trash — Never lose data accidentally. Deleted records go to trash and can be restored.

  • Audit trail — Track every change with automatic history logging including who changed what and when.

  • Chunked file uploads — Handle large files reliably with resumable uploads and progress tracking.

  • Field-level encryption — Protect sensitive data with AES encryption at the database level.

For Teams Building Modern Web Apps

  • REST API ready — Built-in Django REST Framework serializers for notifications, history, and trash.

  • Real-time notifications — User notification system with WebSocket support via Django Channels.

  • Digital signatures — Integrate document signing workflows into your application.

  • Permission management — Organize and assign permissions by category with a visual interface.

Key Features

Form Widgets

  • Text inputs with masks (email, phone, credit card, tax ID)

  • Date/time pickers with range selection

  • Select2-powered dropdowns with autocomplete and remote data

  • Tree selectors for hierarchical data

  • File uploads with chunking and media recording (image, video, audio)

  • WYSIWYG and TinyMCE rich text editors

  • Interactive components: calendars, timelines, story maps, charts

  • Digital signature capture

Application Components

  • CRUD System — Generic views with filtering, pagination, search, and inline editing

  • Notification System — Categorized user notifications with REST API

  • Trash System — Soft delete with restore capability

  • History System — Automatic audit logging of all changes

  • Permission Management — Visual permission assignment by group and user

  • Menu System — Dynamic, permission-aware navigation menus

  • Blog Module — Full-featured blog with categories and SEO sitemaps

Frontend Libraries Included

Bootstrap 5, Select2, DataTables, Chart.js, FullCalendar, DateRangePicker, HTMX, SweetAlert2, TinyMCE, and more — all bundled and ready to use

Documentation

See Documentation

Installation

Installing from pypi

pip install djgentelella

Configure your settings

INSTALLED_APPS = [ ..
    'djgentelella',
    'rest_framework',
    'markitup',
]
MARKITUP_FILTER = ('markdown.markdown', {'safe_mode': True})
MARKITUP_SET = 'markitup/sets/markdown/'
JQUERY_URL = None

Run migrations

python manage.py migrate

Create statics files downloading from internet (you need to install requests for this step).

pip install requests
python manage.py loaddevstatic

Add djgentelella urls in your project urls.py file

from djgentelella.urls import urlpatterns as djgentelellaurls

urlpatterns = djgentelellaurls + [
                ...
              ]

Usage

In forms

from djgentelella.forms.forms import GTForm
from djgentelella.widgets import core as genwidgets

class myform(GTForm, forms.ModelForm):
    class Meta:
        model = MyObject
        fields = '__all__'
        widgets = {
            'name': genwidgets.TextInput,
            'borddate': genwidgets.DateInput,
            'email': genwidgets.EmailMaskInput
        }

In templates working with forms

{{ form.as_plain }}
{{ form.as_inline }}
{{ form.as_horizontal }}

In templates using base template

{% extends 'gentelella/base.html' %}

Take a look this file to note the template block that you can overwrite

Test

To run the all test use:

cd demo
python manage.py test

To run the responsive test use:

cd demo
python manage.py test demoapp.tests.selenium.responsive

Run the demo

cd demo
python manage.py migrate
python manage.py createdemo
python manage.py demomenu

And More see demo app.

Run the demo with Makefile

make init_demo

Notes for development

base.js is autogenerated so you need to call

python manage.py createbasejs

Remember update the package version before make deploy it on server.

Translation

To add a new translation for a word there are two options:

django-admin makemessages --all

This command adds words that are inside django templates to locale/es/LC_MESSAGES/django.po, there these words can be translated.

To add a word you can use the following syntax.

{% trans "new_word" %}

For words used in JavaScript files, the following command must be executed.

django-admin makemessages -d djangojs -l es  --ignore *.min.js

This command adds words that are inside the gettext js function, to locale/es/LC_MESSAGES/djangojs.po, there these words can be translated.

Here is an example of gettext implementation:

alert(gettext("new_word"))

Notes for releases

To fix use vendors files need to update the line 53

await asyncio.wait(map(lambda runner: asyncio.create_task(runner.future), running))

in the root {venv}/lib/python3.11/site-packages/pylp/cli/run.py.

Note: python3.13 is missing the build module

python -m pip install build

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djgentelella-0.5.8.tar.gz (11.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

djgentelella-0.5.8-py3-none-any.whl (11.5 MB view details)

Uploaded Python 3

File details

Details for the file djgentelella-0.5.8.tar.gz.

File metadata

  • Download URL: djgentelella-0.5.8.tar.gz
  • Upload date:
  • Size: 11.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for djgentelella-0.5.8.tar.gz
Algorithm Hash digest
SHA256 117c5944d750bb102c95932ac00d23bd7a7058b4c77b03d3a1e3765c6d7c9e3e
MD5 cc9c7dcf0016640b005612532f32a552
BLAKE2b-256 5349f876da44a678dfd8b33025fcf08e6be093bec22cfbfb6ed572d4fa77030c

See more details on using hashes here.

File details

Details for the file djgentelella-0.5.8-py3-none-any.whl.

File metadata

  • Download URL: djgentelella-0.5.8-py3-none-any.whl
  • Upload date:
  • Size: 11.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for djgentelella-0.5.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3e184b9d3540b4efe8a0d4c43ae38220532c8b09b5fad5a8ccd020184f0888bf
MD5 ada31be84b643c487eb65c0ead096868
BLAKE2b-256 a570658173698474c488d650708a19a8e00c2e50ab4d3f38c89a749c3e47f828

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page