On Saturday 26 May 2007 21:55:04 Jared Kuolt wrote:
> The javascript
> portion seems fine, however I would see media as a class, not as a
> method, ala a model's Meta class:
>
> class MyWidget(Widget):
> ...
> class Media:
> js = ('/path/to/js',)
> css = ('/path/to/css',)
-1 on this alteration -- it makes things less flexible:
- I might want to create MyWidget(fancy=true) which would return
different values for media()
- I might want to have a widget which subclasses an existing widget and
wraps the media() method of its parent class, adding some extra values.
Did I miss something about an why inner classes are more useful? In
general they just seem more awkward to me -- they are useful in Models
because of the way the metaclass uses them before any instances of the
models exist.
Luke
--
"If you're not part of the solution, you're part of the precipitate."
(Steven Wright)
Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---