Python django.forms.URLInput() Examples

The following are 1 code examples for showing how to use django.forms.URLInput(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

You may check out the related API usage on the sidebar.

You may also want to check out all available functions/classes of the module django.forms , or try the search function .

Example 1
Project: djangocms-forms   Author: mishbahr   File: forms.py    License: BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def prepare_url(self, field):
        field_attrs = field.build_field_attrs()
        widget_attrs = field.build_widget_attrs()

        field_attrs.update({
            'widget': forms.URLInput(attrs=widget_attrs)
        })
        return forms.URLField(**field_attrs)