Personal tools
Skip to content. | Skip to navigation
Django "excontrib" Comments Django used to include a comments framework; since Django 1.6 it's been separated to a separate project. This is that project.This framework can be used to attach comments to any model, so you can use it for comments on blog entries, photos, book chapters, or anything else.For details, consult the documentation. Documentation: https://django-contrib-comments.readthedocs.io/en/latest/
A Django App that adds Cross-Origin Resource Sharing (CORS) headers to responses. This allows in-browser requests to your Django application from other origins. Improve your Django and Git skills with my books. About CORS Adding CORS headers allows your resources to be accessed on other domains. It’s important you understand the implications before adding the headers, since you could be unintentionally opening up your site’s private data to others. Some good resources to read on the subject are: Julia Evans’ introductory comic and educational quiz. Jake Archibald’s How to win at CORS The MDN Article The HTML5 Rocks Tutorial The Wikipedia Page Requirements Python 3.8 to 3.12 supported. Django 3.2 to 5.0 supported. Setup Install from pip: python -m pip install django-cors-headers and then add it to your installed apps: INSTALLED_APPS = [ ..., "corsheaders", ..., ] Make sure you add the trailing comma or you might get a ModuleNotFoundError (see this blog post). You will
The best way to have Django DRY forms. Build programmatic reusable layouts out of components, having full control of the rendered HTML without writing HTML in templates. All this without breaking the standard way of doing things in Django, so it plays nice with any other form application. django-crispy-forms supports Django 4.2+ with Python 3.8+. Looking for Bootstrap 5 support? See the crispy-bootstrap5 package. The application mainly provides: A filter named |crispy that will render elegant div based forms. Think of it as the built-in methods: as_table, as_ul and as_p. You cannot tune up the output, but it is easy to start using it. A tag named {% crispy %} that will render a form based on your configuration and specific layout setup. This gives you amazing power without much hassle, helping you save tons of time. Django-crispy-forms supports several frontend frameworks, such as Twitter Bootstrap (versions 2, 3, and 4), tailwind, Bulma and Foundation. You can also easily adapt your
This simple Django utility allows you to utilize the 12factor inspired DATABASE_URL environment variable to configure your Django application. This simple Django utility allows you to utilize the 12factor inspired DATABASE_URL environment variable to configure your Django application.
Basic/extra mitigation against the BREACH attack for Django projects. When combined with rate limiting in your web-server, or by using something like django-ratelimit, the techniques here should provide at least some protection against the BREACH attack.
The Django Debug Toolbar is a configurable set of panels that display various debug information about the current request/response and when clicked, display more details about the panel's content. Currently, the following panels have been written and are working: - Django version - Request timer - A list of settings in settings.py - Common HTTP headers - GET/POST/cookie/session variable display - Templates and context used, and their template paths - SQL queries including time to execute and links to EXPLAIN each query - List of signals, their args and receivers - Logging output via Python's built-in logging, or via the logbook module