Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

django-ui-forms

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-ui-forms

A Django reusable app to extend forms with Bootstrap and Tailwind CSS support

  • 1.1
  • PyPI
  • Socket score

Maintainers
1

Django UI Forms

A Django reusable app to extend forms and provide UI with templates available for Bootstrap and Tailwind CSS.

https://pypi.org/project/django-ui-forms/

Features

  • Custom form handling with Bootstrap and Tailwind CSS support.
  • Easy to use and integrate into existing Django projects.
  • Flexible and reusable components for better form management.

Installation

You can install this package via pip:

pip install django-ui-forms

Usage

To use this package in your Django project, follow these steps:

  1. Add django_ui_forms to your INSTALLED_APPS in your Django settings:
INSTALLED_APPS = [
    ...
    'django_ui_forms',
]
  1. Create your forms by extending BootstrapBaseUiForms or TailwindBaseUiForms:
from django import forms
from django_ui_forms.forms import BootstrapBaseUiForms, TailwindBaseUiForms

class MyForm(BootstrapBaseUiForms, forms.Form):
    my_field = forms.CharField(label='My Field')

class MyModelForm(TailwindBaseUiForms, forms.ModelForm):
    class Meta:
        model = MyModel
        fields = '__all__'
  1. Update custom form renderer in your settings:
from django.forms.renderers import TemplatesSetting

class CustomFormRenderer(TemplatesSetting):
form_template_name = "bootstrap_forms_snipprt.html" # for Bootstrap
form_template_name = "tailwind_forms_snipprt.html" # for Tailwind

FORM_RENDERER = 'your_project_name.settings.CustomFormRenderer'
  1. Use the forms in your views and templates.

Example

See the examples/ directory for a complete example of how to use this package in a Django project.

Running Tests

Tests are Under Development

Contributing

Contributions are welcome! Please submit a pull request or open an issue.

License

This project is licensed under the MIT License - see the LICENSE file for details.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc