Have you found a solution to this? I am also now working a project which requires me to use deform and the Google Maps API
On Saturday, 2 March 2013 04:51:48 UTC+2, [email protected] wrote: > > I'm developing a custom widget for Deform that requires the use of the > Google Maps API (and another JS requirement that I have written) and I want > to set this as a required resource for developers using the widget. This is > simple enough: > > class CustomWidget(Widget): > > requirements = ( ('maptack', None), ('googlemaps-api', '3.0')) > > > The user is required to specify the JS resources similar to the following > in their project (I'd also love a way around this -- seems very non-modular > and puts a lot of expectations of someone using the widget): > > registry = ResourceRegistry(use_defaults=True) > registry.set_js_resources('googlemaps-api', '3.0', ' > http://maps.googleapis.com/maps/api/js?sensor=false') > > > The issue I am facing is set_js_resources expects a relative asset (which > may or may not be packaged within my widget) which is usually output to the > <head> of their HTML file by using Deform.Form.get_widget_resources(). I > have been unable to find any examples of this problem being solved nor any > references to it within the documentation. Has anyone had experience with > this, or have a good solution? Any example widgets that use resources which > are not included in Deform by default would be much appreciated. > > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
