[Zope] Cache flipping?

2005-04-09 Thread Guillaume Tamboise
Chris Withers wrote:
> Darian V Schramm wrote:
> > I'm getting many of these in my event.log
> > 
> > 2005-03-15T10:17:56 INFO(0) ZEC:1-None-1 flipping cache files.  new 
> > current = 1
> 
> This is nothing to worry abotu from a crashing point of view. Worry 
> abotu it when you want to improve performance once you have a happilly 
> running server.

Let's say that I have a happily running server, that I get quite a lot of 
"flipping cache files" with a cache-size at 6000 in my Zope instances, and 
that I want to improve performances.
What should I do?


Guillaume Tamboise
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Dynamic hyperlink with parameter

2005-04-09 Thread David H
srikanth wrote:
Hi,
 I am trying to execute something like:
  

   
href="eachrecordresult.html?fname='recordset/fname'"> First Name

Last Name 
   

  Everything works fine but the hyperlink. What I want it to look in
the hyperlink is something like:
eachrecordresult.html?fname='chris' 
where eachrecord is separe ZPT which retrieves each persons
record and displays it.

   But how it interprets it is (each looks the same):
  eachrecordresult.html?fname='recordset/fname'
 How can I solve this problem.
Thanks in advance.
Srikanth.
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

 

Srikanth,
This is a better example, I tested it on my system against my Vendors 
file. 


  
  
  
 
  
  
  
 

Anyway, it should be close to what your looking for I hope cause Im done 
now.

David
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Dynamic hyperlink with parameter

2005-04-09 Thread David H
srikanth wrote:
Hi,
 I am trying to execute something like:
  

   
href="eachrecordresult.html?fname='recordset/fname'"> First Name

Last Name 
   

  Everything works fine but the hyperlink. What I want it to look in
the hyperlink is something like:
eachrecordresult.html?fname='chris' 
where eachrecord is separe ZPT which retrieves each persons
record and displays it.

   But how it interprets it is (each looks the same):
  eachrecordresult.html?fname='recordset/fname'
 How can I solve this problem.
Thanks in advance.
Srikanth.
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

 

Srikanth, just replace the range with your recordset, etc.  I think this 
should work.


  
  Link Stub
  
  

David
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Windows compile Zope 2.8?

2005-04-09 Thread Andrew Langmead
On Apr 9, 2005, at 4:04 PM, David H wrote:
 Cannot open source file:
  
'Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ 
ISO_8859_1_Splitter.c':
    No such file or directory
 error: command '"C:\Program Files\Microsoft Visual  
Studio\VC98\BIN\cl.exe"' failed with exit status 2

 When I inspect  
'Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src I  
find only one file and its:
 ISO_8859_64 (no extension).

 I've been reviewing distUtils but just started so I'm unlcear about  
this stuff still.
 Any ideas?
This looks similar to an error I've seen on Unix when Zope is unpacked  
with a version of tar that only supports Unix v7 tar format and not the  
later POSIX extensions.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Dynamic hyperlink with parameter

2005-04-09 Thread srikanth
Hi,

  I am trying to execute something like:
   
 
 First Name

 Last Name 



   Everything works fine but the hyperlink. What I want it to look in
the hyperlink is something like:
 eachrecordresult.html?fname='chris' 
 where eachrecord is separe ZPT which retrieves each persons
record and displays it.


But how it interprets it is (each looks the same):
   eachrecordresult.html?fname='recordset/fname'


  How can I solve this problem.

Thanks in advance.
Srikanth.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Windows compile Zope 2.8?

2005-04-09 Thread Tim Peters
[David H, missing ISO_8859_1_Splitter.c on Windows]

[Tim, sez worked for him using WinZip 9.0 SR-1 to unpack the tarball]

[David H]
> Wow thats great.  I'll do it all over again.  Thanks for the tip (i just
> reviewed my download using Ultimate Zip (which has been reliable in the
> past) and the key files are missing.  Odd.

I don't have experience with Ultimate Zip, but I do with other archive
programs.  ISO_8859_1_Splitter.c can be "a problem" because its full
path exceeds 100 characters, and that's longer than POSIX tar allows. 
Various archive programs kludge around that in various ways.  In
Linux-land, GNU tar has its own way of doing it, and I suppose (but
don't know that) GNU tar was used to build the Zope tarball.  Not all
archive programs understand GNU tar's hacks (or vice versa).

If you can't get around it, you can download ISO_8859_1_Splitter.c
directly by pointing your browser at svn.zope.org, then navigating to
it under Zope/trunk/lib/python/ (etc).
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Windows compile Zope 2.8?

2005-04-09 Thread David H




Tim Peters wrote:

  [David H]
  
  
Thanks for responding.  I tried the suggestion:
 C:\Zope-2.8.0a2> python.exe setup.py build_ext --inplace
 and the thing runs for a while (good sign, as visual c 6.0 is compiling
things) then I get this:

building 'Products.PluginIndexes.TextIndex.Splitter.ISO_8859_1_Splitter.ISO_8859_1_Splitter' extension
creating build\temp.win32-2.3\Release\Products\PluginIndexes\TextIndex\Splitter\ISO_8859_1_Splitter
creating build\temp.win32-2.3\Release\Products\PluginIndexes\TextIndex\Splitter\ISO_8859_1_Splitter\src
C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG -IC:\python23\include -IC:\python23\PC /TcProducts/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.c /Fobuild\temp.win32-2.3\Release\Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.obj  ISO_8859_1_Splitter.c
fatal error C1083: 
Cannot open source file: 
'Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.c':
   No such file or directory
error: command '"C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe"'
failed with exit status 2

When I inspect
'Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src
I find only one file and its:
ISO_8859_64 (no extension).

  
  
>From where did you obtain the Zope source code?  The file it's looking
for should be there.

For the heck of it, on WinXP I just downloaded Zope-2.8.0-a2.tgz from

http://www.zope.org/Products/Zope/2.8.0a2

then unpacked it using WinZip 9.0 SR-1.  No problems:  build_ext -i
worked fine, and:

C:\Zope-2.8.0-a2\lib\python\Products\PluginIndexes\TextIndex\Splitter\ISO_8859_1_Splitter\src>dir
 Volume in drive C has no label.
 Volume Serial Number is 5C0F-48E6

 Directory of C:\Zope-2.8.0-a2\lib\python\Products\PluginIndexes\TextIndex\Splitter\ISO_8859_1_Splitter\src

04/09/2005  06:49 PM  .
04/09/2005  06:49 PM  ..
04/02/2005  04:26 AM15,437 ISO_8859_1_Splitter.c
   1 File(s) 15,437 bytes
...

  

Tim,
Wow thats great.  I'll do it all over again.  Thanks for the tip (i
just reviewed my download using Ultimate Zip (which has been reliable
in the past) and the key files are missing.  Odd.
David



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: DateTime(), locale, summertime etc.

2005-04-09 Thread Paul Winkler
On Thu, Apr 07, 2005 at 11:22:39AM -0400, Paul Winkler wrote:
> Maybe this is relevant:
> http://www.zope.org/Collectors/CMF/325
> 
> ... crap, I never merged the fix. 

OK, now this is merged to the trunk and CMF-1_5-branch.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Windows compile Zope 2.8?

2005-04-09 Thread Tim Peters
[David H]
> Thanks for responding.  I tried the suggestion:
>  C:\Zope-2.8.0a2> python.exe setup.py build_ext --inplace
>  and the thing runs for a while (good sign, as visual c 6.0 is compiling
> things) then I get this:
> 
> building 
> 'Products.PluginIndexes.TextIndex.Splitter.ISO_8859_1_Splitter.ISO_8859_1_Splitter'
>  extension
> creating 
> build\temp.win32-2.3\Release\Products\PluginIndexes\TextIndex\Splitter\ISO_8859_1_Splitter
> creating 
> build\temp.win32-2.3\Release\Products\PluginIndexes\TextIndex\Splitter\ISO_8859_1_Splitter\src
> C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Ox /MD 
> /W3 /GX /DNDEBUG -IC:\python23\include -IC:\python23\PC 
> /TcProducts/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.c
>  
> /Fobuild\temp.win32-2.3\Release\Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.obj
>   ISO_8859_1_Splitter.c
> fatal error C1083: 
> Cannot open source file: 
> 'Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.c':
>No such file or directory
> error: command '"C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe"'
> failed with exit status 2
>
> When I inspect
> 'Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src
> I find only one file and its:
> ISO_8859_64 (no extension).

>From where did you obtain the Zope source code?  The file it's looking
for should be there.

For the heck of it, on WinXP I just downloaded Zope-2.8.0-a2.tgz from

http://www.zope.org/Products/Zope/2.8.0a2

then unpacked it using WinZip 9.0 SR-1.  No problems:  build_ext -i
worked fine, and:

C:\Zope-2.8.0-a2\lib\python\Products\PluginIndexes\TextIndex\Splitter\ISO_8859_1_Splitter\src>dir
 Volume in drive C has no label.
 Volume Serial Number is 5C0F-48E6

 Directory of 
C:\Zope-2.8.0-a2\lib\python\Products\PluginIndexes\TextIndex\Splitter\ISO_8859_1_Splitter\src

04/09/2005  06:49 PM  .
04/09/2005  06:49 PM  ..
04/02/2005  04:26 AM15,437 ISO_8859_1_Splitter.c
   1 File(s) 15,437 bytes
...
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Windows compile Zope 2.8?

2005-04-09 Thread David H




Tres Seaver wrote:

  -BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David H wrote:
  
  
Hi List,

I notice that the latest Zope does not have a Windows binary release yet
(zope 2.80 alpha 2).

I found an old Visual C 6.0 (still in the box!) and wonder if there are
instructions somewhere that I can follow to create my own binary on
Windows XP?

  
  
Assuming that VC6 is the compiler used to build Python (should be true
for Python < 2.4):

  C:\Zope-2.8.0a2> python.exe setup.py build_ext --inplace

Tres.
- --
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  "Zope Dealers"   http://www.zope.com
  

Tres,
Thanks for responding.  I tried the suggestion:
  C:\Zope-2.8.0a2> python.exe setup.py build_ext --inplace
 and the thing runs for a while (good sign, as visual c 6.0 is
compiling things) then I get this:

building
'Products.PluginIndexes.TextIndex.Splitter.ISO_8859_1_Splitter.ISO_8859_1_Splitter'
extension
creating
build\temp.win32-2.3\Release\Products\PluginIndexes\TextIndex\Splitter\ISO_8859_1_Splitter
creating
build\temp.win32-2.3\Release\Products\PluginIndexes\TextIndex\Splitter\ISO_8859_1_Splitter\src
C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Ox
/MD /W3
/GX /DNDEBUG -IC:\python23\include -IC:\python23\PC
/TcProducts/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.c
/Fobuild\temp.win
32-2.3\Release\Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src
/ISO_8859_1_Splitter.obj
ISO_8859_1_Splitter.c
fatal error C1083: 
Cannot open source file: 
'Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.c':

   No such file or directory
error: command '"C:\Program Files\Microsoft Visual
Studio\VC98\BIN\cl.exe"' failed with exit status 2

When I inspect
'Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src I
find only one file and its:
ISO_8859_64 (no extension).

I've been reviewing distUtils but just started so I'm unlcear about
this stuff still.
Any ideas?

David




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] manage_changeWorkflow question - solved

2005-04-09 Thread David Pratt
Solved this after trying more things. Here is what I used:

# Modify workflow chain (Workflow by type)

workflow_tool.manage_changeWorkflows(default_chain='default_workflow',

props=({'chain_Image':'image_workflow','chain_Folder':'', 'chain_Topic':''}),

REQUEST=None)

Regards,
David


On Saturday, April 9, 2005, at 02:41 PM, David Pratt wrote:

I am getting closer:

# Modify workflow chain (Workflow by type)

workflow_tool.manage_changeWorkflows(default_chain='default_workflow',

props=({'name':'chain_Image','value':'image_workflow'}),

REQUEST=None)

No errors now, but it sets all to Default instead of just the Image  It seems  I am not passing the correct properties.  I am getting name and value from the html source of the form.  Anyone know what these need to be?

David


On Saturday, April 9, 2005, at 12:41 PM, David Pratt wrote:

Hi, I have been working through programatically adding and modifying my workflows.  I managed to get my workflow factories installed and then used the manage_addWorkflow to obtain the desired workflow with the appropriate id.  Where I am having trouble is changing my default workflow to my new workflow.  In the ZMI this would be through the Workflow by Type (the first screen you come into when choosing the portal_workflow tool) once you had built one. For images, if I look at the source for images is 'chain_image' which is set to (Default). I am thinking it is the props should perhaps be a different type but I can't find anything googling that suggest that it is anything but a string.  Should it a tuple?

The method is manage_changeWorkflows(self, default_chain, props=None, Request=None)

This is what I am doing to try and use it:

workflow_tool = getToolByName(self, 'portal_workflow')	

# Modify workflow chain (Workflow by type)
workflow_tool.manage_changeWorkflows(default_chain='chain_image',
props='image_workflow',
REQUEST=None)

Here is the traceback:

File "/usr/local/zope/instance1/Products/CMFCore/WorkflowTool.py", line 175, in manage_changeWorkflows
chain = props.get(field_name, '(Default)').strip()

AttributeError: 'str' object has no attribute 'get'

It is probably something simple, hope someone can help me with where I am going wrong.  Many thanks.

Regards,
David
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] manage_changeWorkflow question

2005-04-09 Thread David Pratt
I am getting closer:
# Modify workflow chain (Workflow by type)

workflow_tool.manage_changeWorkflows(default_chain='default_workflow',

props=({'name':'chain_Image','value':'image_workflow'}),

REQUEST=None)

No errors now, but it sets all to Default instead of just the Image 
 It seems  I am not passing the correct properties.  I am getting name 
and value from the html source of the form.  Anyone know what these 
need to be?

David
On Saturday, April 9, 2005, at 12:41 PM, David Pratt wrote:
Hi, I have been working through programatically adding and modifying 
my workflows.  I managed to get my workflow factories installed and 
then used the manage_addWorkflow to obtain the desired workflow with 
the appropriate id.  Where I am having trouble is changing my default 
workflow to my new workflow.  In the ZMI this would be through the 
Workflow by Type (the first screen you come into when choosing the 
portal_workflow tool) once you had built one. For images, if I look at 
the source for images is 'chain_image' which is set to (Default). I am 
thinking it is the props should perhaps be a different type but I 
can't find anything googling that suggest that it is anything but a 
string.  Should it a tuple?

The method is manage_changeWorkflows(self, default_chain, props=None, 
Request=None)

This is what I am doing to try and use it:
workflow_tool = getToolByName(self, 'portal_workflow')  
# Modify workflow chain (Workflow by type)
workflow_tool.manage_changeWorkflows(default_chain='chain_image',

props='image_workflow',

REQUEST=None)
Here is the traceback:
File "/usr/local/zope/instance1/Products/CMFCore/WorkflowTool.py", 
line 175, in manage_changeWorkflows
chain = props.get(field_name, '(Default)').strip()

AttributeError: 'str' object has no attribute 'get'
It is probably something simple, hope someone can help me with where I 
am going wrong.  Many thanks.

Regards,
David
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] newbie, setting member properties in python

2005-04-09 Thread Andreas Jung

--On Samstag, 9. April 2005 12:50 Uhr -0400 Dan E <[EMAIL PROTECTED]> 
wrote:


I am trying to create a simple script that loops through the member
properties and sets certain boolean ones to a certain value (which I
have acquired). I realize I am probably making a simple mistake but
the following snippet of code doesn't seem to set the member I am
interested in. Any help would be appreciated.
p_index =-1
for p in memberProperties:
p_index = p_index+1
curr_value = cb_array[p_index]
if p[0] == i  #(checking for properties beginning with an i but
could be any check)
member.setProperties(p=curr_value);
Your code looks strange and incomplete. Where is 'memberProperties'?
What is 'cb_array'? Where does it come from? The check p[0] against 'i'
What is 'i'? Is it a variable? Trying to compare against the character 'i'?
Please try to post questions with somewhat complete and understandable code.
-aj

pgpQuVUcqjR45.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] newbie, setting member properties in python

2005-04-09 Thread Dan E
I am trying to create a simple script that loops through the member
properties and sets certain boolean ones to a certain value (which I
have acquired). I realize I am probably making a simple mistake but
the following snippet of code doesn't seem to set the member I am
interested in. Any help would be appreciated.

p_index =-1
for p in memberProperties:
p_index = p_index+1
curr_value = cb_array[p_index] 
if p[0] == i  #(checking for properties beginning with an i but
could be any check)
member.setProperties(p=curr_value);


thanks in advance for any help,
Dan
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ExtFile Extention Mappings

2005-04-09 Thread Stefan H. Holek
Why?
Because one of the main tricks of ExtFile is the ability to have files 
and images served statically by Apache, right out of the repository. 
Apache determines the mime type to serve from the file extension, ergo 
ExtFile has to make sure there is one.

How?
from mimetypes import guess_extension
ext = guess_extension(self.content_type)
If this yields the wrong result perhaps your system's mimetypes table 
is messed up? I must admit my use case is images for the most part, and 
they work just fine.

If this does not do what you want poke around a bit in Config.py. You 
can change almost every aspect of ExtFile's repository handling.

hth,
Stefan
On 8. Apr 2005, at 19:17, Edward Pollard wrote:
 I've done some poking at the source code but don't see why ExtFile is 
doing this or what logic it uses.
--
Software Engineering is Programming when you can't. --E. W. Dykstra
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] manage_changeWorkflow question

2005-04-09 Thread David Pratt
Hi, I have been working through programatically adding and modifying my 
workflows.  I managed to get my workflow factories installed and then 
used the manage_addWorkflow to obtain the desired workflow with the 
appropriate id.  Where I am having trouble is changing my default 
workflow to my new workflow.  In the ZMI this would be through the 
Workflow by Type (the first screen you come into when choosing the 
portal_workflow tool) once you had built one. For images, if I look at 
the source for images is 'chain_image' which is set to (Default). I am 
thinking it is the props should perhaps be a different type but I can't 
find anything googling that suggest that it is anything but a string.  
Should it a tuple?

The method is manage_changeWorkflows(self, default_chain, props=None, 
Request=None)

This is what I am doing to try and use it:
workflow_tool = getToolByName(self, 'portal_workflow')  
# Modify workflow chain (Workflow by type)
workflow_tool.manage_changeWorkflows(default_chain='chain_image',

props='image_workflow',

REQUEST=None)
Here is the traceback:
File "/usr/local/zope/instance1/Products/CMFCore/WorkflowTool.py", line 
175, in manage_changeWorkflows
chain = props.get(field_name, '(Default)').strip()

AttributeError: 'str' object has no attribute 'get'
It is probably something simple, hope someone can help me with where I 
am going wrong.  Many thanks.

Regards,
David
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: ZPT and attributes

2005-04-09 Thread Duncan Booth
Antonio Beamud Montero wrote:

> How I can create attribute names dynamically?
> For example, I want something like this:
>http://boo"; ref2="http://foo"; ...>
> 
> Where ref1 and ref2, are created by the url list.
> I have done in DTML because I cannot with ZPT.
> 

The easiest way is probably to create the tag in something else (e.g. a 
Python script) and then just insert it into your output at the relevant 
point:



A better solution would be to avoid doing this in the first place.

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )