Ticket #3700: XhtmlDegraderMiddleware

3 views
Skip to first unread message

Dave Hodder

unread,
Jul 30, 2007, 6:27:32 PM7/30/07
to django-d...@googlegroups.com
Hello,

A while back I wrote some middleware to improve XHTML usage
<http://code.djangoproject.com/ticket/3700>. Is this something that
could or should be included within Django?

XHTML is ideally sent with the application/xhtml+xml media type; however
it's normally delivered as text/html because older web browsers don't
support it. This middleware addresses the chicken-and-egg problem by
silently converting application/xhtml+xml content when it's delivered to
a non-compliant browser.

Possible use cases: (i) allowing "mobile" (XHTML Mobile Profile) content
to still be viewed by desktop HTML browsers; (ii) allowing XHTML sites
to make use of inline SVG (e.g. <http://intertwingly.net/>) whilst still
offering something for XHTML-challenged web browsers; (iii) making it
easier to use XForms in an intranet environment (e.g. when delivering
content to Internet Explorer 7 with an XForms plug-in).

Thank you,

Dave

Jacob Kaplan-Moss

unread,
Aug 1, 2007, 12:29:44 PM8/1/07
to django-d...@googlegroups.com
Hi Dave --

> A while back I wrote some middleware to improve XHTML usage
> <http://code.djangoproject.com/ticket/3700>. Is this something that
> could or should be included within Django?

Nice stuff -- think I'll be using this a few times.

However, I'd say that it's a *bit* too specialized for direct
inclusion; while I personally find it useful, I'm just suspicious of
including anything in Django that doesn't have obvious wide appeal.

I'd say this is a *perfect* candidate for djangosnippets.org, though;
put it there and people will quickly be able to find it. That or a
Google Code project if you plan to add more stuff onto it...

Of course, what we really need is a CPAN-for-Django-bits-thingie... I
wish there was a middle ground between "included" and "not."

Jacob

Forest Bond

unread,
Aug 1, 2007, 1:02:25 PM8/1/07
to django-d...@googlegroups.com
On Wed, Aug 01, 2007 at 11:29:44AM -0500, Jacob Kaplan-Moss wrote:
> Of course, what we really need is a CPAN-for-Django-bits-thingie... I
> wish there was a middle ground between "included" and "not."

Surely, you were thinking of Cheese Shop, right? :)

Seriously, though, how many special-purpose package management systems do we
need?

-Forest
--
Forest Bond
http://www.alittletooquiet.net

signature.asc

Jacob Kaplan-Moss

unread,
Aug 1, 2007, 1:39:33 PM8/1/07
to django-d...@googlegroups.com
On 8/1/07, Forest Bond <for...@alittletooquiet.net> wrote:
> Surely, you were thinking of Cheese Shop, right? :)

Sure, but without all the sucky parts :P

[There are, BTW, some Django-specific things that make direct Cheese
Shop integration a bit tricky, but there's an SoC project working on
that, so hopefully we'll get something cool out of that.]

Jacob

flo...@gmail.com

unread,
Aug 1, 2007, 3:42:13 PM8/1/07
to Django developers
I was working on a "DjangoForge" app repository for a few weeks
leading up to PyCon, and had a working prototype that I was showing
around. I was trying to push the idea at the time, but there just
didn't seem to be the interest and/or agreement on what exactly it
should do.

Hopefully this SoC project moves us towards that direction. Has there
been any updates from that student?

-Eric Florenzano

On Aug 1, 10:39 am, "Jacob Kaplan-Moss" <jacob.kaplanm...@gmail.com>
wrote:

flo...@gmail.com

unread,
Aug 1, 2007, 3:49:13 PM8/1/07
to Django developers
BTW, I apologize for the now-complete derailment of the thread.

-Eric Florenzano

Dave Hodder

unread,
Aug 1, 2007, 5:14:18 PM8/1/07
to django-d...@googlegroups.com
Jacob Kaplan-Moss wrote:
>
> Nice stuff -- think I'll be using this a few times.
>
> However, I'd say that it's a *bit* too specialized for direct
> inclusion; while I personally find it useful, I'm just suspicious of
> including anything in Django that doesn't have obvious wide appeal.
>
> I'd say this is a *perfect* candidate for djangosnippets.org, though;
> put it there and people will quickly be able to find it. That or a
> Google Code project if you plan to add more stuff onto it...
>
> Of course, what we really need is a CPAN-for-Django-bits-thingie... I
> wish there was a middle ground between "included" and "not."

Thanks for looking at it Jacob. I've followed your advice and placed it
on djangosnippets.org.

Regards,

Dave

Reply all
Reply to author
Forward
0 new messages