Hi,

I love Django, it has been enormously useful to a new comer to web dev like 
me. 

One minor issue I've just had is that I've struggled to figure out an issue 
with my code because an AttributeError I was generating in my media 
property on my custom widget was being silently swallowed by:

    
https://github.com/django/django/blob/09c1f18f223cd60c948f7dae6aedccea70a92274/django/forms/widgets.py#L113

Is there a chance of changing it so that that doesn't happen? Maybe do a 
`hasattr` test instead of the try-catch? There is no feedback otherwise. 
You're media just doesn't appear on the page. I guess if I was a more 
experienced debugger I might find this easier to figure out.

I am inexperienced but I have found that catching such broad exceptions as 
AttributeError around something that can call other functions causes pain 
from time to time. I guess `media` was originally meant to be just a class 
or instance attribute but it seem to frequently be made into a property 
with the potential for non-trivial code being called from it.

I am not sure if this is best here or suggested on the developers mailing 
list. I'm happy to repost if someone could offer me guidance.

Thanks,
Michael

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/803faa8b-60ab-4fb7-86dd-b6172b0c794f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to