Is it possible to make django's (v1.2) URLField output an HTML5 input
tag where type="url"
?
------------- SOLUTION -------------
from django.forms import ModelForm
from django.forms import widgets
from django.forms import fields
from models import MyObj
class URLInput(widgets.Input):
input_type = 'url'
class MyObjForm(ModelForm):
url = fields.URLField(widget=URLInput())
class Meta:
model = MyObj