Re : [Zope3-Users] Are there some French Zope user here ?

2006-09-22 Thread Stéphane Brault
I'm here to, ;-)
 +1
 
 Stéphane Brault

- Message d'origine 
De : Thierry Florac <[EMAIL PROTECTED]>
À : KLEIN Stéphane <[EMAIL PROTECTED]>
Cc : zope3-users@zope.org
Envoyé le : Vendredi, 22 Septembre 2006, 2h29mn 06s
Objet : Re: [Zope3-Users] Are there some French Zope user here ?

Le vendredi 22 septembre 2006 à 11:29 +0200, KLEIN Stéphane a écrit :
> Are there some French Zope user here ?
> 
> If the number of french user is important, I propose the creation of
> zope-french-user and zope3-french-user mailing list.
> 
> What do you think about this idea ?
> 
> Regards,
> Stephane


  Hi,

I'm here :-) 
+1

  Thierry Florac
-- 
  Chef de projet intranet/internet
  Office National des Forêts - Département Informatique
  2, Avenue de Saint-Mandé
  75570 PARIS Cedex 12
  Mél : [EMAIL PROTECTED]
  Tél. : +33 01.40.19.59.64
  Fax. : +33 01.40.19.59.85

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : [Zope3-Users] Why Zope3

2006-08-28 Thread Stéphane Brault
I'm not a zope 3 expert, mainly a user.
 I use zope 3 for my company project and I'm fairly happy with it.
 I don't use the ZODB (the object database coming with zope) but 
 mysql through the sqlos package (which allows to use the SQLObject
 ORM), there is also a package which allows the use of SQLAlchemy,
 zalchemy, but I haven't used it so I can't comment on it, but with one of these
 using Oracle shouldn't be a problem.
 I must say I don't really use zope 3 the 'traditionnal' way, and it's a tribute
 to the zope 3 developpers that I could go my way fairly easily.
 In my opinion zope's learning curve might be steaper than other frameworks',
 but the its well worth the initial pain, due to the sheer power of zope and the
 ease of extensions through the use of components. Once the core concepts
 are mastered, zope is easy to use and, in my opinion powerful and versatile.
 
 As I said, I'm no expert, but I hope that helps.
 
 Stéphane

- Message d'origine 
De : Robert Hicks <[EMAIL PROTECTED]>
À : zope3-users@zope.org
Envoyé le : Lundi, 28 Août 2006, 3h32mn 56s
Objet : [Zope3-Users] Why Zope3

I am looking into the Python arena for some in-house web work. I see 
Turbogears, Django and Zope3 mentioned the most. I am interested in 
knowing what Zope3 brings to the table and how well it plays with Oracle 
(9i).

Any thoughts would be greatly appreciated.

:Robert

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : [Zope3-Users] Zope and UTF-8 accentuated characters

2006-08-28 Thread Stéphane Brault
Thanks Marius.
  
  My data is stored in a MySQL database (charset utf-8), which I access through 
sqlos.
  My string data are stored in a unicodeCol (a sqlos object which manages 
unicode data). 
  The browser's page charset is UTF-8, so I gess there lies the problem.
 I generate pages through ajax via the jsonserver package. My request passes 
the request
 to the server, which generates HTML with pages templates and sends back
 the HTML, wich is used to update the page (via innerHTML). The fact is this 
problem
 is a bit random, sometimes the accents are well displayed, sometimes not.
 It also seems that there is a slight behaviour difference between linux 
(debian 3.1) and
 windows.
 
 Stéphane

- Message d'origine 
De : Marius Gedminas <[EMAIL PROTECTED]>
À : zope3-users@zope.org
Envoyé le : Samedi, 26 Août 2006, 2h58mn 48s
Objet : Re: [Zope3-Users] Zope and UTF-8 accentuated characters

On Sat, Aug 26, 2006 at 02:34:55PM +0200, Stéphane Brault wrote:
>  I have a lot of unicode data with accentuated characters. The trouble
>  is that it is sometimes displayed the right way (in combo boxes,
>  lists,.. ) and sometimes not, especially in text inputs.

I use Unicode data in my Zope 3 applications extensively, and usually
there are no problems.

>  The input data is saved correctly but not displayed correctly (é is
>  saved the following the utf-8 format and displayed as é, which
>  corresponds the utf-8 encoding).

It is customary to store Unicode data in Python's unicode strings rather
than in UTF-8 encoded 8-bit strings.

Can you check what your web browser thinks about the page's charset?  If
it selects ISO-8859-1, then your data is presented correctly, but the
server did not specify the correct Content-Type header.  If the browser
thinks the page is in UTF-8, then the server mishandled the data.

Zope 3 automatically converts Unicode to UTF-8 and adds 'charset=UTF-8'
to the Content-Type header when a view returns a Unicode string.  This
is the recommended way of handling Unicode data in Zope 3, and this is
what happens by default if your views render page templates.

>  I tried defining my templates' charset as utf-8, but that generates lots 
>  of errors. Has anyone an idea on how to solve this problem.

You have not told us enough to diagnose the problem.  Can you reproduce
it with a shortest possible test case?

Marius Gedminas
-- 
Woe unto them that rise up early in the morning -- Isaiah 5:11

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : Re : [Zope3-Users] Re: Zope 3 SSL

2006-08-26 Thread Stéphane Brault
Thanks Chris,
 I think it is indeed more an apache problem (or rather my lack of apache 
skills ;-)) than
 a zope one, anyway I'm happy with zope's ssl support for the time being.
 
 Stéphane

- Message d'origine 
De : Chris Withers <[EMAIL PROTECTED]>
À : Stéphane Brault <[EMAIL PROTECTED]>
Cc : zope3-users@zope.org
Envoyé le : Vendredi, 25 Août 2006, 4h25mn 18s
Objet : Re: Re : [Zope3-Users] Re: Zope 3 SSL

Stéphane Brault wrote:
> But I can't seem to be able to use apache as a proxy.

If you elaborate, people may be able to help you.

However, for that specific problem #apache on irc.freenode.net will 
probably be of more service...

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk




___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Zope and UTF-8 accentuated characters

2006-08-26 Thread Stéphane Brault
Hi,
 
 I have a lot of unicode data with accentuated characters. The trouble is that 
it is sometimes displayed the
 right way (in combo boxes, lists,.. ) and sometimes not, especially in text 
inputs. The input 
 data is saved correctly but not displayed correctly (é is saved the following 
the utf-8 format and displayed as
 é, which corresponds the utf-8 encoding). I tried defining my templates' 
charset as utf-8, but that generates lots 
 of errors. Has anyone an idea on how to solve this problem.
 
 Thanks,
 
 Stéphane


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : [Zope3-Users] Re: Zope 3 SSL

2006-08-24 Thread Stéphane Brault
Thanks all for your answers.
 When I use twisted ssl by commenting the 8080 server and uncommenting the ssl 
server it seems to work. But I can't seem to be able to use apache as a proxy.
 
 Thanks again,
 
 Stéphane

- Message d'origine 
De : Philipp von Weitershausen <[EMAIL PROTECTED]>
À : zope3-users@zope.org
Envoyé le : Jeudi, 24 Août 2006, 8h30mn 15s
Objet : [Zope3-Users] Re: Zope 3 SSL

Stéphane Brault wrote:
> Hi,
>  I need to run my site  with SSL. I don't know how to use SSL 
>  with Zope 3 or if I should run zope behind apache 2, and if so
>  how. Any hint ?

Most people have suggestd to run Zope behind Apache. This is certainly a
very common way of doing it.

You can also use twisted's built-in SSL support and run Zope 3 directly
with SSL support. See the comments in zope.conf.

Philipp

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Zope 3 SSL

2006-08-23 Thread Stéphane Brault
Hi,
 I need to run my site  with SSL. I don't know how to use SSL 
 with Zope 3 or if I should run zope behind apache 2, and if so
 how. Any hint ?
 
 Thanks,
 
 Stéphane
  

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : [Zope3-Users] Getting params in a request

2006-07-12 Thread Stéphane Brault
Thanks Pete,
 It was indeed what I was getting at, but since I use ajax I mostly don't use 
views,
 from there comes my ignorance ;-)
 
 Stéphane

- Message d'origine 
De : Pete Taylor <[EMAIL PROTECTED]>
À : Stéphane Brault <[EMAIL PROTECTED]>; zope3-users@zope.org
Envoyé le : Mercredi, 12 Juillet 2006, 4h55mn 51s
Objet : Re: [Zope3-Users] Getting params in a request

Stephane,
do you mean how do you get the params out of the request when they
post to your page?
self.request.get('param1') should give you value1, if that's what
you're getting at...

On 7/12/06, Stéphane Brault <[EMAIL PROTECTED]> wrote:
> Hi,
>  for my application I need to let another site redirect its user to one of my 
> page with an operation and some parameters, giving it this address:
>  http://www.mysite.com/mypage?myOperation¶m1=vaue1¶m2=value2
>  The values are filled by the other site.
>  How can I do that ?
>
>  Thanks,
>
>  Stéphane
>
>
> ___
> Zope3-users mailing list
> Zope3-users@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
>


-- 
"All guilt is relative, loyalty counts, and never let your conscience
be your guide."
  - Lucas Buck, American Gothic



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : [Zope3-Users] Getting params in a request

2006-07-12 Thread Stéphane Brault
Thanks Frank,
 I didn't know it would be that simple ;-), Zope's strength I guess  ;-)
 
 Stéphane

- Message d'origine 
De : FB <[EMAIL PROTECTED]>
À : user-list zope 
Envoyé le : Mercredi, 12 Juillet 2006, 5h01mn 46s
Objet : Re: [Zope3-Users] Getting params in a request

Hi,

On Wed, Jul 12, 2006 at 02:50:47PM +, Stéphane Brault wrote:
> Hi, 
>  for my application I need to let another site redirect its user to one of my 
> page with an operation and some parameters, giving it this address:
>  http://www.mysite.com/mypage?myOperation¶m1=vaue1¶m2=value2
>  The values are filled by the other site.
>  How can I do that ?

class MyPageView(BrowserView):
   def __call__(self):
  if 'myOperation' in self.request.form:
 param1=self.request.form['param1']
 param2=self.request.form['param2']
 do_something(param1,param2)

MyPageView has to be either the default view asociated to the 'mypage' object or
a view called 'mypage' associated to the RootFolder object.

Regards,

Frank
 
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Getting params in a request

2006-07-12 Thread Stéphane Brault
Hi, 
 for my application I need to let another site redirect its user to one of my 
page with an operation and some parameters, giving it this address:
 http://www.mysite.com/mypage?myOperation¶m1=vaue1¶m2=value2
 The values are filled by the other site.
 How can I do that ?
 
 Thanks,
 
 Stéphane


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : Re : [Zope3-Users] Using twisted spread client within zope

2006-06-23 Thread Stéphane Brault
Thanks David,
 that's what I inferred (not the details though ;-)). For now, as I have to 
 be quick, following your advice I'll use XML RPC. But for future 
implementation,
 I'll investigate further.
 
 Stéphane

- Message d'origine 
De : David Pratt <[EMAIL PROTECTED]>
À : Stéphane Brault <[EMAIL PROTECTED]>
Cc : user-list zope 
Envoyé le : Jeudi, 22 Juin 2006, 8h41mn 34s
Objet : Re: Re : [Zope3-Users] Using twisted spread client within zope

Hi Stephane. It is possible to use a spread client in zope. That said, I 
am not sure whether you are attempting to integrate the new pb 
(unstable) or currently stable pb. Either way, I cannot provide code for 
you but say that this is not trivial. It also requires conforming zope 
storages to interact with. Your methods need to interact with the zope's 
storages if you want zope to do its thing properly.

This adds significantly to the complexity since the storage internals of 
zope take some time to learn and significant time to understand well 
enough to modify and construct storages. Once you have tested a suitable 
client server, you will also need to modify zope's startup to include 
your client service as part of zope's multiservice.

My advice to you is that you may be better off with a web service since 
this can be configured easily in zope since you are not involving the 
storage layer directly. It is just part of you app.

Regards,
David

Stéphane Brault wrote:
> Hi again,
>  in order to call my twisted process I need to run the spread client within 
> Zope,
>  is this possible (maybe through a utility). I'm not sure this would 
> integrate well
>  with Zope mainly because of the twisted logic (deferred, ...), but I might 
> be wrong
>  (this wouldn't be the first time ;-)). Has someone had any experience with 
> that ?
>  
>  Thanks,
>  
>  Stéphane
> 
> - Message d'origine 
> De : Stéphane Brault <[EMAIL PROTECTED]>
> À : user-list zope 
> Envoyé le : Mardi, 20 Juin 2006, 12h59mn 22s
> Objet : [Zope3-Users] Using twisted spread client within zope
> 
> Hi,
>  for my application I have to communicate with external web services,
>  these communications have to be scheduled. That is why I use twisted 
> processes
>  to communicate with external servers and zope for the GUI side.
>  I need to communicate from zope to the twisted processes, has anyone
>  done that, especially with spread, or do I need to go through http ?
>  
>  Thanks,
>  
>  Stéphane
> 
> 
> ___
> Zope3-users mailing list
> Zope3-users@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
> 
> 
> 
> ___
> Zope3-users mailing list
> Zope3-users@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
> 



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : [Zope3-Users] Using twisted spread client within zope

2006-06-22 Thread Stéphane Brault
Hi again,
 in order to call my twisted process I need to run the spread client within 
Zope,
 is this possible (maybe through a utility). I'm not sure this would integrate 
well
 with Zope mainly because of the twisted logic (deferred, ...), but I might be 
wrong
 (this wouldn't be the first time ;-)). Has someone had any experience with 
that ?
 
 Thanks,
 
 Stéphane

- Message d'origine ----
De : Stéphane Brault <[EMAIL PROTECTED]>
À : user-list zope 
Envoyé le : Mardi, 20 Juin 2006, 12h59mn 22s
Objet : [Zope3-Users] Using twisted spread client within zope

Hi,
 for my application I have to communicate with external web services,
 these communications have to be scheduled. That is why I use twisted processes
 to communicate with external servers and zope for the GUI side.
 I need to communicate from zope to the twisted processes, has anyone
 done that, especially with spread, or do I need to go through http ?
 
 Thanks,
 
 Stéphane


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : Re : Re : [Zope3-Users] Uploading files

2006-06-20 Thread Stéphane Brault
Thanks Frank,
 I'll try that,
 
 Stéphane

- Message d'origine 
De : Frank Burkhardt <[EMAIL PROTECTED]>
À : Stéphane Brault <[EMAIL PROTECTED]>; zope3-users@zope.org
Envoyé le : Mardi, 20 Juin 2006, 12h40mn 23s
Objet : Re: Re : Re : [Zope3-Users] Uploading files

Hi,

On Tue, Jun 20, 2006 at 10:10:52AM +, Stéphane Brault wrote:
> Hi all,
>  I'm sorry to bother you with what must be a simple problem but I still can't 
> see
>  how to upload files with zope 3. If ajax is not a good way to go, how should 
> I go ?
>  I just need that to upload csv files which I parse to update my database 
> (MySQL) and
>  to upload image files.

You could use the Bytes() -schema whose InputWidget is a file upload field by 
default.
The content class or adapter for your form should look like this:

class IMyClass(Interface):
   [...]
   csv=Bytes(
   [...]
   )

class MyClass(object):
   [...]
   get_file(self):
  [... put database code here that returns a csv file - if you like ...]
   set_file(self,data):
  [... data contains you file's content. process it as you like ...]
   csv=property(get_file,set_file)

Just use an  to get a file upload view.

Regards,

Frank



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Using twisted spread client within zope

2006-06-20 Thread Stéphane Brault
Hi,
 for my application I have to communicate with external web services,
 these communications have to be scheduled. That is why I use twisted processes
 to communicate with external servers and zope for the GUI side.
 I need to communicate from zope to the twisted processes, has anyone
 done that, especially with spread, or do I need to go through http ?
 
 Thanks,
 
 Stéphane


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : Re : [Zope3-Users] Uploading files

2006-06-20 Thread Stéphane Brault
Hi all,
 I'm sorry to bother you with what must be a simple problem but I still can't 
see
 how to upload files with zope 3. If ajax is not a good way to go, how should I 
go ?
 I just need that to upload csv files which I parse to update my database 
(MySQL) and
 to upload image files.
 
 Thanks, 
 
 Stéphane

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : [Zope3-Users] Unable to get z3c with svn

2006-06-06 Thread Stéphane Brault
Thanks Bernd,
 when I try to use dojo to make a rich text editor, importing the scripts as is 
written in the rich text guide, nothing happens. Is there something special to 
do ?
 
 Stéphane

- Message d'origine 
De : Bernd Dorn <[EMAIL PROTECTED]>
À : user-list zope 
Envoyé le : Mardi, 6 Juin 2006, 3h21mn 24s
Objet : Re: [Zope3-Users] Unable to get z3c with svn


On 06.06.2006, at 15:00, Stéphane Brault wrote:

> Hi,
>  I'm interested by the z3c.javascript package, but I can't get it  
> through svn (I'm using tortoisesvn).
>  When I try I get :
>  Error: PROPFIND request failed on '/z3c.javascript'
>  Error: PROPFIND of '/z3c.javascript': 301 Moved (http://svn.zope.org)

you have to use the svn protocol not http

URL: svn://svn.zope.org/repos/main/z3c.javascript/trunk/src/z3c

regards, Bernd

>
>
>  Any hint ?
>
>  Thanks,
>
>  Stéphane
>
>
>
> ___
> Zope3-users mailing list
> Zope3-users@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Unable to get z3c with svn

2006-06-06 Thread Stéphane Brault
Hi,
 I'm interested by the z3c.javascript package, but I can't get it through svn 
(I'm using tortoisesvn).
 When I try I get :
 Error: PROPFIND request failed on '/z3c.javascript'  
 Error: PROPFIND of '/z3c.javascript': 301 Moved (http://svn.zope.org) 
 
 Any hint ?
 
 Thanks,
 
 Stéphane
 


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : Re : [Zope3-Users] Uploading files

2006-06-05 Thread Stéphane Brault
Thanks Tarek,
 
 in fact I just need a simple thing:
 the user upload a text file which I then parse and update a database. I also 
need to let the user upload images which I then put in a folder (this will 
probably be done with ftp).
 So my main concern is to let the user upload text files, which I don't need to 
save. I'm sure I only need a simple thing to do but I don't know the 
techniques. Also if there's no simple way in ajax, I don't mind going another 
way, I still need to know how to do it though.
 
 Stéphane

- Message d'origine 
De : Tarek Ziadé <[EMAIL PROTECTED]>
À : Stéphane Brault <[EMAIL PROTECTED]>
Cc : zope3-users@zope.org
Envoyé le : Jeudi, 1 Juin 2006, 4h59mn 42s
Objet : Re: Re : [Zope3-Users] Uploading files

Stéphane Brault wrote:

>Thanks Stephan,
>  could you indicate me another way to upload files ?
>  
>  Stéphane
>
>- Message d'origine 
>De : Stephan Richter <[EMAIL PROTECTED]>
>À : zope3-users@zope.org; Stéphane Brault <[EMAIL PROTECTED]>
>Envoyé le : Jeudi, 1 Juin 2006, 2h53mn 32s
>Objet : Re: [Zope3-Users] Uploading files
>
>On Tuesday 30 May 2006 09:30, Stéphane Brault wrote:
>  
>
>> for my application I mainly use sqlos and jsonserver, which means that I
>>don't use much standard Zope components, I need to let users upload a file
>>which I parse to update the database. I don't see how to upload files with
>>AJAX. Is there a way or should I go another way. I must say I don't know
>>how to do it the standard way.
>>
>>
>
>While I hate AJAX with a passion, you could certainly do this. If JS has a way 
>to access a local file once it has been selected, then you can use the 
>XmlHttpRequest class to PUT the file on the server, for example. I certainly 
>would not use JSON for this task.
>
>Regards,
>Stephan
>  
>
You cannot upload file directly in javascript, because it can't reach
the file system to get the file (it's all about security)

the recipe is to use an IFrame in your form, to get back the hand into
the client,
then do what you need to do on client side while your file is beeing
uploaded.

What your precise use case ?

Tarek



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : [Zope3-Users] Uploading files

2006-06-01 Thread Stéphane Brault
Thanks Stephan,
  could you indicate me another way to upload files ?
  
  Stéphane

- Message d'origine 
De : Stephan Richter <[EMAIL PROTECTED]>
À : zope3-users@zope.org; Stéphane Brault <[EMAIL PROTECTED]>
Envoyé le : Jeudi, 1 Juin 2006, 2h53mn 32s
Objet : Re: [Zope3-Users] Uploading files

On Tuesday 30 May 2006 09:30, Stéphane Brault wrote:
>  for my application I mainly use sqlos and jsonserver, which means that I
> don't use much standard Zope components, I need to let users upload a file
> which I parse to update the database. I don't see how to upload files with
> AJAX. Is there a way or should I go another way. I must say I don't know
> how to do it the standard way.

While I hate AJAX with a passion, you could certainly do this. If JS has a way 
to access a local file once it has been selected, then you can use the 
XmlHttpRequest class to PUT the file on the server, for example. I certainly 
would not use JSON for this task.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Uploading files

2006-05-30 Thread Stéphane Brault
Hi,
 for my application I mainly use sqlos and jsonserver, which means that I don't 
use much standard Zope components,
 I need to let users upload a file which I parse to update the database. I 
don't see how to upload files with AJAX.
 Is there a way or should I go another way. I must say I don't know how to do 
it the standard way.
 
 Thanks,
 
 Stéphane


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : [Zope3-Users] debian installation

2006-04-25 Thread Stéphane Brault
Thanks Andrius,
 it now works.
 
 Stéphane
 
 
- Message d'origine 
De : Andrius Armonas <[EMAIL PROTECTED]>
À : Stéphane Brault <[EMAIL PROTECTED]>
Cc : user-list zope 
Envoyé le : Lundi, 24 Avril 2006, 10h55mn 23s
Objet : Re: [Zope3-Users] debian installation

Hi,

you have to install python2.4-dev package.

--
Andrius


Stéphane Brault wrote:

> Hi,
>  I'm trying to install zope on a debian distribution. ./configure works ok, 
> then when I invoke make
>  I get :
>  /usr/bin/python2.4 install.py -q build
>  error: invalid Python installation: unable to open 
> /usr/lib/python2.4/config/Makefile (No such file or directory)
>  make: *** [build] Error 1
>  I then create a config directory and copy Makefile in it.
>  I relaunch make and get:
>  /usr/bin/python2.4 install.py -q build
>  Traceback (most recent call last):
>File "install.py", line 29, in ?
>  context.setup()
>File "/home/Zope-3.2.0/Support/zpkgsetup/setup.py", line 132, in setup
>  setup(**kwargs)
>File "/usr/lib/python2.4/distutils/core.py", line 149, in setup
>  dist.run_commands()
>File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands
>  self.run_command(cmd)
>File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
>  cmd_obj.run()
>File "/usr/lib/python2.4/distutils/command/build.py", line 112, in run
>  self.run_command(cmd_name)
>File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command
>  self.distribution.run_command(command)
>File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
>  cmd_obj.run()
>File "/home/Zope-3.2.0/Support/zpkgsetup/build_ext.py", line 24, in run
>  distutils.command.build_ext.build_ext.run(self)
>File "/usr/lib/python2.4/distutils/command/build_ext.py", line 254, in run
>  customize_compiler(self.compiler)
>File "/usr/lib/python2.4/distutils/sysconfig.py", line 161, in 
> customize_compiler
>  cpp = cc + " -E"   # not always
>  TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
>  make: *** [build] Error 1
>  
>  Any hint ?
>  Thanks,
>  
>  Stéphane
> 
> 
> ___
> Zope3-users mailing list
> Zope3-users@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users




___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : [Zope3-Users] debian installation

2006-04-25 Thread Stéphane Brault
Thanks David,
 that's what I do ;-)
 
 Stéphane

- Message d'origine 
De : David Johnson <[EMAIL PROTECTED]>
À : Stéphane Brault <[EMAIL PROTECTED]>; user-list zope 
Envoyé le : Lundi, 24 Avril 2006, 8h48mn 45s
Objet : RE: [Zope3-Users] debian installation

I've installed on Debian many times and I don't remember these troubles with
Sarge.  I used Debian Python2.4. I suspect some python troubles here, but
I'm not python expert.  I do the install using:


1. cd Zope-3.2.0
2. ./configure --with-python /usr/bin/python2.4
3. make


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> On Behalf Of Stéphane Brault
> Sent: Monday, April 24, 2006 12:49 PM
> To: user-list zope
> Subject: [Zope3-Users] debian installation
> 
> Hi,
>  I'm trying to install zope on a debian distribution. ./configure works
> ok, then when I invoke make
>  I get :
>  /usr/bin/python2.4 install.py -q build
>  error: invalid Python installation: unable to open
> /usr/lib/python2.4/config/Makefile (No such file or directory)
>  make: *** [build] Error 1
>  I then create a config directory and copy Makefile in it.
>  I relaunch make and get:
>  /usr/bin/python2.4 install.py -q build
>  Traceback (most recent call last):
>File "install.py", line 29, in ?
>  context.setup()
>File "/home/Zope-3.2.0/Support/zpkgsetup/setup.py", line 132, in setup
>  setup(**kwargs)
>File "/usr/lib/python2.4/distutils/core.py", line 149, in setup
>  dist.run_commands()
>File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands
>  self.run_command(cmd)
>File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
>  cmd_obj.run()
>File "/usr/lib/python2.4/distutils/command/build.py", line 112, in run
>  self.run_command(cmd_name)
>File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command
>  self.distribution.run_command(command)
>File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
>  cmd_obj.run()
>File "/home/Zope-3.2.0/Support/zpkgsetup/build_ext.py", line 24, in run
>  distutils.command.build_ext.build_ext.run(self)
>File "/usr/lib/python2.4/distutils/command/build_ext.py", line 254, in
> run
>  customize_compiler(self.compiler)
>File "/usr/lib/python2.4/distutils/sysconfig.py", line 161, in
> customize_compiler
>  cpp = cc + " -E"   # not always
>  TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
>  make: *** [build] Error 1
> 
>  Any hint ?
>  Thanks,
> 
>  Stéphane
> 
> 
> ___
> Zope3-users mailing list
> Zope3-users@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users




___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] debian installation

2006-04-24 Thread Stéphane Brault
Hi,
 I'm trying to install zope on a debian distribution. ./configure works ok, 
then when I invoke make
 I get :
 /usr/bin/python2.4 install.py -q build
 error: invalid Python installation: unable to open 
/usr/lib/python2.4/config/Makefile (No such file or directory)
 make: *** [build] Error 1
 I then create a config directory and copy Makefile in it.
 I relaunch make and get:
 /usr/bin/python2.4 install.py -q build
 Traceback (most recent call last):
   File "install.py", line 29, in ?
 context.setup()
   File "/home/Zope-3.2.0/Support/zpkgsetup/setup.py", line 132, in setup
 setup(**kwargs)
   File "/usr/lib/python2.4/distutils/core.py", line 149, in setup
 dist.run_commands()
   File "/usr/lib/python2.4/distutils/dist.py", line 946, in run_commands
 self.run_command(cmd)
   File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
 cmd_obj.run()
   File "/usr/lib/python2.4/distutils/command/build.py", line 112, in run
 self.run_command(cmd_name)
   File "/usr/lib/python2.4/distutils/cmd.py", line 333, in run_command
 self.distribution.run_command(command)
   File "/usr/lib/python2.4/distutils/dist.py", line 966, in run_command
 cmd_obj.run()
   File "/home/Zope-3.2.0/Support/zpkgsetup/build_ext.py", line 24, in run
 distutils.command.build_ext.build_ext.run(self)
   File "/usr/lib/python2.4/distutils/command/build_ext.py", line 254, in run
 customize_compiler(self.compiler)
   File "/usr/lib/python2.4/distutils/sysconfig.py", line 161, in 
customize_compiler
 cpp = cc + " -E"   # not always
 TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
 make: *** [build] Error 1
 
 Any hint ?
 Thanks,
 
 Stéphane


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : Re : Re : [Zope3-Users] formlib problem

2006-04-19 Thread Stéphane Brault
Thanks Jim,
 I now get the page back with the right data. I now have to figure out how to 
have the actions work.
 I guess I'll have to ajaxify my page in order to pass the data and have the 
form do it's work. 
 I'll let you know if I encounter further problems or if it works (hopefully).
 
 Stéphane

- Message d'origine 
De : Jim Washington <[EMAIL PROTECTED]>
À : Stéphane Brault <[EMAIL PROTECTED]>
Cc : zope3-users@zope.org
Envoyé le : Mercredi, 19 Avril 2006, 6h10mn 35s
Objet : Re: Re : Re : [Zope3-Users] formlib problem

Stéphane Brault wrote:
> Hi Jim, 
>  the Items object is my object, linked to my items, table which implements 
> the IItems interface I use for my form:
>  
>  from neteven.interfaces.items import IItems
>  from zope.formlib import form
>  
>  class ItemsForm(form.EditForm):
>  form_fields = form.Fields(IItems)
>  form_fields = form_fields.omit('dateLastUpdate')
>  
>  Items is defined this way:
>  
>  from zope.interface import implements
>  from sqlobject import *
>  from sqlos import SQLOS
>  from neteven.interfaces.items import IItems
>  
>  class Items(SQLOS):
>  implements(IItems)
>  
>  class sqlmeta:
>  table = 'items'
>  
>  
>   When I add this zcml declaration :
>  for=".interfaces.items.IItems"
>name="edit.html"
>class=".forms.items.ItemsForm"
>menu="zmi_views"
>title="Edit a Item"
>permission="zope.ManageContent"
>/>
>  everything works fine from the ZMI (I created simple containers to test 
> that).
>  
>  My JSON server side code is:
>  
>  def getItemEdit(self, itemId):
>  item = Items.get(itemId) #a sqlos function to get an Item instance 
> from the table given its Id
>  return ItemsForm(item, self.request)()
>  
> The fact is I don't use any page template right now ( though I might do this 
> later to have a nice GUI).
>  
>   
Actually, you are using a page template.

Calling ItemsForm() invokes the render() method of 
zope.formlib.form.FormBase, which uses pageform.pt in the zope.formlib 
folder by default.  This is where title_or_id is requested.

You may wish to set a different template for your ItemsForm class.

Have you tried subclassing form.SubPageEditForm instead of form.EditForm?

-Jim Washington





___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : [Zope3-Users] Re: Re : Re : formlib problem

2006-04-19 Thread Stéphane Brault
Thanks Jürgen,
  I figured that out, I was wondering how to work around this ;-)
 Jim just gave me the answer.
 
 Stéphane

- Message d'origine 
De : jürgen Kartnaller <[EMAIL PROTECTED]>
À : zope3-users@zope.org
Envoyé le : Mercredi, 19 Avril 2006, 6h05mn 10s
Objet : [Zope3-Users] Re: Re : Re : formlib problem

Stéphane Brault wrote:
> Hi Jim, 
>  the Items object is my object, linked to my items, table which implements 
> the IItems interface I use for my form:
>  
>  from neteven.interfaces.items import IItems
>  from zope.formlib import form
>  
>  class ItemsForm(form.EditForm):
>  form_fields = form.Fields(IItems)
>  form_fields = form_fields.omit('dateLastUpdate')
>  
>  Items is defined this way:
>  
>  from zope.interface import implements
>  from sqlobject import *
>  from sqlos import SQLOS
>  from neteven.interfaces.items import IItems
>  
>  class Items(SQLOS):
>  implements(IItems)
>  
>  class sqlmeta:
>  table = 'items'
>  
>  
>   When I add this zcml declaration :
>  for=".interfaces.items.IItems"
>name="edit.html"
>class=".forms.items.ItemsForm"
>menu="zmi_views"
>title="Edit a Item"
>permission="zope.ManageContent"
>/>
>  everything works fine from the ZMI (I created simple containers to test 
> that).
>  
>  My JSON server side code is:
>  
>  def getItemEdit(self, itemId):
>  item = Items.get(itemId) #a sqlos function to get an Item instance 
> from the table given its Id
>  return ItemsForm(item, self.request)()

After the request from the database your item has no location and is
therefore not physically locatable.
If you use it from within an SQLOS container the container puts the item
into a location proxy.
That's the difference between your test in the ZMI and this code.

Jürgen

>  
> The fact is I don't use any page template right now ( though I might do this 
> later to have a nice GUI).
>  
>  Thanks,
>  
>  Stéphane
>  
> ----- Message d'origine 
> De : Jim Washington <[EMAIL PROTECTED]>
> À : Stéphane Brault <[EMAIL PROTECTED]>
> Cc : zope3-users@zope.org
> Envoyé le : Mercredi, 19 Avril 2006, 5h01mn 09s
> Objet : Re: Re : [Zope3-Users] formlib problem
> 
> Stéphane Brault wrote:
>> Hi again,
>>  sorry to be a bore ;-)
>>  I keep on trying to use formlib, I no longer have a problem of adapters for 
>> my fields but I get this error:
>>  2006-04-19T16:13:32 ERROR root 
>> C:\Python24\Lib\site-packages\zope\publisher\publish.py line 138 in publish
>>  => 'result = publication.callObject(request, object)'
>>  ** exceptions.TypeError: ('Could not adapt', , 
>> )
>>  C:\Python24\Lib\site-packages\zope\app\publication\zopepublication.py line 
>> 161 in callObject
>>  => 'return mapply(ob, request.getPositionalArguments(), request)'
>>  ** exceptions.TypeError: ('Could not adapt', , 
>> )
>>  C:\Python24\Lib\site-packages\zope\publisher\publish.py line 113 in mapply
>>  => 'return debug_call(object, args)'
>>  ** exceptions.TypeError: ('Could not adapt', , 
>> )
>>  C:\Python24\Lib\site-packages\zope\publisher\publish.py line 119 in 
>> debug_call
>>  => 'return object(*args)'
>>  ** exceptions.TypeError: ('Could not adapt', , 
>> )
>>  c:\ZopeInst\lib\python\neteven\database\items.py line 43 in getItemEdit
>>  => 'return ItemsForm(item, self.request).render()'
>>  ** exceptions.TypeError: ('Could not adapt', , 
>> )
>>  C:\Python24\Lib\site-packages\zope\formlib\form.py line 733 in render
>>  => 'self.form_result = self.template()'
>>  ** exceptions.TypeError: ('Could not adapt', , 
>> )
>>  C:\Python24\Lib\site-packages\zope\app\pagetemplate\viewpagetemplatefile.py 
>> line 83 in __call__
>>  => 'return self.im_func(im_self, *args, **kw)'
>>  ** exceptions.TypeError: ('Could not adapt', , 
>> )
>>  C:\Python24\Lib\site-packages\zope\app\pagetemplate\viewpagetemplatefile.py 
>> line 51 in __call__
>>  => "sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),"
>>  ** exceptions.TypeError: ('Could not adapt', , 
>> )
>>  C:\Python24\Lib\site-packages\zope\pagetemplate\pagetemplate.py line 117 in 
>> pt_render
>>  => 'strictinsert=0, sourceAnnotations=sourceAnnotations)()'
>>  ** e

Re : Re : [Zope3-Users] formlib problem

2006-04-19 Thread Stéphane Brault
Hi Jim, 
 the Items object is my object, linked to my items, table which implements the 
IItems interface I use for my form:
 
 from neteven.interfaces.items import IItems
 from zope.formlib import form
 
 class ItemsForm(form.EditForm):
 form_fields = form.Fields(IItems)
 form_fields = form_fields.omit('dateLastUpdate')
 
 Items is defined this way:
 
 from zope.interface import implements
 from sqlobject import *
 from sqlos import SQLOS
 from neteven.interfaces.items import IItems
 
 class Items(SQLOS):
 implements(IItems)
 
 class sqlmeta:
 table = 'items'
 
 
  When I add this zcml declaration :
 
 everything works fine from the ZMI (I created simple containers to test that).
 
 My JSON server side code is:
 
 def getItemEdit(self, itemId):
 item = Items.get(itemId) #a sqlos function to get an Item instance 
from the table given its Id
 return ItemsForm(item, self.request)()
 
The fact is I don't use any page template right now ( though I might do this 
later to have a nice GUI).
 
 Thanks,
 
 Stéphane
 
- Message d'origine 
De : Jim Washington <[EMAIL PROTECTED]>
À : Stéphane Brault <[EMAIL PROTECTED]>
Cc : zope3-users@zope.org
Envoyé le : Mercredi, 19 Avril 2006, 5h01mn 09s
Objet : Re: Re : [Zope3-Users] formlib problem

Stéphane Brault wrote:
> Hi again,
>  sorry to be a bore ;-)
>  I keep on trying to use formlib, I no longer have a problem of adapters for 
> my fields but I get this error:
>  2006-04-19T16:13:32 ERROR root 
> C:\Python24\Lib\site-packages\zope\publisher\publish.py line 138 in publish
>  => 'result = publication.callObject(request, object)'
>  ** exceptions.TypeError: ('Could not adapt', , 
> )
>  C:\Python24\Lib\site-packages\zope\app\publication\zopepublication.py line 
> 161 in callObject
>  => 'return mapply(ob, request.getPositionalArguments(), request)'
>  ** exceptions.TypeError: ('Could not adapt', , 
> )
>  C:\Python24\Lib\site-packages\zope\publisher\publish.py line 113 in mapply
>  => 'return debug_call(object, args)'
>  ** exceptions.TypeError: ('Could not adapt', , 
> )
>  C:\Python24\Lib\site-packages\zope\publisher\publish.py line 119 in 
> debug_call
>  => 'return object(*args)'
>  ** exceptions.TypeError: ('Could not adapt', , 
> )
>  c:\ZopeInst\lib\python\neteven\database\items.py line 43 in getItemEdit
>  => 'return ItemsForm(item, self.request).render()'
>  ** exceptions.TypeError: ('Could not adapt', , 
> )
>  C:\Python24\Lib\site-packages\zope\formlib\form.py line 733 in render
>  => 'self.form_result = self.template()'
>  ** exceptions.TypeError: ('Could not adapt', , 
> )
>  C:\Python24\Lib\site-packages\zope\app\pagetemplate\viewpagetemplatefile.py 
> line 83 in __call__
>  => 'return self.im_func(im_self, *args, **kw)'
>  ** exceptions.TypeError: ('Could not adapt', , 
> )
>  C:\Python24\Lib\site-packages\zope\app\pagetemplate\viewpagetemplatefile.py 
> line 51 in __call__
>  => "sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),"
>  ** exceptions.TypeError: ('Could not adapt', , 
> )
>  C:\Python24\Lib\site-packages\zope\pagetemplate\pagetemplate.py line 117 in 
> pt_render
>  => 'strictinsert=0, sourceAnnotations=sourceAnnotations)()'
>  ** exceptions.TypeError: ('Could not adapt', , 
> )
>  C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py line 277 in __call__
>  => 'self.interpret(self.program)'
>  ** exceptions.TypeError: ('Could not adapt', , 
> )
>  C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py line 352 in 
> interpret
>  => 'handlers[opcode](self, args)'
>  ** exceptions.TypeError: ('Could not adapt', , 
>   ss zope.app.traversing.interfaces.IPhysicallyLocatable>)
>  C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py line 878 in 
> do_defineMacro
>  => 'self.interpret(macro)'
>  ** exceptions.TypeError: ('Could not adapt', , 
> )
>  C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py line 352 in 
> interpret
>  => 'handlers[opcode](self, args)'
>  ** exceptions.TypeError: ('Could not adapt', , 
> )
>  C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py line 926 in 
> do_extendMacro
>  => 'definingName, extending)'
>  ** exceptions.TypeError: ('Could not adapt', , 
> )
>  C:\Python24\Lib\site-packages\zope\tal\talinterpreter.py line 908 in 
> do_useMacro
>  => 'self.interpret(macro)'
>  ** exceptions.TypeError: ('Could not adapt'

Re : [Zope3-Users] formlib problem

2006-04-19 Thread Stéphane Brault
 => 'return expression(self)'
 ** exceptions.TypeError: ('Could not adapt', , 
)
 C:\Python24\Lib\site-packages\zope\tales\expressions.py line 249 in __call__
 => 'v = var(econtext)'
 ** exceptions.TypeError: ('Could not adapt', , 
)
 C:\Python24\Lib\site-packages\zope\tales\expressions.py line 205 in __call__
 => 'return self._eval(econtext)'
 ** exceptions.TypeError: ('Could not adapt', , 
)
 C:\Python24\Lib\site-packages\zope\tales\expressions.py line 199 in _eval
 => 'return ob()'
 ** exceptions.TypeError: ('Could not adapt', , 
)
 C:\Python24\Lib\site-packages\zope\app\pagetemplate\talesapi.py line 73 in 
title_or_name
 => "return getattr(self, 'title', '') or zapi.name(self.context)"
 ** exceptions.TypeError: ('Could not adapt', , 
)
 C:\Python24\Lib\site-packages\zope\app\traversing\api.py line 149 in getName
 => 'return IPhysicallyLocatable(obj).getName()'
 ** exceptions.TypeError: ('Could not adapt', , 
)
 C:\Python24\Lib\site-packages\zope\interface\interface.py line 682 in __call__
 => 'raise TypeError("Could not adapt", obj, self)'
 ** exceptions.TypeError: ('Could not adapt', , 
)
 127.0.0.1 - - [19/Apr/2006:16:13:32 +0200] "POST 
/netevenTest/test/neteven.Accounts.1/ HTTP/1.1" 200 163 "-" "Mozilla/5.0 
(Windows; U; Windows NT 5.1; fr-FR; rv:1.7.12) Gecko/20050919 Firefox/1.0.7"
 
 It seems that retrieving my object from code doesn't give me an address for 
it, which would cause the problem with IPhysicallyLocatable (my uninformed 
guess).
 Is there a way to solve the problem, knowing that my object is retrieved 
through sqlos, and thus has no true address ? There might be something else but 
being
 quite new to zope 3 (and enjoying it, thanks to you all guys), I can't figure 
it out.
 
 Thanks,
 
 Stéphane

- Message d'origine 
De : Stéphane Brault <[EMAIL PROTECTED]>
À : user-list zope 
Envoyé le : Mercredi, 19 Avril 2006, 4h05mn 07s
Objet : Re : Re : [Zope3-Users] formlib problem

Hi,
  when I use formlib the traditional way (registering the page via ZCML, going 
to it via the ZMI),
  everything works fine. The problem is I can't access it programatically. The 
thing I try to do
  is : 
  - call a method via JSON RPC (by the way jsonserver is great ;-)) 
  - in this method I get my object (through sqlos, which is nice too ;-)) and 
then call the formlib class to render my page in html
  - send back the html which is used to update  my page.
  Has anyone tried to use formlib this way, I really need to use AJAX and it 
seems that I can't have both working together, 
  I must be missing something.
  
  Thanks,
  
  Stéphane

- Message d'origine 
De : Stéphane Brault <[EMAIL PROTECTED]>
À : zope3-users@zope.org
Envoyé le : Mardi, 18 Avril 2006, 4h16mn 55s
Objet : Re : [Zope3-Users] formlib problem

Thanks Michael,
 There is indeed something missing :
 ComponentLookupError: ((
  zope.schema._bootstrapfields.Int object at 0x01A83610 , 
  zope.publisher.browser.TestRequest instance URL=http://127.0.0.1 ), 
  InterfaceClass zope.app.form.interfaces.IDisplayWidget , u'')
 My problem has nothing to do with containers, since my interface is
 not a container. It seems that zope can't find the adapters for the shema 
fields, even when 
 I register them by code. I really don't know what to do from now.
 The fact is I use AJAX, so I don't need to register my views, I just
 call them from code to use the generated html as a response to a
 javascript call that then update my page.
 
 Thanks,
 
 Stéphane
 
 

- Message d'origine 
De : Michael Howitz <[EMAIL PROTECTED]>
À : Stéphane Brault <[EMAIL PROTECTED]>
Cc : user-list zope 
Envoyé le : Mardi, 18 Avril 2006, 3h40mn 16s
Objet : Re: [Zope3-Users] formlib problem

Stéphane Brault wrote:
> Hi,
>  I can't use formlib, when I run the example in the form.txt I get this error:
>  Traceback (most recent call last):
>File "", line 1, in -toplevel-
>  print MyForm(None, request)()
>File "", line 6, in __call__
>  widgets = form.setUpWidgets(self.form_fields, 'form', self.context, 
> self.request, ignore_request= ignore_request)
>File "C:\Python24\Lib\site-packages\zope\formlib\form.py", line 255, in 
> setUpWidgets
>  IInputWidget)
>File "C:\Python24\Lib\site-packages\zope\component\__init__.py", line 154, 
> in getMultiAdapter
>  raise ComponentLookupError(objects, interface, name)
>  ComponentLookupError: ((, http://127.0.0.1>), , u'')

There seems to be something missing before ", http..." ... did you copy 
it form the browser output?

>  
>  It happens when setUpWidgets is called in the first example, do I need to 
> import something or to configure a component for formlib to work ?
>  Any hint ?

Guess out of the dust: does the interface of the object you want to 
display have a zope.app.container.constraints.containers directive?

This thread seems similar to your problem.
http://mail.zope.org/pipermail/zope3-users/2006-March/002802.html

HTH,
  mac



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : Re : [Zope3-Users] formlib problem

2006-04-19 Thread Stéphane Brault
Hi,
  when I use formlib the traditional way (registering the page via ZCML, going 
to it via the ZMI),
  everything works fine. The problem is I can't access it programatically. The 
thing I try to do
  is : 
  - call a method via JSON RPC (by the way jsonserver is great ;-)) 
  - in this method I get my object (through sqlos, which is nice too ;-)) and 
then call the formlib class to render my page in html
  - send back the html which is used to update  my page.
  Has anyone tried to use formlib this way, I really need to use AJAX and it 
seems that I can't have both working together, 
  I must be missing something.
  
  Thanks,
  
  Stéphane

- Message d'origine ----
De : Stéphane Brault <[EMAIL PROTECTED]>
À : zope3-users@zope.org
Envoyé le : Mardi, 18 Avril 2006, 4h16mn 55s
Objet : Re : [Zope3-Users] formlib problem

Thanks Michael,
 There is indeed something missing :
 ComponentLookupError: ((
  zope.schema._bootstrapfields.Int object at 0x01A83610 , 
  zope.publisher.browser.TestRequest instance URL=http://127.0.0.1 ), 
  InterfaceClass zope.app.form.interfaces.IDisplayWidget , u'')
 My problem has nothing to do with containers, since my interface is
 not a container. It seems that zope can't find the adapters for the shema 
fields, even when 
 I register them by code. I really don't know what to do from now.
 The fact is I use AJAX, so I don't need to register my views, I just
 call them from code to use the generated html as a response to a
 javascript call that then update my page.
 
 Thanks,
 
 Stéphane
 
 

- Message d'origine 
De : Michael Howitz <[EMAIL PROTECTED]>
À : Stéphane Brault <[EMAIL PROTECTED]>
Cc : user-list zope 
Envoyé le : Mardi, 18 Avril 2006, 3h40mn 16s
Objet : Re: [Zope3-Users] formlib problem

Stéphane Brault wrote:
> Hi,
>  I can't use formlib, when I run the example in the form.txt I get this error:
>  Traceback (most recent call last):
>File "", line 1, in -toplevel-
>  print MyForm(None, request)()
>File "", line 6, in __call__
>  widgets = form.setUpWidgets(self.form_fields, 'form', self.context, 
> self.request, ignore_request= ignore_request)
>File "C:\Python24\Lib\site-packages\zope\formlib\form.py", line 255, in 
> setUpWidgets
>  IInputWidget)
>File "C:\Python24\Lib\site-packages\zope\component\__init__.py", line 154, 
> in getMultiAdapter
>  raise ComponentLookupError(objects, interface, name)
>  ComponentLookupError: ((, http://127.0.0.1>), , u'')

There seems to be something missing before ", http..." ... did you copy 
it form the browser output?

>  
>  It happens when setUpWidgets is called in the first example, do I need to 
> import something or to configure a component for formlib to work ?
>  Any hint ?

Guess out of the dust: does the interface of the object you want to 
display have a zope.app.container.constraints.containers directive?

This thread seems similar to your problem.
http://mail.zope.org/pipermail/zope3-users/2006-March/002802.html

HTH,
  mac



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : [Zope3-Users] formlib problem

2006-04-18 Thread Stéphane Brault
Thanks Michael,
 There is indeed something missing :
 ComponentLookupError: ((
  zope.schema._bootstrapfields.Int object at 0x01A83610 , 
  zope.publisher.browser.TestRequest instance URL=http://127.0.0.1 ), 
  InterfaceClass zope.app.form.interfaces.IDisplayWidget , u'')
 My problem has nothing to do with containers, since my interface is
 not a container. It seems that zope can't find the adapters for the shema 
fields, even when 
 I register them by code. I really don't know what to do from now.
 The fact is I use AJAX, so I don't need to register my views, I just
 call them from code to use the generated html as a response to a
 javascript call that then update my page.
 
 Thanks,
 
 Stéphane
 
 

- Message d'origine 
De : Michael Howitz <[EMAIL PROTECTED]>
À : Stéphane Brault <[EMAIL PROTECTED]>
Cc : user-list zope 
Envoyé le : Mardi, 18 Avril 2006, 3h40mn 16s
Objet : Re: [Zope3-Users] formlib problem

Stéphane Brault wrote:
> Hi,
>  I can't use formlib, when I run the example in the form.txt I get this error:
>  Traceback (most recent call last):
>File "", line 1, in -toplevel-
>  print MyForm(None, request)()
>File "", line 6, in __call__
>  widgets = form.setUpWidgets(self.form_fields, 'form', self.context, 
> self.request, ignore_request= ignore_request)
>File "C:\Python24\Lib\site-packages\zope\formlib\form.py", line 255, in 
> setUpWidgets
>  IInputWidget)
>File "C:\Python24\Lib\site-packages\zope\component\__init__.py", line 154, 
> in getMultiAdapter
>  raise ComponentLookupError(objects, interface, name)
>  ComponentLookupError: ((, http://127.0.0.1>), , u'')

There seems to be something missing before ", http..." ... did you copy 
it form the browser output?

>  
>  It happens when setUpWidgets is called in the first example, do I need to 
> import something or to configure a component for formlib to work ?
>  Any hint ?

Guess out of the dust: does the interface of the object you want to 
display have a zope.app.container.constraints.containers directive?

This thread seems similar to your problem.
http://mail.zope.org/pipermail/zope3-users/2006-March/002802.html

HTH,
  mac



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re : FW: [Zope3-Users] formlib problem

2006-04-18 Thread Stéphane Brault
Thanks Pete,
 I registered the adapters in the shell and it works.
 The trouble is that I have the same problem from zope. 
 It seems that the adapters for the shema fields are not registered, 
 therefore I can't have formlib working, even when I register the adapters 
 by code. I don't know what  to do. The fact is I use AJAX, 
 so I don't have to register my pages, since they are never called, but
 used to generate the html I use to update my pages (which works fine 
otherwise). 
 Maybe this explains the behaviour I get, but I doubt it.
 
 Stéphane

- Message d'origine 
De : Pete Taylor <[EMAIL PROTECTED]>
À : [EMAIL PROTECTED]
Envoyé le : Mardi, 18 Avril 2006, 2h13mn 10s
Objet : Re: FW: [Zope3-Users] formlib problem

formlib works just fine, but from the shell i haven't had much luck
either.  probably need to look at the test suite that runs with
form.txt and do the necessary setup for it to work correctly.  i found
it easier just to build a few sample forms and zcml, and learn "by
doing" since getting the shell to work right was kinda a pain ;)

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Stéphane Brault
> Sent: Tuesday, April 18, 2006 7:42 AM
> To: user-list zope
> Subject: [Zope3-Users] formlib problem
>
> Hi,
>  I can't use formlib, when I run the example in the form.txt I get this
> error:
>  Traceback (most recent call last):
>File "", line 1, in -toplevel-
>  print MyForm(None, request)()
>File "", line 6, in __call__
>  widgets = form.setUpWidgets(self.form_fields, 'form', self.context,
> self.request, ignore_request= ignore_request)
>File "C:\Python24\Lib\site-packages\zope\formlib\form.py", line 255, in
> setUpWidgets
>  IInputWidget)
>File "C:\Python24\Lib\site-packages\zope\component\__init__.py", line
> 154, in getMultiAdapter
>  raise ComponentLookupError(objects, interface, name)
>  ComponentLookupError: ((, http://127.0.0.1>), , u'')
>
>  It happens when setUpWidgets is called in the first example, do I need to
> import something or to configure a component for formlib to work ?
>  Any hint ?
>
>  Thanks,
>
>  Stéphane
>
>
> ___
> Zope3-users mailing list
> Zope3-users@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users


--
"All guilt is relative, loyalty counts, and never let your conscience
be your guide."
  - Lucas Buck, American Gothic



___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] formlib problem

2006-04-18 Thread Stéphane Brault
Hi,
 I can't use formlib, when I run the example in the form.txt I get this error:
 Traceback (most recent call last):
   File "", line 1, in -toplevel-
 print MyForm(None, request)()
   File "", line 6, in __call__
 widgets = form.setUpWidgets(self.form_fields, 'form', self.context, 
self.request, ignore_request= ignore_request)
   File "C:\Python24\Lib\site-packages\zope\formlib\form.py", line 255, in 
setUpWidgets
 IInputWidget)
   File "C:\Python24\Lib\site-packages\zope\component\__init__.py", line 154, 
in getMultiAdapter
 raise ComponentLookupError(objects, interface, name)
 ComponentLookupError: ((, http://127.0.0.1>), , u'')
 
 It happens when setUpWidgets is called in the first example, do I need to 
import something or to configure a component for formlib to work ?
 Any hint ?
 
 Thanks,
 
 Stéphane


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] formlib problem

2006-04-14 Thread Stéphane Brault
Hi,
 I'm trying to use formlib but I get a problem :
 Traceback (most recent call last):
   File "", line 1, in -toplevel-
 print MyForm(None, request)()
   File "", line 6, in __call__
 widgets = form.setUpWidgets(self.form_fields, 'form', self.context, 
self.request, ignore_request=ignore_request)
   File "C:\Python24\Lib\site-packages\zope\formlib\form.py", line 255, in 
setUpWidgets
 IInputWidget)
   File "C:\Python24\Lib\site-packages\zope\component\__init__.py", line 154, 
in getMultiAdapter
 raise ComponentLookupError(objects, interface, name)
 ComponentLookupError: ((, http://127.0.0.1>), , u'')
 
 This problem occurs with my objects (which are sqlos objects) but also when I 
try the examples of the form.txt. I must be doing something wrong, but I can't 
figure it out, especially since I follow the examples.
 Any hint ?
 
 Thanks,
 
 Stéphane


___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Newbie

2006-03-29 Thread Stéphane Brault
Thank you very much,

Stéphane

--- Jonathan <[EMAIL PROTECTED]> a écrit :

> > Hi all,
> > I want to use zope 3 for an application which uses
> a
> > MySQL database. It seems that sqlos will be a good
> > thing to use. The problem I have is that I can't
> > access the svn repository to download the latest
> > version since I don't have the reqired login and
> > password. I have the same problem with zope 3 svn.
> > I'm also wondering if anyone has used AJAX, if so
> > which way would you advise me to go ? Is there a
> > simple way to send httprequests to zope, is there
> a
> > recommended AJAX package (JSON, sarissa, ...).
> 
> This may give you some ideas...
> 
> http://www.zope.org/Members/ree/jsonserver2
> 
> 
> Jonathan
> 







___ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Newbie

2006-03-29 Thread Stéphane Brault
Thanks a lot,

Stéphane

--- baiju m <[EMAIL PROTECTED]> a écrit :

> On 3/29/06, Stéphane Brault
> <[EMAIL PROTECTED]> wrote:
> > Hi all,
> > I want to use zope 3 for an application which uses
> a
> > MySQL database. It seems that sqlos will be a good
> > thing to use. The problem I have is that I can't
> > access the svn repository to download the latest
> > version since I don't have the reqired login and
> > password. I have the same problem with zope 3 svn.
> 
> You can check out sqlos anonymously:
>   svn co https://codespeak.net/svn/z3/sqlos/trunk
> 
> Use Zope 3.2 latest released version, but you
> can check out svn anymously.
> 
> > I'm also wondering if anyone has used AJAX, if so
> > which way would you advise me to go ? Is there a
> > simple way to send httprequests to zope, is there
> a
> > recommended AJAX package (JSON, sarissa, ...).
> 
> Hope someone will answer this.
> 
> Regards,
> Baiju M
> ___
> Zope3-users mailing list
> Zope3-users@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
> 







___ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Newbie

2006-03-29 Thread Stéphane Brault
Hi all,
I want to use zope 3 for an application which uses a
MySQL database. It seems that sqlos will be a good
thing to use. The problem I have is that I can't
access the svn repository to download the latest
version since I don't have the reqired login and
password. I have the same problem with zope 3 svn.
I'm also wondering if anyone has used AJAX, if so
which way would you advise me to go ? Is there a
simple way to send httprequests to zope, is there a
recommended AJAX package (JSON, sarissa, ...).

Thanks,

Stéphane






___ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users