Skip to main content

Extra widgets for django using gentelella.

Project description

This app helps you to integrate Django apps with Gentelella building extra widgets for forms and speciall methods to render forms in templates.

Installation

Installing from repository (not in pip yet).

pip install git+https://github.com/luisza/django-gentelella-widgets.git#egg=djgentelella

When pip is ready you can do

pip install djgentelella

Configure your settings

INSTALLED_APPS = [ ..
    'djgentelella',
    'mptt',
]

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

Usage

In forms

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

class myform(CustomForm, 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

widgets

There is several widgets implemented this is a list of what you can use

  • TextInput

  • NumberInput

  • EmailInput

  • URLInput

  • PasswordInput

  • Textarea

  • TextareaWysiwyg (not working yet)

  • DateInput

  • DateTimeInput

  • TimeInput

  • CheckboxInput

  • YesNoInput

  • Select (jquery select2)

  • SelectMultiple (jquery select2)

  • SelectTail

  • SelectMultipleTail

  • RadioSelect

  • NullBooleanSelect

  • CheckboxSelectMultiple

  • SplitDateTimeWidget (not ready)

  • SplitHiddenDateTimeWidget (not ready)

  • SelectDateWidget (not ready)

  • PhoneNumberMaskInput

  • DateMaskInput

  • DateTimeMaskInput

  • EmailMaskInput

  • DateRangeTimeInput

  • DateRangeInput

Project details


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.0.1.tar.gz (2.7 MB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: djgentelella-0.0.1.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.3

File hashes

Hashes for djgentelella-0.0.1.tar.gz
Algorithm Hash digest
SHA256 35dda5461e1ff1742fc21d4196a2faeef1c6d8eacd0969f5712514b3aa50b4b2
MD5 631d326c78b5833cabc6fdbe99da284c
BLAKE2b-256 93f1bf254c776864e85d8abfe2ff0f4af9c568e7bec450228682967383847682

See more details on using hashes here.

Provenance

Supported by

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