[Product-Developers] Python Import Classes Problem

Mayank Mathur mayankmathur at tetrain.com
Wed Oct 1 06:23:43 UTC 2008


hi
im actually implementing search thru Mysql DB and not ZODB
is there any other way ?

Regards,
Mayank Mathur




Hedley Roos wrote:
>> hello all.
>> Im creating a Search form as a Plone Product in Python.
>> Im facing problems while passing parameters between classes , in different
>> Python scripts.
>> I've already used "Import" statm. in form 2 to import class 1 of form1, but
>> it's giving error:
>>   "you are not authorized to access this class"
>> is there any other way or am i missing some trick in importing.??
>>     
>
> Hi
>
> You have to be way more specific. There is not enough info in your
> post to help you.
>
> A few thoughts. You do not need a full fledged product to do search.
> Here are a few other approaches.
>
> 1. Hook into Plone's existing search functionality
> 2. Use Form Controller scripts and templates to implement the search.
> 3. Use browser views (my favourite)
>
> BTW your import error is due to you attempting to import a module
> which is not allowed for restricted Python (Python scripts run in a
> restricted mode). Searching for allow_module on this list will show
> you how to resolve that. And even after you add the allow_module
> you'll probably run into other restrictions.
>
> Hedley
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> http://lists.plone.org/mailman/listinfo/product-developers
>   




More information about the Product-Developers mailing list