On Sun, Jan 11, 2009 at 10:33 AM, Artem Skvira <artem.skv...@gmail.com> wrote:
>
> Hi all,
>
> I've stumbled upon strange behaviour in django: when declaring form/
> widget with class Media, ie.:
>
> class AddressForm(ModelForm):
>    streetNo = forms.CharField()
>    ...
>
>    class Meta:
>        ...
>
>    class Media:
>        js = ('prototype.js', )
>
> I get tons of javascript inclusions rendered to page, for each
> character in 'prototype.js', ie.
> <script type='text/javascript' src='p'></script>
> <script type='text/javascript' src='r'></script>
> <script type='text/javascript' src='o'></script>
>
> etc
>
> However, when I move 'class Media:' to the top of the class everything
> works ok.
> Seems to be a bug to me.

I can't reproduce this. I've pasted at http://dpaste.com/107769/
a patch against Django forms regression tests that adds a test
demonstrates this works as expected.

Can you try to massage that new test to see if, adding details from
your own case to it, you can reproduce what you are seeing?.

Of course, the only way I could reproduce what you report is
using:

        js = 'prototype.js'

-- 
 Ramiro Morales

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to