Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

django==1.4 support for html5

I have a small blog app I have built using Django 1.4 and recently, I have been learning "bits and pieces" of html5 and css3. I am about the start transitioning my site to html5/css3 and I was wondering if Django widgets support html5(?)

My blog is nothing special - a few forms, a few tables etc.. For example when I do,

{{form_as_p}}

I was wondering if django would generate the required html5 markup(?) I read the docs, and it says the admin pages support html5, but I could not find any docs for regular apps.

If html5 is not supported by Django, what is the best way going about achieving this?

Thanks for your time.

like image 714
JohnJ Avatar asked Jun 01 '12 13:06

JohnJ


1 Answers

Django's form output is XHTML. Django does not snip with support for the new HTML5 input types such as number, email, url, etc but it is not difficult to add them. See https://code.djangoproject.com/ticket/16630 or https://github.com/rhec/django-html5 That being said I don't know any place where Django generates markup that is invalid for HTML5.

like image 63
Mark Lavin Avatar answered Nov 04 '22 03:11

Mark Lavin