Re: [Zope] Help installing Zope2 in AWS

2017-05-31 Thread Andreas Jung


On 9 Nov 2016, at 19:38, Norma Silva wrote:

> Hello,
>
> Has someone installed Zope2 on Amazon Web Services (AWS)?
>
> Thanks in advance!

What is the exact question/problem.

Has anyone….likely…

-aj

signature.asc
Description: OpenPGP digital signature
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] help

2013-01-15 Thread Jens Vagelpohl

On Jan 15, 2013, at 14:01 , Daniel Godefroy danielgodef...@videotron.ca wrote:

 Please remove me from the list

Just follow the link that you see at the bottom of every single email from the 
list.

Thanks!

jens



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


Re: [Zope] Help in deciding approach to Web App

2011-12-06 Thread Lennart Regebro
On Sun, Dec 4, 2011 at 06:12, Sareesh Sudhakaran ays...@hotmail.com wrote:
 I have a personal project - a web application I wanted to develop - but I'm
 confused on which route to take. I am not under any time constraint.

Your case is complex and the answer is non-obvious. I think you will
have to try to see.

 The best I can describe it is as a kind of expert system (but not AI) that
 needs to find the best workflow for a process, given a set of initial and
 final parameters. E.g. a 'capsule' of data must pass through many 'tools' or
 'environments' to reach a desired output - something like a very complicated
 car wash.

 Let's say there are many tools that can be used at various stages in the
 process. I have estimated there are at least 500 tools as of now, and it is
 bound to grow in the future as newer tools are introduced. Existing tools
 will also have version updates.

 Each tool, on average, has at least 100 properties that define the tool.

This kind of complexity and flexibility that your case has does lend
itself well to the ZODB. But it is by no means impossible to do in a
relational database. What you would need to do here if you did this in
SQL is to have one table for the tools, and one table for the
properties, and one table that for each tool and property has a value.
This might be a bit complex to use of you use an ORM, but it should be doable.

 problem of 'matching' the tools for analysis. E.g. Tool A might have only
 three fixed rpms - 100, 200 and 500, but Tool B might have rpms from 20 to
 2000. I'm not sure how I can construct a database without spelling out each
 number, as in the example above.

Well, if you want to search for a specific RPM range it does get
complicated, because then you probably want to store the RPM values as
integers. And that means that you in the property table needs to have
several columns depending on the value type. If the property needs
text, you need to fetch it from the text column. If the property is an
integer you need to fetch it from the integer column. If the property
is a reference to another table, because it is a multi-select property
with a limited set, you need to fetch it from a column for that, which
in turn refers to another table with the actual values.

This *does* get very complex very quickly. Of course, the ZODB has few
such problems.

 Will the app be better served with a relational DB like mySQL or an Object
 database? After a lot of research I've guessed that my particular case might
 be better served with Python and Zope/ZODB. But I might be wrong? Maybe
 PHP+mySQL or Django is a better fit?

First of all, find yourself a web-framework you like. Then use that.
Most likely, that framework is going to limit you to using SQL. There
are frameworks that don't specifically Pyramid integrates nicely with
ZODB and hence gives you a choice. Then I would simply try to see if
you are able to model the data in SQL at all, or if you dig yourself
into unholy complexity. That should not take more than a couple of
days of work to figure that out, if you concentrate on building a
database and filling it with real or realistic data. If you don't dig
yourself into a hole, the go with SQL, since that's what you know. If
you do, try to build the model with ZODB and see of that works better
for you.

The ZODB might very well be the right choice here. But note that Zope
is not. Zope was a trailblazer in the web framework world that's been
around for 15 years now, and has as a result made some choices which
turned out to not be the best ones in the long run, and accumulated a
lot of cruft. There is work on fixing this, but that will take time,
and the framework will be in a great flux during that time. As a
result, Zope is not currently a good choice if you start a project. As
languages go, Python rules. As web frameworks go, there are more
Python frameworks than you can shake a stick at. I'd recommend either
Django (because there are so many people using it, you will be able to
find help ) or Pyramid (because it's really cool and supports ZODB
well).

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


Re: [Zope] Help in deciding approach to Web App

2011-12-06 Thread Sareesh Sudhakaran

Thank you all for your replies. I have an idea on how to begin: I'll go with 
mySQL and see how it works out. I will use both PHP and Python for the 
prototype. 
My issue no longer fits within the scope of this mailing list. Without your 
support it would have been impossible for me to get started. Thanks!sareesh
  ___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Help in deciding approach to Web App

2011-12-05 Thread John Schinnerer

On 12/04/2011 09:56 PM, Fernando Martins wrote:

On 12/04/2011 09:31 PM, John Schinnerer wrote:

In any case, this looks (to me anyhow) like a very object-oriented
system you are modeling so an object oriented approach and language
would seem most suitable.


And how would you create (and update) objects in Python for:

at least 500 tools as of now, and it is bound to grow in the future as
newer tools are introduced. Existing tools will also have version updates.

Each tool, on average, has at least 100 properties that define the tool.
Some of them have as high as 1000 unique properties.


How familiar are you with OOP?

What I mean is, when I read your high-level description of what you want 
to do, I imagine objects interacting with other. In your car wash 
example I see that, for instance. Or any kind of work-flow, which is 
what this sounds like to me. A state machine.


Each tool is an object; it knows what its properties and abilities and 
possible states are and can communicate them to other objects and can 
accept and act on communication from other objects. In that way the 
objects interact with one another to do whatever it is you build them to 
do.


I'm thinking of your car wash metaphor. In a car wash there are a 
variety of elements (objects) that communicate with one another to move 
the car through and to wash it as it moves through. Simple example:


* mechanism that pulls or pushes the car through
* mechanism that sprays it with water and soap
* mechanism that scrubs and wipes and rubs it
* mechanism that sprays it with rinse water
* drying mechanism(s)

These all need to signal one another so they do the right thing at the 
right time. Spray (or scrub or blow hot air) only when the car is in the 
right place for each.


If some tools can be built by adding to/extending other tools, that is 
an object-friendly situation, since enhancing an existing tool to make 
another that you need saves you having to create all tools from scratch.


In the car wash, maybe the different sized scrubbers used are all made 
by bolting together two or more of the smallest size scrubber. Maybe in 
parallel, maybe in series, depends on what is needed.
Maybe the same scrubber controller can have different size brushes 
attached to it.


In short, an object - tool - is code and data that interacts with other 
tools (other entities of code and data).


An upgrade to a tool would involve changing the code and/or data that 
constitutes the tool. If that introduces some new way of interacting 
that other tools need to also know, then you add that to those tools also.


Adding more tools means coding them. If they can be based on existing 
tools, so much the easier (and more object-appropriate).


So that's some high-level information about an object-oriented approach 
to what I think your project is about.


Tthe flexibility you appear to need as the system grows may be 
problematic for an RDB. And, my bias is OO, so perhaps someone who 
thinks in RDB-space can describe at high level how this would look in an 
RDB implmentation.


cheers,
John S.





--
John Schinnerer - M.A., Whole Systems Design

- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
j...@eco-living.net
http://eco-living.net
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Help in deciding approach to Web App

2011-12-05 Thread Niels Dettenbach
Am Sonntag, 4. Dezember 2011, 16:15:13 schrieben Sie:
 As you mentioned, if I have to use mySQL, isn't it better for me to go with
 PHP+mySQL - easier to learn and deploy?

...just from my experience:

PHP is - for different, but mainly technical/historical reasons - very widely 
spread within web applications, one major reason was/is i.e. the large 
(because easy) availability on low cost hosting environments in the past - 
but the most advantages was/are on the side of the hosting providers

PHP might be easier to learn then other languages or frameworks, but 
maintaining large / complex applications / software projects within PHP could 
be a real mess.

We develop nearly any web application with Zope / ZODB since = 10 years but 
are a hosting company byself - so we was not bound to PHP as many other 
internet hosting users in the past. A colleagues company produces very high 
level expert systems on Perl and Catalyst - requiring high skilled Perl 
programmers.

From my experience developing within Zope / ZODB (with Python, DTML and/or 
ZPT) allows very high quality products within very short timeframes and even 
further maintaining the project is relative ressource efficient - especially 
compared to PHP.

Most web application data structures (i.e. a simple web page) fit's much 
better by a oo object strategy then a relational (RDBMS) one. 

The major typical ressource hole within typical PHP+SQL web applications or 
i.e. a CMS solution is the translation of typical data objects into tables and 
vice versa. Producing i.e. one simple CMS page within a PHP-SQL CMS easily 
could trigger hundreds of SQL requests into many different tables - a 
significant overhead which has to implemented by developers and handled by the 
machines.

But this is my view onto the issue - just my two cents...



cheers,


Niels.

-- 
---
Niels Dettenbach
Syndicat ITInternet
http://www.syndicat.com/

signature.asc
Description: This is a digitally signed message part.
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Help in deciding approach to Web App

2011-12-05 Thread Fernando
On Dec 5, 2011 09:48 John Schinnerer j...@eco-living.net wrote:

 On 12/04/2011 09:56 PM, Fernando Martins wrote:
  On 12/04/2011 09:31 PM, John Schinnerer wrote:
   In any case, this looks (to me anyhow) like a very object-oriented
   system you are modeling so an object oriented approach and
   language
   would seem most suitable.
  
  And how would you create (and update) objects in Python for:
  
  at least 500 tools as of now, and it is bound to grow in the future
  as
  newer tools are introduced. Existing tools will also have version
  updates.
  
  Each tool, on average, has at least 100 properties that define the
  tool.
  Some of them have as high as 1000 unique properties.
 
 How familiar are you with OOP?
 
 
I think you are confusing me with the OP. And you did not answer my
question. Are you recommending that a programmer codes all these objects
by hand in Python?

The know-how of what constitutes a tool, their properties and even the
tool selection criteria is not developer know-how. Therefore, this
information should be defined outside the program in way that the tool
expert(s) can manage it. Which leads us to some storage solution, an RDB
being the most common.

Since, as I pointed out before, SQL most likely would not be able to do
the tool selection alone, Python would merely load the data from the
external source and create objects and expertise on the fly.

Anyway, I agree with you that the main issue does not seem to be the web
publishing solution, but rather how to represent the tool information
and how to do tool selection, which is off-topic.

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


Re: [Zope] Help in deciding approach to Web App

2011-12-05 Thread Sareesh Sudhakaran


Hi NielsI agree with you, even though I have no experience. 
But I'm restricted by hosting options for Zope at the moment, and will revert 
to Python once the project is deployed - and when I figure out whether mySQL is 
good enough or not. I hate having to type all those extra characters in php 
though.sareesh


 From: n...@syndicat.com
 To: ays...@hotmail.com; zope@zope.org
 Subject: Re: [Zope] Help in deciding approach to Web App
 Date: Mon, 5 Dec 2011 11:25:18 +0100
 
 Am Sonntag, 4. Dezember 2011, 16:15:13 schrieben Sie:
  As you mentioned, if I have to use mySQL, isn't it better for me to go with
  PHP+mySQL - easier to learn and deploy?
 
 ...just from my experience:
 
 PHP is - for different, but mainly technical/historical reasons - very widely 
 spread within web applications, one major reason was/is i.e. the large 
 (because easy) availability on low cost hosting environments in the past - 
 but the most advantages was/are on the side of the hosting providers
 
 PHP might be easier to learn then other languages or frameworks, but 
 maintaining large / complex applications / software projects within PHP could 
 be a real mess.
 
 We develop nearly any web application with Zope / ZODB since = 10 years but 
 are a hosting company byself - so we was not bound to PHP as many other 
 internet hosting users in the past. A colleagues company produces very high 
 level expert systems on Perl and Catalyst - requiring high skilled Perl 
 programmers.
 
 From my experience developing within Zope / ZODB (with Python, DTML and/or 
 ZPT) allows very high quality products within very short timeframes and even 
 further maintaining the project is relative ressource efficient - especially 
 compared to PHP.
 
 Most web application data structures (i.e. a simple web page) fit's much 
 better by a oo object strategy then a relational (RDBMS) one. 
 
 The major typical ressource hole within typical PHP+SQL web applications or 
 i.e. a CMS solution is the translation of typical data objects into tables 
 and 
 vice versa. Producing i.e. one simple CMS page within a PHP-SQL CMS easily 
 could trigger hundreds of SQL requests into many different tables - a 
 significant overhead which has to implemented by developers and handled by 
 the 
 machines.
 
 But this is my view onto the issue - just my two cents...
 
 
 
 cheers,
 
 
 Niels.
 
 -- 
 ---
 Niels Dettenbach
 Syndicat ITInternet
 http://www.syndicat.com/
  ___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Help in deciding approach to Web App

2011-12-05 Thread Niels Dettenbach
Am Montag, 5. Dezember 2011, 11:37:46 schrieb Sareesh Sudhakaran:
 But I'm restricted by hosting options for Zope at the moment, and will
 revert to Python once the project is deployed - and when I figure out
 whether mySQL is good enough or not. I hate having to type all those extra
 characters in php though.sareesh

If i talk about Zope / Python i mean Zope (with Zope Python Script Objects 
and/or external (Python) Methods). At a earlier stage Zope devels discussed 
for integrating ingres or another RDBMS natively into Zope - but this is not 
longer the case as there are many Zope adapters / integrations / products 
available for different major RDBMS like MySQL or Postgres.

For the data structures where you have to handle large tables MySQL would be 
the first choice while oo data structures would preferrably go into your ZODB. 
I.e. we handle large amounts of user data records within MySQL while all of 
the web content objects or even complex shopping products are handled within 
ZODB - both within the same Shopping Cart application. This all depends highly 
from you data model. By theory you are able to handle both in just on of the 
DB solutions.

With Zope you have many options to use external database solutions within your 
Zope based application.


best regards,


Niels.
-- 
---
Niels Dettenbach
Syndicat ITInternet
http://www.syndicat.com/

signature.asc
Description: This is a digitally signed message part.
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Help in deciding approach to Web App

2011-12-05 Thread Fernando
On Dec 5, 2011 10:25 Niels Dettenbach n...@syndicat.com wrote:

 From my experience developing within Zope / ZODB (with Python, DTML
 and/or ZPT) allows very high quality products within very short
 timeframes and even further maintaining the project is relative
 ressource efficient - especially compared to PHP.
 
 
How would you put 500+ objects (for the tools) each with hundreds or
thousands of attributes in in ZODB?

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


Re: [Zope] Help in deciding approach to Web App

2011-12-04 Thread Sareesh Sudhakaran


Thanks AJ. I assumed an OODBMS would be the right choice because of the object 
nature of my 'tools'. Of course, it was an assumption. Instead of 
Pyramid+RDBMS, can I use PHP+mySQL (my current hosting provider supports 
this).If ZODB isn't for my project, then would a GraphDB help? I have no idea 
on where to start with Graph DB - I've read the wikis and it's made me more 
confused.
-ss


 Date: Sun, 4 Dec 2011 08:40:28 +0100
 From: li...@zopyx.com
 To: ays...@hotmail.com
 CC: zope@zope.org
 Subject: Re: [Zope] Help in deciding approach to Web App
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 - From reading: your database model appears pretty much relational.
 Where would you take advantages from using Zope as framework?
 This sounds like a task for Pyramid + RDBMS or a graph DB.
 
 - -aj
 
 Sareesh Sudhakaran wrote:
  I have a personal project - a web application I wanted to develop - 
  but I'm confused on which route to take. I am not under any time 
  constraint.
  
  
  *About the App:*
  
  The best I can describe it is as a kind of expert system (but not AI)
  that needs to find the best workflow for a process, given a set of
  initial and final parameters. E.g. a 'capsule' of data must pass 
  through many 'tools' or 'environments' to reach a desired output - 
  something like a very complicated car wash.
  
  Let's say there are many tools that can be used at various stages in 
  the process. I have estimated there are at least 500 tools as of
  now, and it is bound to grow in the future as newer tools are
  introduced. Existing tools will also have version updates.
  
  Each tool, on average, has at least 100 properties that define the 
  tool. Some of them have as high as 1000 unique properties. Some of 
  these tools are linked to each other - e.g if one tool is selected, 
  there are only n tools that can correspond to it for the next step
  in the process. I also have the problem of 'matching' the tools for 
  analysis. E.g. Tool A might have only three fixed rpms - 100, 200
  and 500, but Tool B might have rpms from 20 to 2000. I'm not sure how
  I can construct a database without spelling out each number, as in
  the example above.
  
  The total number of tools needed for the process can be defined at 
  the beginning, however, it will change as the application becomes 
  more complex in the future. I plan to address every contingency in 
  the process. The idea is - if the user inputs the initial parameters 
  and the desired outcome (another set of parameters), the app must 
  find the 'best' path - sort of like a decision tree. The best path 
  can be the fastest, cheapest, etc. I would like the user to choose 
  what is best for him/her.
  
  Unfortunately, parameters might change, relationships might change 
  (but not regularly) - the 'rules' I will be using might be revised 
  for better accuracy in prediction.
  
  I also need to track each user's path and solutions' for future 
  reference (but no personal details except username and email address 
  for logging in). Maybe when the app is up and running, I'd like to 
  make it more democratic, with users contributing to refining the 
  logic/rules involved.
  
  If possible, I would also like the app to output a graphical 
  flowchart at the end showing the workflow with all tools grouped in 
  an easy to understand layout.
  
  
  *My questions:*
  
  1. Will the app be better served with a relational DB like mySQL or 
  an Object database? After a lot of research I've guessed that my 
  particular case might be better served with Python and Zope/ZODB.
  But I might be wrong? Maybe PHP+mySQL or Django is a better fit? 2.
  Can anyone provide general advice on how to go about beginning such
  a project in ZOPE. Which is the best place to start learning for a 
  newbie? 3. Can anyone recommend a good shared hosting provider that 
  supports Zope fully but is not expensive? 4. Is there a module or
  app that is open source that I can use to output a graphical
  flowchart based on the results, or will I be better served
  programming it from scratch with Python?
  
  I would appreciate any help in getting started. Thank you in
  advance. I have tried most online forums but have not good any
  productive answers. Most of the answers I got were pro-PHP+mySQL.
  
  
  Adam
  
  ___ Zope maillist  - 
  Zope@zope.org https://mail.zope.org/mailman/listinfo/zope **   No 
  cross posts or HTML encoding!  ** (Related lists - 
  https://mail.zope.org/mailman/listinfo/zope-announce 
  https://mail.zope.org/mailman/listinfo/zope-dev )
 
 - -- 
 ZOPYX Limited   | zopyx group
 Charlottenstr. 37/1 | The full-service network for Zope  Plone
 D-72070 Tübingen| Produce  Publish
 www.zopyx.com   | www.produce-and-publish.com
 - 
 E-Publishing, Python, Zope  Plone development, Consulting

Re: [Zope] Help in deciding approach to Web App

2011-12-04 Thread Sareesh Sudhakaran

Thanks Niels. Just to clarify:Does my particular instance fall under an OODBMS 
model or a RDBMS model (with ORM if necessary)? 
I will begin by reading the Zope Book. Thanks for your assistance. Appreciate 
it.
-ss


 Subject: Re: [Zope] Help in deciding approach to Web App
 From: n...@syndicat.com
 Date: Sun, 4 Dec 2011 09:24:10 +0100
 To: ays...@hotmail.com; zope@zope.org
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256
 
 
 
 
 
 Sareesh Sudhakaran ays...@hotmail.com schrieb:
 
 My questions:Will the app be better served with a relational DB like
 mySQL or an Object database? After a lot of research I've guessed that
 my particular case might be better served with Python and Zope/ZODB.
 But I might be wrong? Maybe PHP+mySQL or Django is a better fit?Can
 anyone provide general advice on how to go about beginning such a
 project in ZOPE.
 This hardly depends from your data structure, but with Zope you have the 
 option to use ZODB and SQL DBs like MySQL in parallel. Typical relational 
 data should go into a SQLDB while complex / oo Data structures should go into 
 ZODB.
 
 We developed several complex to very complex web based applications - incl. 
 expert systems - on Zope ZODB plus MySQL. I can't believe that someone would 
 be able to solve such issues with PHP/SQL within the same time / ressources.
 
 
  Which is the best place to start learning for a
 newbie?
 You should start by trying the short zope practice / excercise as described 
 in the Zope book.
 
 The Zope Book should be the best source for getting into Zope step by step 
 from nothing. ß)
 
 
  Can anyone recommend a good shared hosting provider that
 supports Zope fully but is not expensive?
 Looking for zope hosting or similiar in google should advice you. Our 
 company - as one of many - offers Zope hosting to.
 
 
 Is there a module or app that
 is open source that I can use to output a graphical flowchart based on
 the results, or will I be better served programming it from scratch
 with Python?
 There are different modules as i.e. Python Imaging (PIL) and higher level 
 modules.
 
 
 I would appreciate any help in getting started. Thank you
 in advance. I have tried most online forums but have not good any
 productive answers. Most of the answers I got were pro-PHP+mySQL.
 
 Yes, because the peoples did not know anything other solution usually...
 
 
 cheers,
 
 
 Niels.
 
 - --
 Niels Dettenbach
 Syndicat ITInternet
 http://www.syndicat.com
 -BEGIN PGP SIGNATURE-
 Version: APG v1.0.8
 
 iIEEAREIAEEFAk7bLio6HE5pZWxzIERldHRlbmJhY2ggKFN5bmRpY2F0IElUJklu
 dGVybmV0KSA8bmRAc3luZGljYXQuY29tPgAKCRBU3ERlZRyiDUhlAJ4/XPl3Oet6
 XN4UlkQ611FNoWqZCwCfZ1IPVjaLMD32wOlFE9cDnrm6bJQ=
 =ukyi
 -END PGP SIGNATURE-
 
  ___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Help in deciding approach to Web App

2011-12-04 Thread Fernando Martins

On 12/04/2011 09:52 AM, Sareesh Sudhakaran wrote:

Thanks Niels. Just to clarify:
Does my particular instance fall under an OODBMS model or a RDBMS 
model (with ORM if necessary)?



Data modelling is a bit of an art and probably you could tackle your 
problem with any approach. I think the important is for you to figure 
out which model suits more your personality. No kidding.


I would personally start with the RDBMS approach considering only the 
information you provide. Also, you can easily use zope in combination 
with a RDBMS. When you read the book, beware that zope has been changing 
from a through the web approach, to a typical file system based 
approach, which is a loss, but it seems to be what suits the needs of 
the zope developers.


The approach I use is:

zpt page - (one) Python Script - (some) ZSQL Methods - MySQL

The zpt defines the layout of the pages, the ZSQL Methods retrieve the 
data needed and the Python script massages the data to make it suitable 
for the ZPT page. Or the other way around, from user input in a form to 
storage in the database.


The advantage of the relational approach is that it is a very well 
understood model and although different people will still come to 
different models there are sufficient objective guidelines out there 
(e.g., the normalization rules, and then criteria for when to 
denormalise) to help you along. Furthermore, there are lots of people in 
db-related forums that can help you.


Also, RDBMS provides you with a standard query language, SQL, which 
plenty of systems and tools can use. In general, RDBMS gives you the 
safest approach to keep your data and not loose it when you need to 
migrate either the front-end or the back-end. This language is very 
powerful and can avoid you a lot of low level programming.


However, plenty of people can not deal well with SQL because it follows 
a paradigm so different from the classic imperative programming. With 
SQL, you specify the what, with the other languages you specify the 
how. The advantage of the what is that you can do a lot of data 
processing in a few lines of code. The problem with the what is that 
because you don't know the how of it, you feel you don't have control 
and you are led to say the language is obscure or unreadable.


However, even if you are not comfortable with the what (you have to 
try to know), you can still rely on an library like SQLAlchemy to keep 
you a bit in the comfort zone of the how. So instead of learning SQL, 
you need to learn the API of a specific library. Your choice. I 
recommend the first by far.


The real main issue with Relational is that it is a highly structured 
data model. It allows you to keep high quality data but if you don't get 
it right soon enough in the development cycle, some later changes can 
have a huge impact in the application, requiring rewrites. Furthermore, 
it works the best when you have many objects with the same properties. 
If you have many entities all different from each other (the tools in 
your case, maybe), then maybe a OODBMS might be better. But here, there 
is no standard language, or standard whatever. Perosnally, I would avoid 
as much as possible to put data in something like ZODB (I use it merely 
to store and manage the application).


The problem with your specific case is that it does not seem to be a 
typical case of books and authors, which might be a risk for someone 
without experience. The issue Tool A might have only three fixed rpms - 
100, 200 and 500, but Tool B might have rpms from 20 to 2000, is indeed 
tricky. I suspect in general the needs of your system will be too 
specific to be able to rely only on SQL queries. You would need to put a 
lot of intelligence in the data (really highly structured) and it might 
become unmanageable or not scalable.


I guess you will need to put a lot of intelligence in the Python Script. 
So, the ZSQL retrieves the relevant tool data and then makes the tool 
choice. The knowledge of the meaning of the attributes is maintained in 
programming.


I should say I am not totally sure the Python Script is the best 
approach here, in terms of management facilities. But Python is surely a 
very good language due to its readability. However, you might need to 
use External methods or a more typical file-system based Python approach.


Or maybe you actually need to create a Domain Specific Language to 
encode the intelligence needed for your tool selection process. If your 
python code becomes repetitive, with patterns showing up, then a DSL 
might be a good approach, but this might be too much engineering for you 
at this stage. It looks like you are in a typical CIM scenario and I 
remember handling a similar problem 20 years ago. I vaguely remember at 
that time to use custom graph structures in C and the the intelligence 
was coded in Lisp/Scheme. So, there is a big range of solutions to try 
out :)


If you have time, then the simple approach

zpt page - (one) Python 

Re: [Zope] Help in deciding approach to Web App

2011-12-04 Thread Sareesh Sudhakaran


Thanks Fernando! I really appreciate the time and effort you have put in 
answering my query. My personality sides with Python but my hosting provider 
does not support Django or Zope.
As you mentioned, if I have to use mySQL, isn't it better for me to go with 
PHP+mySQL - easier to learn and deploy? Can I just start out with a framework 
like Symphony instead?
In the future I'll have to use either Python or C/C++ for my business logic and 
math. But the focus now is to get a prototype out, and if I'm doomed to change 
everything later I might as well start with the easiest and most obvious. Is 
this a viable starting point compared to what you have suggested? Or am I 
missing something?
-Sareesh
Date: Sun, 4 Dec 2011 13:28:36 +0100
From: ferna...@cmartins.nl
To: ays...@hotmail.com
CC: n...@syndicat.com; zope@zope.org
Subject: Re: [Zope] Help in deciding approach to Web App



  



  
  
On 12/04/2011 09:52 AM, Sareesh Sudhakaran wrote:

  
  
Thanks
  Niels. Just to clarify:
Does
my particular instance fall under an OODBMS model or a RDBMS
model (with ORM if necessary)? 


  


  

Data modelling is a bit of an art and probably you could tackle your
problem with any approach. I think the important is for you to
figure out which model suits more your personality. No kidding.



I would personally start with the RDBMS approach considering only
the information you provide. Also, you can easily use zope in
combination with a RDBMS. When you read the book, beware that zope
has been changing from a through the web approach, to a typical
file system based approach, which is a loss, but it seems to be what
suits the needs of the zope developers.



The approach I use is: 



zpt page - (one) Python Script - (some) ZSQL Methods -
MySQL



The zpt defines the layout of the pages, the ZSQL Methods retrieve
the data needed and the Python script massages the data to make it
suitable for the ZPT page. Or the other way around, from user input
in a form to storage in the database.



The advantage of the relational approach is that it is a very well
understood model and although different people will still come to
different models there are sufficient objective guidelines out there
(e.g., the normalization rules, and then criteria for when to
denormalise) to help you along. Furthermore, there are lots of
people in db-related forums that can help you. 



Also, RDBMS provides you with a standard query language, SQL,
which plenty of systems and tools can use. In general, RDBMS gives
you the safest approach to keep your data and not loose it when you
need to migrate either the front-end or the back-end. This language
is very powerful and can avoid you a lot of low level programming. 



However, plenty of people can not deal well with SQL because it
follows a paradigm so different from the classic imperative
programming. With SQL, you specify the what, with the other
languages you specify the how. The advantage of the what is that
you can do a lot of data processing in a few lines of code. The
problem with the what is that because you don't know the how of
it, you feel you don't have control and you are led to say the
language is obscure or unreadable. 



However, even if you are not comfortable with the what (you have
to try to know), you can still rely on an library like SQLAlchemy to
keep you a bit in the comfort zone of the how. So instead of
learning SQL, you need to learn the API of a specific library. Your
choice. I recommend the first by far.



The real main issue with Relational is that it is a highly
structured data model. It allows you to keep high quality data but
if you don't get it right soon enough in the development cycle, some
later changes can have a huge impact in the application, requiring
rewrites. Furthermore, it works the best when you have many objects
with the same properties. If you have many entities all different
from each other (the tools in your case, maybe), then maybe a OODBMS
might be better. But here, there is no standard language, or
standard whatever. Perosnally, I would avoid as much as possible to
put data in something like ZODB (I use it merely to store and manage
the application).



The problem with your specific case is that it does not seem to be a
typical case of books and authors, which might be a risk for someone
without experience. The issue Tool A might have only three fixed
rpms - 100, 200 and 500, but Tool B might have rpms from 20 to
2000, is indeed tricky. I suspect in general the needs of your
system will be too specific to be able to rely only on SQL queries.
You would need to put a lot

Re: [Zope] Help in deciding approach to Web App

2011-12-04 Thread Fernando Martins

On 12/04/2011 05:15 PM, Sareesh Sudhakaran wrote:
As you mentioned, if I have to use mySQL, isn't it better for me to go 
with PHP+mySQL - easier to learn and deploy? Can I just start out with 
a framework like Symphony instead?


Well, if all you have is PHP + MySQL in your provider, there is no 
which is better question, is it?


You might want to look at http://phptal.org/ a library that provides a 
templating system similar to ZPT. The advantage is the better separation 
between presentation and business layers.


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


Re: [Zope] Help in deciding approach to Web App

2011-12-04 Thread John Schinnerer

Aloha,

Very briefly, from what you describe, it looks like you are dealing with 
large numbers of complex objects (your 'tools') that interact with each 
other - and with some other elements that are going through this 
workflow process? And a context for the process? ...not sure of that part...


In any case, this looks (to me anyhow) like a very object-oriented 
system you are modeling so an object oriented approach and language 
would seem most suitable. Python is one reasonable language option; zope 
for the web publishing aspect of the project would fit well with that. I 
haven't worked with other OO languages enough to usefully compare.


It also sounds to me like the web publishing is the lesser part of 
this...? That is, the workflow of interacting tools is the real 'app' 
here, a process which does not all get shown somehow on a web page...or 
does it? Or just the outcomes?


LAMP platform is so common and cheap that it's all a lot of people know 
about. It can be used well, and, it is all too easy to make horrible 
hacks and Frankestein monster apps in PHP/MySQL.


Meaning, a highly structured (yet powerful) OO programming language will 
support you in avoiding that.


Also, for development (or just to explore if python+zope might meet your 
needs) you don't need any hosting, you can install python+zope on your 
development system and try it out.


best wishes...
John S.


On 12/03/2011 07:12 PM, Sareesh Sudhakaran wrote:

I have a personal project - a web application I wanted to develop - but
I'm confused on which route to take. I am not under any time constraint.


*About the App:*

The best I can describe it is as a kind of expert system (but not AI)
that needs to find the best workflow for a process, given a set of
initial and final parameters. E.g. a 'capsule' of data must pass through
many 'tools' or 'environments' to reach a desired output - something
like a very complicated car wash.

Let's say there are many tools that can be used at various stages in the
process. I have estimated there are at least 500 tools as of now, and it
is bound to grow in the future as newer tools are introduced. Existing
tools will also have version updates.

Each tool, on average, has at least 100 properties that define the tool.
Some of them have as high as 1000 unique properties. Some of these tools
are linked to each other - e.g if one tool is selected, there are only n
tools that can correspond to it for the next step in the process. I also
have the problem of 'matching' the tools for analysis. E.g. Tool A might
have only three fixed rpms - 100, 200 and 500, but Tool B might have
rpms from 20 to 2000. I'm not sure how I can construct a database
without spelling out each number, as in the example above.

The total number of tools needed for the process can be defined at the
beginning, however, it will change as the application becomes more
complex in the future. I plan to address every contingency in the
process. The idea is - if the user inputs the initial parameters and the
desired outcome (another set of parameters), the app must find the
'best' path - sort of like a decision tree. The best path can be the
fastest, cheapest, etc. I would like the user to choose what is best for
him/her.

Unfortunately, parameters might change, relationships might change (but
not regularly) - the 'rules' I will be using might be revised for better
accuracy in prediction.

I also need to track each user's path and solutions' for future
reference (but no personal details except username and email address for
logging in). Maybe when the app is up and running, I'd like to make it
more democratic, with users contributing to refining the logic/rules
involved.

If possible, I would also like the app to output a graphical flowchart
at the end showing the workflow with all tools grouped in an easy to
understand layout.


*My questions:*

 1. Will the app be better served with a relational DB like mySQL or an
Object database? After a lot of research I've guessed that my
particular case might be better served with Python and Zope/ZODB.
But I might be wrong? Maybe PHP+mySQL or Django is a better fit?
 2. Can anyone provide general advice on how to go about beginning such
a project in ZOPE. Which is the best place to start learning for a
newbie?
 3. Can anyone recommend a good shared hosting provider that supports
Zope fully but is not expensive?
 4. Is there a module or app that is open source that I can use to
output a graphical flowchart based on the results, or will I be
better served programming it from scratch with Python?

I would appreciate any help in getting started. Thank you in advance. I
have tried most online forums but have not good any productive answers.
Most of the answers I got were pro-PHP+mySQL.


Adam



___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related 

Re: [Zope] Help in deciding approach to Web App

2011-12-04 Thread Sareesh Sudhakaran

Thanks Fernando. I would choose ZOPE or Django and a new provider at the drop 
of a hat - if someone can confirm if that's the way to go. However, since, 
there are too many grey areas, it might be better if I stuck to what I have and 
see how things turn out. Once again, thanks for your support. Appreciate it!
- Sareesh


Date: Sun, 4 Dec 2011 18:19:25 +0100
From: ferna...@cmartins.nl
To: ays...@hotmail.com
CC: n...@syndicat.com; zope@zope.org
Subject: Re: [Zope] Help in deciding approach to Web App



  



  
  
On 12/04/2011 05:15 PM, Sareesh Sudhakaran wrote:

  
  
As you mentioned, if I have to use mySQL, isn't it better for me
to go with PHP+mySQL - easier to learn and deploy? Can I just
start out with a framework like Symphony instead?

  



Well, if all you have is PHP + MySQL in your provider, there is no
which is better question, is it?



You might want to look at http://phptal.org/ a library that provides
a templating system similar to ZPT. The advantage is the better
separation between presentation and business layers.



Regards,

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


Re: [Zope] Help in deciding approach to Web App

2011-12-04 Thread Fernando Martins

On 12/04/2011 09:31 PM, John Schinnerer wrote:
In any case, this looks (to me anyhow) like a very object-oriented 
system you are modeling so an object oriented approach and language 
would seem most suitable.


And how would you create (and update) objects in Python for:

at least 500 tools as of now, and it is bound to grow in the future as 
newer tools are introduced. Existing tools will also have version updates.


Each tool, on average, has at least 100 properties that define the tool.
Some of them have as high as 1000 unique properties.

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


Re: [Zope] Help in deciding approach to Web App

2011-12-03 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

- From reading: your database model appears pretty much relational.
Where would you take advantages from using Zope as framework?
This sounds like a task for Pyramid + RDBMS or a graph DB.

- -aj

Sareesh Sudhakaran wrote:
 I have a personal project - a web application I wanted to develop - 
 but I'm confused on which route to take. I am not under any time 
 constraint.
 
 
 *About the App:*
 
 The best I can describe it is as a kind of expert system (but not AI)
 that needs to find the best workflow for a process, given a set of
 initial and final parameters. E.g. a 'capsule' of data must pass 
 through many 'tools' or 'environments' to reach a desired output - 
 something like a very complicated car wash.
 
 Let's say there are many tools that can be used at various stages in 
 the process. I have estimated there are at least 500 tools as of
 now, and it is bound to grow in the future as newer tools are
 introduced. Existing tools will also have version updates.
 
 Each tool, on average, has at least 100 properties that define the 
 tool. Some of them have as high as 1000 unique properties. Some of 
 these tools are linked to each other - e.g if one tool is selected, 
 there are only n tools that can correspond to it for the next step
 in the process. I also have the problem of 'matching' the tools for 
 analysis. E.g. Tool A might have only three fixed rpms - 100, 200
 and 500, but Tool B might have rpms from 20 to 2000. I'm not sure how
 I can construct a database without spelling out each number, as in
 the example above.
 
 The total number of tools needed for the process can be defined at 
 the beginning, however, it will change as the application becomes 
 more complex in the future. I plan to address every contingency in 
 the process. The idea is - if the user inputs the initial parameters 
 and the desired outcome (another set of parameters), the app must 
 find the 'best' path - sort of like a decision tree. The best path 
 can be the fastest, cheapest, etc. I would like the user to choose 
 what is best for him/her.
 
 Unfortunately, parameters might change, relationships might change 
 (but not regularly) - the 'rules' I will be using might be revised 
 for better accuracy in prediction.
 
 I also need to track each user's path and solutions' for future 
 reference (but no personal details except username and email address 
 for logging in). Maybe when the app is up and running, I'd like to 
 make it more democratic, with users contributing to refining the 
 logic/rules involved.
 
 If possible, I would also like the app to output a graphical 
 flowchart at the end showing the workflow with all tools grouped in 
 an easy to understand layout.
 
 
 *My questions:*
 
 1. Will the app be better served with a relational DB like mySQL or 
 an Object database? After a lot of research I've guessed that my 
 particular case might be better served with Python and Zope/ZODB.
 But I might be wrong? Maybe PHP+mySQL or Django is a better fit? 2.
 Can anyone provide general advice on how to go about beginning such
 a project in ZOPE. Which is the best place to start learning for a 
 newbie? 3. Can anyone recommend a good shared hosting provider that 
 supports Zope fully but is not expensive? 4. Is there a module or
 app that is open source that I can use to output a graphical
 flowchart based on the results, or will I be better served
 programming it from scratch with Python?
 
 I would appreciate any help in getting started. Thank you in
 advance. I have tried most online forums but have not good any
 productive answers. Most of the answers I got were pro-PHP+mySQL.
 
 
 Adam
 
 ___ Zope maillist  - 
 Zope@zope.org https://mail.zope.org/mailman/listinfo/zope **   No 
 cross posts or HTML encoding!  ** (Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce 
 https://mail.zope.org/mailman/listinfo/zope-dev )

- -- 
ZOPYX Limited   | zopyx group
Charlottenstr. 37/1 | The full-service network for Zope  Plone
D-72070 Tübingen| Produce  Publish
www.zopyx.com   | www.produce-and-publish.com
- 
E-Publishing, Python, Zope  Plone development, Consulting


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJO2yPrAAoJEADcfz7u4AZjnJULviZSrj8nLwzeqjgxGT+d9/aU
1x0bj/E3zuPFeKtWkevp26K4OiCe/yw7PmgVXh1xBbfLhFzUcet9Ubdu0eIjfE/8
dC8hayQf4fR8KD3J06CbkMAEJsJur3gTPoFxzDWd7S9ybwuFjb3E14AhiQGPpdYN
DVwE6U3t240Wj7ebNTblASQnvI2sfzr9r2tYVqZc8O+SMyROL1oIs56RNofT4pz5
p9OXiYlnHmn1keCbEKnYk1e2zTU7kFJdGQz/Uy+yV4QTiU7nMwhxWCx1gBKxVgNk
XseqPdWKl9epz/h1Pb0qPTvK6PXl46Cj/0Bls/XU6yHDDpB49SqMXai2i6VIAzdL
lik6JwSPVxBv24eTngrisx2qvhl1ln63EM+AWwky7jUgNl0cwALNdR3Gj+zDVioc
ZWAZfWcuI3TFKYpwJiwzNgT0DSbOLvlM/09xXPsxmE+rfXT8arTxMSEgaQS60LqJ

Re: [Zope] help with running a dtml method

2009-03-27 Thread Dieter Maurer
Dvir Bar-lev wrote at 2009-3-26 10:12 +0200:
I have a site with the following  folder structure in zope:
Dvir
WebSite
  contentPages

I have and index_html in the WebSite folder, in it I call a dtml method
that's in the contentPages folder named overview_html,

in the same folder (content Pages) I have another dtml_method named
time_combo.

In the overview_html I try to call the time combo method - I tried:

dtml-var  time_combo

But it keeps saying it has an error :

Error Type: NameError
Error Value: name 'time_combo' is not defined

Unlike a DTMLDocument, a DTMLMethod does not change the context
from name lookup. Depending on how you call the method
you may even loose all context.

To learn more about DMTL calling, read
http://www.handshake.de/~dieter/pyprojects/zope/book/chap3.html#c37ac15c14b5



-- 
Dieter
___
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] Help with my first steps

2009-02-21 Thread Dieter Maurer
deconya wrote at 2009-2-20 15:14 +0100:
Im new in this list and I need help for my first steps. Im received a server
with zope installed to administer 3 webs but one has the problem that fails
the configuration to establish the initial page.

I fear you need some background reading to understand how Zope
works. The Zope Book, 2.7 edition, on http://plope.org;
may be a good starting point.

After you skimmed the book, come back if questions remain.



-- 
Dieter
___
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] Help with my first steps

2009-02-20 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 20.02.2009 15:14 Uhr, deconya wrote:
 Hi
 
 Im new in this list and I need help for my first steps. Im received a
 server with zope installed to administer 3 webs but one has the problem
 that fails the configuration to establish the initial page. Im searching
 where you can configure to publish the webs but I could see the process
 to publish but no where you can put the initial page inside zope. Im
 sure the question es stupid but I need to resolve urgently this problem
 and Im not pacience to read all the manual. Someone can help me?
 


This description is pretty poor. In general: the mapping of domains -
Zope host/port is known as virtual hosting and usually configured
through rewrite rules or something similar within your front-end proxy
(Apache, Squid  friends) - or old fashioned through settings
within the instance of the virtual host monster somewhere in the root
of the ZMI.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkmevB8ACgkQCJIWIbr9KYycrwCgm4piV8PUjha0xmDSMxkDXcg0
9cEAnRexKgl/Ti2OX8CfCYvGRDnTH/DJ
=ujHA
-END PGP SIGNATURE-
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd.  Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:i...@zopyx.com
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

___
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] help debugging a can't pickle error deep within a catalog reindex

2008-06-19 Thread Dieter Maurer
Rob Miller wrote at 2008-6-17 15:47 -0700:
 ...
Traceback (most recent call last):
 
/home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZODB/serialize.py,
 
line 407, in serialize
 return self._dump(meta, obj.__getstate__())
   File 
/home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZODB/serialize.py,
 
line 416, in _dump
 self._p.dump(state)
   File copy_reg.py, line 69, in _reduce_ex
 raise TypeError, can't pickle %s objects % base.__name__
TypeError: can't pickle instancemethod objects

Reproduce the problem in an interactive Python interpreter
(bin/zopectl debug on *nix; alternatives for Win*).
Call pdb.pm() (or probably better dm.pdb.zpdb.pm() (dm.pdb
can be found on PyPI)) and go up two call frames.
Look at obj. With a bit of looks, you see which objects
this is and where it comes from.

-- 
Dieter
___
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] Help writing test where bobobase_modification_time changes

2008-04-11 Thread Peter Bengtsson
Thanks for the tips Chris and Dieter, I actually solved it in a very simple way:


from OFS.Image import File
from time import time
class MockFile(File):
 This file works the same as a normal File expect that
in manage_edit() the internal modification time is set immediately.
Normally Zope objects get their internal modification set when
the transaction manager commits.


def manage_edit(self, title, content_type, precondition='',
filedata=None, REQUEST=None):
# here's the mock hack, we set the _p_mtime NOW instead of letting
# the transaction manager do it at the end.
self._p_mtime = time()
return File.manage_edit(self, title, content_type,
precondition=precondition,
filedata=filedata, REQUEST=REQUEST)

This worked beautifully in the integration test. I'm happy.

On 10/04/2008, Chris Withers [EMAIL PROTECTED] wrote:
 Peter Bengtsson wrote:

  How can I solve this? Make one big transaction two without having to
  use transaction.get().commit() which I don't think I can use in unit
  tests as per Dieter's advice.
 

  I'd suggest monkeypatching bobobase_modification_time on the objects you're
 testing with. You're testing your cache code, not the implementation of
 those objects, so replacing them with (partially) dummy objects is great for
 avoiding this kind of problem and is a pattern I've used frequently...

  cheers,

  Chris

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



-- 
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.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] Help writing test where bobobase_modification_time changes

2008-04-10 Thread Chris Withers

Peter Bengtsson wrote:

How can I solve this? Make one big transaction two without having to
use transaction.get().commit() which I don't think I can use in unit
tests as per Dieter's advice.


I'd suggest monkeypatching bobobase_modification_time on the objects 
you're testing with. You're testing your cache code, not the 
implementation of those objects, so replacing them with (partially) 
dummy objects is great for avoiding this kind of problem and is a 
pattern I've used frequently...


cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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] Help writing test where bobobase_modification_time changes

2008-04-09 Thread Dieter Maurer
Peter Bengtsson wrote at 2008-4-8 19:08 +0100:
 ...
The reason it fails on the last line is that the time difference
between the first time and the second time is nil. Adding a
time.sleep(1) won't change anything because the
bobobase_modification_time() doesn't change.

How can I solve this?

Not easy.

bobobase_modification_time() is in fact a DateTime representation
of _p_serial. And _p_serial is the transaction id (also a timestamp)
that has committed the object state belonging to this object incarnation.

Unfortunately, you must not commit a transaction in a test suite
(as this may cause interference with other tests).

There is a small chance that a savepoint changed _p_serial --
but the chance is only small...

You might be able to write _p_serial yourself and thereby
trick bobobase_modification_time().



-- 
Dieter
___
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] help with customizing error messages, Zope 2.9

2007-09-21 Thread Dieter Maurer
Dennis Allison wrote at 2007-9-20 09:37 -0700:
 ...
standard_error_message should be acquired.  It should be possible for
there to be multiple copies with the particular one to be used selected by
acquisition.  This does not appear to be the case for some errors in my
configuration, but I am not sure why.  

You are right -- and I can explain why.

There appears to be nothing in the Zope 2.9 zope.conf file that has to do
with catching error messages.  Is there some configuration that is 
missing to enable full custom error messages.

Looking at the code:

ZPublisher/HTTPResponse.py seems to have a complete set of error
responses hard-wired with outputs that mimic those of the default
standard_error_message.

OFS/SimpleItem.py includes a method called raise_standardErrorMessage
which first acquires and then publishes the standard_error_message.

Zope2/App/startup.py has a method, zpublisher_exception_hook which 
uses raise_standardErrorMessage and is referenced in ZPublisher/Publish.py
where it is used to set error_hook, but error_hook does not appear to be 
used.

It would be helpful to me if someone who understands how this particular 
code works could provide some hints as to what's needed to fully customize 
the error message responses.

We start with ZPublisher. It is this component that
catches the exception and activate error handling.

ZPublisher was designed as a general publication component -- to
be used not only for Zope. Therefore, it has
neither error handling nor transaction handling nor a few other
things hard coded.
Instead, it gets a module name and determines the relevant
pieces by a call to ZPublisher.Publish.get_module_info(module_name).

When ZPublisher is used for Zope, then module_name is
Zope2. Zope2 defines Zope2.zpublisher_exception_hook
as its exception hook (which does the error handling).
The true zpublisher_exception_hook is defined
(as you found out) in Zope2.App.startup and copied
to Zope2 by the _startup call.


When ZPublisher catches an exception, it calls the error hook
with parents[0] (the last or second to last object traversed to), the
request and the error information.

zpublisher_exception_hook then looks in the
acquisition context of parents[0]
for 'raise_standardErrorMessage' and 'standard_error_message'.
If either of them is not found, the exception is
raised -- and handled by the response object in a standard (minimal) way.

Otherwise, 'raise_standardErrorMessage(standard_error_message, ...)'
is called.


The problem which sometimes causes surprises with respect
to the used 'standard_error_message' lies in parents[0]:

  When the exception happens during traversal, then
  parents[0] is not the object you may expect -- but
  lies above the expected object.

  The problem is especially bad when the exception
  is raised by request.processInputs. In this case,
  the traversal did not even start and parents[0]
  is the root object. Consequently, for these exceptions,
  you will always get the standard_error_message from your
  root folder -- even when the request was targeted to some
  object deep inside your site.

  processInputs may raise exceptions when you use e.g.
  ZPublisher type conversions, e.g. :int or :float
  and the provided value cannot be converted.
  If you do not like this, you should not use ZPublisher
  type conversions.


-- 
Dieter
___
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] Help with DateTime.earliestTime()

2007-08-26 Thread Dieter Maurer
Eric Thomas wrote at 2007-8-25 07:18 -0500:
I've been having a site problem that I've tracked down to DateTime.  Simply
enough, the code snippets below both try to add 31 days to the first day in
October.  I'm expecting this to result in the first day of November.

Good Example:

 from DateTime import DateTime
 start=DateTime('2005/10/01 01:00:00 GMT-5')
 print start
2005/10/01 01:00:00 GMT-5
 earlyStart=start.earliestTime()
 print earlyStart
2005/10/01
 print earlyStart+31
2005/11/01

Bad Example:  (Here's the problem)

 from DateTime import DateTime
 start=DateTime('2005/10/01 01:00:00 US/Central')
 print start
2005/10/01 01:00:00 US/Central
 earlyStart=start.earliestTime()
 print earlyStart
2005/10/01
 print earlyStart+31
2005/10/31 23:00:00 US/Central

I've confirmed this occurs with several of the US/ timezones (US/Pacific,
US/Alaska, etc)

This looks like a daytime saving problem:

  With daytime saving, the clock often is put back for an hour
  at the last samday in october

The DateTime implementation could avoid this
*if* the arithmetic would only accept
int (then it would be very likely that you only want to modify
the day but not hours, minutes and seconds). But the arithmetic
accepts float and that necessitates some surprises with
time discontinuities (such as daytime saving switches).




Can anyone help me figure out why the resulting date is coming up 1 hour
short of the expected 2005/11/01 ?

Thanks!

Eric
divI#39;ve been having a site problem that I#39;ve tracked down to 
DateTime.nbsp; Simply enough, the code snippets below both try to add 31 days 
to the first day in October.nbsp; I#39;m expecting this to result in the 
first day of November.
/div
divnbsp;/div
divGood Example:/div
div
pgt;gt;gt; from DateTime import DateTimebrgt;gt;gt; 
start=DateTime(#39;2005/10/01 01:00:00 GMT-5#39;)brgt;gt;gt; print 
startbr2005/10/01 01:00:00 GMT-5brgt;gt;gt; 
earlyStart=start.earliestTime()br
gt;gt;gt; print earlyStartbr2005/10/01brgt;gt;gt; print 
earlyStart+31br2005/11/01/p/div
div
pBad Example:nbsp; (Here#39;s the problem)/p
pgt;gt;gt; from DateTime import DateTimebrgt;gt;gt; 
start=DateTime(#39;2005/10/01 01:00:00 US/Central#39;)brgt;gt;gt; print 
startbr2005/10/01 01:00:00 US/Centralbrgt;gt;gt; 
earlyStart=start.earliestTime
()brgt;gt;gt; print earlyStartbr2005/10/01brgt;gt;gt; print 
earlyStart+31br2005/10/31 23:00:00 US/Central/p
pI#39;ve confirmed this occurs with several of the US/ timezones 
(US/Pacific, US/Alaska, etc)/p
pCan anyone help me figure out why the resulting date is coming up 1 hour 
short of the expected 2005/11/01 ?/p
pThanks!/p
pEric/p
pnbsp;/p
pnbsp;/p/div

-- 
Dieter
___
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] Help with DateTime.earliestTime()

2007-08-25 Thread Andreas Jung



--On 25. August 2007 07:18:42 -0500 Eric Thomas [EMAIL PROTECTED] wrote:


I've been having a site problem that I've tracked down to DateTime.
Simply enough, the code snippets below both try to add 31 days to the
first day in October.  I'm expecting this to result in the first day of
November.




Likely because the timezone support is known to be partly broken (since 
ages).


-aj

pgprmA5T8AN1C.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 )


Re: [Zope] Help with DateTime.earliestTime()

2007-08-25 Thread Jonathan


- Original Message - 
From: Eric Thomas [EMAIL PROTECTED]

To: zope@zope.org
Sent: Saturday, August 25, 2007 8:18 AM
Subject: [Zope] Help with DateTime.earliestTime()


I've been having a site problem that I've tracked down to DateTime. 
Simply
enough, the code snippets below both try to add 31 days to the first day 
in

October.  I'm expecting this to result in the first day of November.

Good Example:


from DateTime import DateTime
start=DateTime('2005/10/01 01:00:00 GMT-5')
print start

2005/10/01 01:00:00 GMT-5

earlyStart=start.earliestTime()
print earlyStart

2005/10/01

print earlyStart+31

2005/11/01

Bad Example:  (Here's the problem)


from DateTime import DateTime
start=DateTime('2005/10/01 01:00:00 US/Central')
print start

2005/10/01 01:00:00 US/Central

earlyStart=start.earliestTime()
print earlyStart

2005/10/01

print earlyStart+31

2005/10/31 23:00:00 US/Central

I've confirmed this occurs with several of the US/ timezones (US/Pacific,
US/Alaska, etc)

Can anyone help me figure out why the resulting date is coming up 1 hour
short of the expected 2005/11/01 ?


I don't know what your problem is, but here are some code snippets I used to 
get around a timezone problem I was having:


# def custom timezone class
class LocalTimezone(datetime.tzinfo):
   def utcoffset(self, dt):
   STDOFFSET = datetime.timedelta(seconds = -_time.timezone)
   ZERO = datetime.timedelta(0)
   if _time.daylight:
   DSTOFFSET = datetime.timedelta(seconds 
= -_time.altzone)

   else:
   DSTOFFSET = STDOFFSET
   if self._isdst(dt):
   return DSTOFFSET
   else:
   return STDOFFSET

   def dst(self, dt):
   STDOFFSET = datetime.timedelta(seconds = -_time.timezone)
   ZERO = datetime.timedelta(0)
   if _time.daylight:
   DSTOFFSET = datetime.timedelta(seconds 
= -_time.altzone)

   else:
   DSTOFFSET = STDOFFSET
   if self._isdst(dt):
   DSTDIFF = DSTOFFSET - STDOFFSET
   return DSTDIFF
   else:
   return ZERO

   def tzname(self, dt):
   return _time.tzname[self._isdst(dt)]

   def _isdst(self, dt):
   tt = (dt.year, dt.month, dt.day,
   dt.hour, dt.minute, dt.second,
   dt.weekday(), 0, -1)
   stamp = _time.mktime(tt)
   tt = _time.localtime(stamp)
   return tt.tm_isdst  0


# usage code...
   Local = LocalTimezone()
   chkDate = datetime.datetime.now(Local)
   now = datetime.datetime.now(Local)

   # see if we have to apply a local timezone offset
   if tzo:
   # get the number of hours less than UTC (GMT)
   localTZO = int(chkDate.strftime('%z')[0:-2])

   # make sure we have the target tzo as an integer
   targetTZO = int(tzo)

   diffTZO = 0
   if targetTZO  localTZO:
   diffTZO = -(-targetTZO + localTZO)

   elif targetTZO  localTZO:
   diffTZO = (-localTZO + targetTZO)

   if diffTZO:
   # we have to adjust our dates to account for the 
time zone difference
   chkDate = chkDate + 
datetime.timedelta(hours=diffTZO)

   now = now + datetime.timedelta(hours=diffTZO)

   # create a time delta object (a date/time object that is a duration) 
for 6 months

   maxDate = datetime.timedelta(weeks=24)

   # check for events within a 6 month window
   while chkDate  now + maxDate:


This code was just ripped from an application, but may provide you with some 
ideas for a work-around.


Good luck!

Jonathan


___
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] help with detecting mime_type

2007-05-24 Thread Andreas Jung



--On 24. Mai 2007 11:31:17 +0100 Alan [EMAIL PROTECTED] wrote:


Dears,

In my external method I can get mime_type =
file.headers.headers[1].split()[1] and then my code proceed based on
which mime type was identified for the file uploaded.

What happens now is that a user uploading a tgz file from a Windows
platform and then my code did not identify it as a
application/x-gzip-compressed or similar (it gets
application/octet-stream).

As far as I understood from this case, such mime type info is passed
by user's system (where Windows usually is not aware of tar.gz, tgz
etc format) rather than being set by zope server.


AFAIK..all Zope types derived from OFS.File or OFS.Image are using
OFS.contenttypes.guess_content_types()...if the 'content-type' header
isn't available. Otherwise Zope will use it.


-aj

pgpMsaCGABmdo.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 )


Re: [Zope] help, installing ZJetDA-0.1.1..

2006-12-05 Thread Maciej Wisniowski

 Hi, I have copied the folder of the ZJetDA-0.1.1 product 
Have you seen how old ZJetDA is? I'm not surprised
it doesn't work with Zope2.10.
If you want to use this you'll possibly have to modify
it's code.

Better look for different database adapter. I think
that mxODBC might be best solution for you.

-- 
Maciej Wisniowski
___
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] Help! Can't Log Into ZMI!!

2006-11-27 Thread Nancy Donnelly
 When you have access to the ssh on your server i think you can set an
 'master password' 

I couldn't even pull up the ZMI password dialog box. But I figured it out. I 
changed IP addresses and needed to update that in the zope.conf because ZEO 
listens on port . 

I wonder why I can't just use the localhost address: 127.0.0.1 ? Doesn't seem 
to work.
Nancy





___
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] Help! Can't Log Into ZMI!!

2006-11-26 Thread Christian Steinhauer
 
here you can find some additional informations for zpasswd: 
http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/Security.stx

search for Creating an Emergency User

- cs



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Nancy Donnelly
Sent: Sunday, November 26, 2006 5:10 PM
To: zope@zope.org
Subject: [Zope] Help! Can't Log Into ZMI!!


Hi;
I added a LDAPUserFolder instance to my Plone. It didn't connect for
whatever reason. I rebooted the server. Now I can't log in! It just hangs.
Actually, I rebooted a day later and did lots of work in between, so it's
not like I could carefully edit the Data.fs. What do I do?
Nancy




___
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] help performance

2006-11-24 Thread Yuri

Jonathan wrote:


- Original Message - From: Yuri [EMAIL PROTECTED]
To: zope@zope.org
Sent: Thursday, November 23, 2006 11:07 AM
Subject: [Zope] help performance



Hi!

I've an old machine with zope 2.6 with an application based on 
ZClass. Now, updating 4000 record takes ages (more than an hour...), 
basically it is a propertysheet update + recatalog of every object of 
4000.


Can I have significative performance upgrade changing something in 
the code base? Some ZCatalog slow bug in 2.6 I could patch you know 
of? :)


You could try different transaction subcommit threshold settings 
(Catalog - Advanced tab) to see if different settings have any 
beneficial impact.


Subtransactions are *Disabled :)
*
___
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] help performance

2006-11-24 Thread Yuri

Andreas Jung wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 23. November 2006 17:07:39 +0100 Yuri [EMAIL PROTECTED] wrote:

  

Hi!

 I've an old machine with zope 2.6 with an application based on ZClass.
Now, updating 4000 record takes ages (more than an hour...), basically it
is a propertysheet update + recatalog of every object of 4000.

 Can I have significative performance upgrade changing something in the
code base? Some ZCatalog slow bug in 2.6 I could patch you know of? :)




ZopeProfiler will tell you about bottlenecks.
  


Doesn't work in zope 2.6 based on python 2.1 :(

# more version.txt
1.7.2
for Zope 2.5.1 and 2.6.1, 2.7.3, 2.8, 2.9
Python 2.3.x, 2.4.x
___
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] help performance

2006-11-24 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 24. November 2006 11:16:50 +0100 Yuri [EMAIL PROTECTED] wrote:




 ZopeProfiler will tell you about bottlenecks.


  Doesn't work in zope 2.6 based on python 2.1 :(


Try CallProfiler instead.

- -aj

- -- 
ZOPYX Ltd.  Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope  Plone development, Consulting
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFZsd3CJIWIbr9KYwRAkt2AKCssal5dASk5L2Hr5Hx25NcP73HlACfd8sR
zwcPSLgP0kd/wyMVPCtV4oU=
=lx7b
-END 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 )


Re: [Zope] help performance

2006-11-24 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 24. November 2006 11:20:39 +0100 Andreas Jung [EMAIL PROTECTED] wrote:





 ZopeProfiler will tell you about bottlenecks.


  Doesn't work in zope 2.6 based on python 2.1 :(


 Try CallProfiler instead.


and *enable* subtransactions!

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFZsfJCJIWIbr9KYwRAn4EAJ9NDvAQT4jOEcBSOEshEWz/I6EtEwCfepEK
tPE8sMBxMQET/euEhCVAD5g=
=FztJ
-END 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 )


Re: [Zope] help performance

2006-11-24 Thread Yuri

Andreas Jung wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 24. November 2006 11:20:39 +0100 Andreas Jung [EMAIL PROTECTED] wrote:

  
  

ZopeProfiler will tell you about bottlenecks.



 Doesn't work in zope 2.6 based on python 2.1 :(

  

Try CallProfiler instead.




and *enable* subtransactions!
  



When I have a transaction wich takes almost 1 sec, I don't think it will 
change anything :) I'll try CallProfiler :)

___
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] help performance

2006-11-24 Thread Chris Withers

Yuri wrote:
When I have a transaction wich takes almost 1 sec, I don't think it will 
change anything :) 


You might be surprised...

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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] help performance

2006-11-24 Thread Martijn Pieters

On 11/24/06, Yuri [EMAIL PROTECTED] wrote:

 and *enable* subtransactions!

When I have a transaction wich takes almost 1 sec, I don't think it will
change anything :) I'll try CallProfiler :)


Did you try? Subtransactions are not the same as transactions. They
are an optimization, so try them! Don't just ditch the experts here.

--
Martijn Pieters
___
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] help performance

2006-11-24 Thread Yuri

Martijn Pieters wrote:

On 11/24/06, Yuri [EMAIL PROTECTED] wrote:

 and *enable* subtransactions!

When I have a transaction wich takes almost 1 sec, I don't think it will
change anything :) I'll try CallProfiler :)


Did you try? Subtransactions are not the same as transactions. They
are an optimization, so try them! Don't just ditch the experts here.


ok, you got me :)

with callprofiler I have:

+0.0209 0.1213  1.4%+- inserimento
+0.0461 0.0044  0.1%| +- standard_html_header
+0.0479 0.0018  0.0%| | +- intestazione_html_standard
+0.0518 0.0012  0.0%| | +- mappa_barra_loggato
0.0931  1.1%| |
+0.1467 7.4849  85.1%   | +- dafne_item_add
1.1709  13.3%   | | |
+1.3175 0.0027  0.0%| | +- proprietario
+1.3245 0.0450  0.5%| | +- sonopubblico
0.1486  1.7%| | |
+1.5181 0.0026  0.0%| | +- proprietario (2nd call)
1.3108  14.9%   | | |
+2.8316 0.0043  0.0%| | +- globale
4.6964  53.4%   | | |
+7.5323 0.0452  0.5%| | +- sonopubblico (2nd call)
0.1539  1.7%| | |
+7.7324 0.0367  0.4%| +- invalida_cache
+7.7704 0.0010  0.0%| +- standard_html_footer


What does exactly take 4.6 sec? :-o
___
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 )


[Fwd: Re: [Zope] help performance]

2006-11-24 Thread Yuri


Martijn Pieters wrote:

On 11/24/06, Yuri [EMAIL PROTECTED] wrote:

 and *enable* subtransactions!

When I have a transaction wich takes almost 1 sec, I don't think it will
change anything :) I'll try CallProfiler :)


Did you try? Subtransactions are not the same as transactions. They
are an optimization, so try them! Don't just ditch the experts here.


0.0209  0.9%|
+0.0209 0.0174  0.7%+- inserimento
+0.0320 0.0042  0.2%| +- standard_html_header
+0.0337 0.0017  0.1%| | +- intestazione_html_standard
+0.0374 0.0011  0.0%| | +- mappa_barra_loggato
+0.0423 1.0951  46.8%   | +- dafne_item_add
0.5836  24.9%   | | |
+0.6260 0.0028  0.1%| | +- proprietario
+0.6301 0.0484  2.1%| | +- sonopubblico
+0.6804 0.0026  0.1%| | +- proprietario (2nd call)
0.0406  1.7%| | |
+0.7236 0.0043  0.2%| | +- globale
0.4665  19.9%   | | |
+1.1945 0.0457  2.0%| | +- sonopubblico (2nd call)
+1.2423 0.0033  0.1%| +- invalida_cache
+1.2468 0.0010  0.0%| +- standard_html_footer


Ok, I've run a machine for three years without any optimizations. 
Enabling transaction cut the time of about 73%:


http://myurl/inserimento2.3416  5.5694  8.7971  8.7971,
2.3416


8.7971 was the time without subtransactions, 2.3 with.

Ops... -.-


___
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: [Fwd: Re: [Zope] help performance]

2006-11-24 Thread Martijn Pieters

On 11/24/06, Yuri [EMAIL PROTECTED] wrote:

8.7971 was the time without subtransactions, 2.3 with.

Ops... -.-


Indeed. And if you tweak the threshold as Jonathan suggested, you
could even get it lower.

--
Martijn Pieters
___
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: [Fwd: Re: [Zope] help performance]

2006-11-24 Thread Yuri

Martijn Pieters wrote:

On 11/24/06, Yuri [EMAIL PROTECTED] wrote:

8.7971 was the time without subtransactions, 2.3 with.

Ops... -.-


Indeed. And if you tweak the threshold as Jonathan suggested, you
could even get it lower.


Just to clarify, 2.3 sec is the time to insert only one object :)

I'll try to tweak it as suggested by you gurus :P
___
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] help performance

2006-11-23 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



- --On 23. November 2006 17:07:39 +0100 Yuri [EMAIL PROTECTED] wrote:

 Hi!

  I've an old machine with zope 2.6 with an application based on ZClass.
 Now, updating 4000 record takes ages (more than an hour...), basically it
 is a propertysheet update + recatalog of every object of 4000.

  Can I have significative performance upgrade changing something in the
 code base? Some ZCatalog slow bug in 2.6 I could patch you know of? :)


ZopeProfiler will tell you about bottlenecks.

- -aj
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFZce2CJIWIbr9KYwRAjMFAKCje2mf4XN4z/loynCUMo+MIW4cSwCfUnUA
dH8pNs+4XK2yrzjJ+sfVWlQ=
=1Uee
-END 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 )


Re: [Zope] help performance

2006-11-23 Thread Jonathan


- Original Message - 
From: Yuri [EMAIL PROTECTED]

To: zope@zope.org
Sent: Thursday, November 23, 2006 11:07 AM
Subject: [Zope] help performance



Hi!

I've an old machine with zope 2.6 with an application based on ZClass. 
Now, updating 4000 record takes ages (more than an hour...), basically it 
is a propertysheet update + recatalog of every object of 4000.


Can I have significative performance upgrade changing something in the 
code base? Some ZCatalog slow bug in 2.6 I could patch you know of? :)


You could try different transaction subcommit threshold settings (Catalog - 
Advanced tab) to see if different settings have any beneficial impact.



Jonathan 



___
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] Help create filesystem skin with product

2006-10-11 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 11 Oct 2006, at 18:37, yary wrote:


I'm having a problem which must have been solved many times before-
trying to make a product that ships with a skin. I'm new to Zope
development, been stumbling for a couple months with it.


Take a look at CMFCalendar as included in the CMF 2.0 you're working  
with. It registers a skin folder and even adds it to the skins path  
automatically, using a GenericSetup profile. That's a good example to  
look at.


jens



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFLXc5RAx5nvEhZLIRAmRuAJ9yn69WUwiAJLKmi/2jVDJ7YoTI3wCfbGtP
XMdrIbhMWwLOuciLBJACtUU=
=t4JR
-END 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 )


Re: [Zope] Help! Zope Crashed! Production Server!

2006-10-05 Thread Marco Bizzarri

Since you're running it with runzope (i.e. in foregreound mode):

1) Can you confirm Zope provided the message Zope Ready to handle requests

2) What is the top command showing? Is python/zope process using CPU,
or is it simple unresponsive?

3) Can you check if there are different processes when you start and
when you do your first request? With some C extensions of python, you
can end with hanging python processes (at least on Linux; don't know
on FreeBSD).

4) Is the zope process able to write to Z2.log, event.log and (if
used) trace.log?

Hope this can help.

Regards
Marco

--
Marco Bizzarri
http://notenotturne.blogspot.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] Help! Zope Crashed! Production Server!

2006-10-05 Thread Stefan H. Holek

The most common issue on *BSD is this:
http://tomster.org/blog/archive/2006/09/27/size-does-matter

Stefan


On 4. Okt 2006, at 20:43, Javier Subervi wrote:

The person who ran this box previously didn't understand FreeBSD's  
port system, so he built Python in a different place.


--
It doesn't necessarily do it in chronological order,
though.  --Douglas Adams


___
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] Help! Zope Crashed! Production Server!

2006-10-04 Thread Maciej Wisniowski


When I ps wax I see Zope is working. However, when I surf to sites, or even the IP address, it just hangs! 

Stop Zope and check whether you still have any Zope processes.
If so then kill'em and then try to run Zope again. I had similiar
problems with hanged Zope processes. Maybe that's your's
problem too.

You may use netstat to check whether your Zope is listening.

--
Maciej Wisniowski

___
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] Help! Zope Crashed! Production Server!

2006-10-04 Thread Paul Winkler
http://www.zettai.net/Support/Howto/deadlockDebuggerHowto

On Wed, Oct 04, 2006 at 11:43:25AM -0700, Javier Subervi wrote:
 Hi;
 I'll afford a server to experiment on before year's end, but that doesn't 
 help me today. I was trying to get Python 2.3.5 to work with LDAP on FreeBSD. 
 I built py-ldap2 from ports and directed it to install Python 2.3.5 (because 
 I'm using Zope 2.7.8 because my software won't migrate yet). It built out 
 okay. The person who ran this box previously didn't understand FreeBSD's port 
 system, so he built Python in a different place. I moved all of that for 
 safety's sake (at least, I thought I did), and then ended up moving it all 
 back because I couldn't fire up Zope (I have 2 instances). Then I was able to 
 fire up Zope *and* import LDAP (the latter indicating something from my new 
 installation stuck). When I ps wax I see Zope is working. However, when I 
 surf to sites, or even the IP address, it just hangs! I cleared out 
 log/event.log and touched it and fired up in runzope mode, but there was 
 nothing strange in the event.log! And I've been over that log many times 
 lately, so I
  would recognize something different. I presume ZServer is hung. How do I 
 trouble-shoot this?
 TIA,
 Javier2
   
 -
 Do you Yahoo!?
  Get on board. You're invited to try the new Yahoo! Mail.
 ___
 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 )


-- 

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] Help! I Screwed Up a Source File

2006-09-05 Thread Martijn Pieters

On 9/5/06, beno [EMAIL PROTECTED] wrote:

I inherited this box so I don't know exactly how this file got built;
however, it's python 2.3.5 and zope 2.7.8. I apparently screwed up this
file:
278/lib/python/Zope/Startup/zeoctl
Where can I grab a copy of the correct file?


Download 2.7.8 from Zope.org and extract that one file?

--
Martijn Pieters
___
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] Help on installing ZFSPath / LocalFS

2006-07-05 Thread insinjoori

Please, someone
-- 
View this message in context: 
http://www.nabble.com/Help-on-installing-ZFSPath---LocalFS-tf1895239.html#a5185588
Sent from the Zope - General forum at Nabble.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] Help on installing ZFSPath / LocalFS

2006-07-05 Thread dieter
insinjoori wrote at 2006-7-5 08:00 -0700:
So, I've unpacked the files to Products dir. I'm supposed to create a
ZFSPath object somewhere. How do I excactly do that?

Maybe, you start reading the Zope Book (2.7 edition, online)
and learn how objects are created in general.



-- 
Dieter
___
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] Help needed to simplify some code

2006-03-09 Thread Chris Withers

Paul Winkler wrote:
span tal:define=opts 
python:here.lib.parse_file(file=here.news,sepr=',',clone=1)

  li repeat=opt opts
a tal:content=python:opt/label

  ^^^
Leave out the python: there.  


Whoops, yep, sorry about that...

Chris

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

___
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] Help needed to simplify some code

2006-03-08 Thread Chris Withers

John Poltorak wrote:


Several months ago someone provided me with me with some sample code which 
did exactly what I wanted, but looking at it again it looks a little 
unwieldy and could do with tidying up. It consists of:-



span tal:define=opts 
python:here.lib.parse_file(file=here.news,sepr=',',clone=1)
   tal:block repeat=opt opts
  lia tal:content=python:opt[1]
  tal:attributes=href python:'news_items/'  + opt[0]/a/li
   /tal:block
/span


Okay, if you can get parse_file to return a list of dictionaries like:
[
  {
   'folder':'whatever',
   'label':'whatever',
  }
]
...then you can do:

span tal:define=opts 
python:here.lib.parse_file(file=here.news,sepr=',',clone=1)

  li repeat=opt opts
a tal:content=python:opt/label
   tal:attributes=href string:news_items/${opt/folder}/
  /li
/span

cheers,

Chris

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

___
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] Help needed to simplify some code

2006-03-08 Thread Paul Winkler
On Wed, Mar 08, 2006 at 09:35:55AM +, Chris Withers wrote:
 John Poltorak wrote:
 
 Several months ago someone provided me with me with some sample code which 
 did exactly what I wanted, but looking at it again it looks a little 
 unwieldy and could do with tidying up. It consists of:-
(snip)

What Chris said, except:

 ...then you can do:
 
 span tal:define=opts 
 python:here.lib.parse_file(file=here.news,sepr=',',clone=1)
   li repeat=opt opts
 a tal:content=python:opt/label
  ^^^
Leave out the python: there.  

-PW

-- 

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] help

2006-02-21 Thread Chris Withers

Andreas Pakulat wrote:

This should show at least zope-2.7. If that shows up you can find the
documentation and how to setup an instance in /usr/share/doc/zope-2.7.


Although, in all seriousness, I'd recommend installing from source.
And I'd recommend the original poster read Eric Raymond's how to ask 
questions post, 'help' is not a useful subject line...


Chris

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

___
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] help

2006-02-20 Thread Andreas Pakulat
On 15.12.05 20:14:51, adeline nombre wrote:
   I wanted to install zope on my debian system but I noticed there is a 
 /usr/lib/zope directory. so I concluded zope has already been installed with 
 my debian system. so what to do now? I'm just beginning.

You can find out about packages that are installed with dpkg -l zope*

This should show at least zope-2.7. If that shows up you can find the
documentation and how to setup an instance in /usr/share/doc/zope-2.7.

Andreas

-- 
You will have domestic happiness and faithful friends.
___
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] Help with a simple DMS

2006-02-07 Thread J Cameron Cooper

Joshua Gilbert wrote:

Hi.

I'd like to make a simple DMS, users upload their
PDFs/docs/ps/whatever and then they can search within the documents.


I believe TextIndexNG will index contents of complex file types.


I need to be able to automate the submission of documents as I'm part
of a large research lab, we've accumulated a lot of papers over the
years.


What exactly does automate the submission of documents mean?


Other than that I'd like a nice, simple authentication scheme. That's
about it. Dead simple.


Then stick with how it's already set up. Plone provides a nice UI for 
user management.


--jcc

--
Building Websites with Plone
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.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] Help with a simple DMS

2006-02-07 Thread Joshua Gilbert
On 2/7/06, J Cameron Cooper [EMAIL PROTECTED] wrote:
 Joshua Gilbert wrote:
  Hi.
 
  I'd like to make a simple DMS, users upload their
  PDFs/docs/ps/whatever and then they can search within the documents.

 I believe TextIndexNG will index contents of complex file types.

OK, that's great. Where do I find documentation to tell me how to set
up the site?


  I need to be able to automate the submission of documents as I'm part
  of a large research lab, we've accumulated a lot of papers over the
  years.

 What exactly does automate the submission of documents mean?

I mean that I have a great deal of papers. I can't go through web
forms to add all of these documents. I would like to be able to submit
them through an automated process, I can't go through web forms by
hand to add them all.

I'm trying to convince my lab that this is a useful product. If I ask
them to submit their papers one at a time I'll lose the argument and
we won't use Zope.


  Other than that I'd like a nice, simple authentication scheme. That's
  about it. Dead simple.

 Then stick with how it's already set up. Plone provides a nice UI for
 user management.


Fair enough.

 --jcc

 --
 Building Websites with Plone
 http://plonebook.packtpub.com/

 Enfold Systems, LLC
 http://www.enfoldsystems.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] Help with a simple DMS

2006-02-07 Thread J Cameron Cooper

Joshua Gilbert wrote:

On 2/7/06, J Cameron Cooper [EMAIL PROTECTED] wrote:


Joshua Gilbert wrote:


Hi.

I'd like to make a simple DMS, users upload their
PDFs/docs/ps/whatever and then they can search within the documents.


I believe TextIndexNG will index contents of complex file types.


OK, that's great. Where do I find documentation to tell me how to set
up the site?


According to http://opensource.zopyx.biz/OpenSource/TextIndexNG3

Ready-for-Plone (refer to installation notes in doc/README.txt)


I need to be able to automate the submission of documents as I'm part
of a large research lab, we've accumulated a lot of papers over the
years.


What exactly does automate the submission of documents mean?


I mean that I have a great deal of papers. I can't go through web
forms to add all of these documents. I would like to be able to submit
them through an automated process, I can't go through web forms by
hand to add them all.

I'm trying to convince my lab that this is a useful product. If I ask
them to submit their papers one at a time I'll lose the argument and
we won't use Zope.


Use WebDAV, FTP, or Enfold Desktop. There are other methods, but these 
are easiest.


--jcc
--
Building Websites with Plone
http://plonebook.packtpub.com/

Enfold Systems, LLC
http://www.enfoldsystems.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] Help me!

2006-01-13 Thread Dieter Maurer
Bruno Grampa wrote at 2006-1-9 23:39 +0100:
i'm building a site to sell images (this is the concept, the reality is
different...).
All the images are in a directory mapped through LocalFS product.
For every image i have a record in a SQL table with all the basic
informations: author, name of the file, cost.

What i haven't understood is how to block users from getting images if
they have not enough credit to buy them.

You drastically restrict access to the LocalFS content (e.g. by
granting the Access contents information and View permissions
only for Manager) and provide access to it via a Python Script
with proxy role Manager.
This script can check any conditions you would like to be fulfilled
before it grants access.


-- 
Dieter
___
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] Help me!

2006-01-09 Thread David H

Bruno Grampa wrote:


Hello,
i'm building a site to sell images (this is the concept, the reality is
different...).
All the images are in a directory mapped through LocalFS product.
For every image i have a record in a SQL table with all the basic
informations: author, name of the file, cost.

What i haven't understood is how to block users from getting images if
they have not enough credit to buy them.
I need to control the view method, but i don't know if this idea is the
right one or there are better solutions.

Any hints?

Thanks,
   Bruno





Bruno,

Maybe you can better explain your question. Im not at all sure the 
following will help:


Seems like you can check a users credit at login, store the credit score 
in SESSION and use that for branching logic.  You could also update the 
creditScore as it changes.


Then you can develope your pages with stuff like this:  (syntax not checked)

in TAL

a hRef=somewhere tal:condition=python:  
request.SESSION['hasCredit'];This link only shows up if session's 
'hasCredit' is true./a


In DTML

dtml-if SESSION['hasCredit']
a hRef=somewhere ...
dtml-else
 hRef=somewhereelse

In Python: (and TAL macros)

  if context.REQUEST.SESSION['hasCredit']:
return container.Images.macros['allImages']  
  else
return container.Images.macros['someImages']  


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] Help me!

2006-01-09 Thread Andreas Jung



--On 9. Januar 2006 16:04:28 -0800 David H [EMAIL PROTECTED] wrote:


Maybe you can better explain your question.


...especially with such a sense-free subject as Help me.

-aj

pgpWZTTahPYXo.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 )


Re: [Zope] Help with Zope Python result object please!

2005-12-30 Thread David H




Alric Aneron wrote:
hello,
I have a python code that recieves two result objects from two
different ZSQL methods. I need to join them (sort of like UNION).
I can't do result1+result2, otherwise it raises an exception that the +
operator isn't supported.
When I try to do this (read below, I explained what i've done if you
are lazy to read the code)
result1 = context.zsqlmethod1()
result2 = context.zsqlmethod2()
if (len(result1) == 0):
 return result2
row1 = 0
row2 = len(result1) + 1
col = 0
for r in result2:
 col = 0
 if (context.duplicateExists(result1, result2[row1][0]) == -1):
 result1[row2][col] = result2[row][col]
 col = col + 1
 row1 = row1 + 1
 row2 = row2 + 1
  
return result1
  
Basically, it loops through the rows and columns of result2 and adds
them to the end of th e result 1. However it for some reason raises
"index out of range" and says that assigning
result1[0][0]=result2[0][0] (if there is an element in both of them) is
illegal because:
  Error Value: object does not support item or slice assignment
  I realize that in most programming languages you can't add
them to result1 without resizing it first, but I can't find much
documentaiton on member functions of the result object, so I can't
resize it. 
I am completely stuck, I've tried everything, spent so much time on it,
can anyone please help save my sanity :P
  
Thanks in advance guys! I really appreciate it.
   
   Y
Alric,
The merging of two zsql result sets is easy - here's one way:
newResults = []

for r in resultset1:
 newResults.append( r )

for r in resultset2:
 newResults.append( r )

return newResults.

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] Help with Zope Python result object please!

2005-12-30 Thread Alric Aneron
Thank you sir! Sorry, I am very new to python. It's quite unlike other languages.  Happy new year! AlDavid H [EMAIL PROTECTED] wrote:Alric Aneron wrote: hello, I have a python code that recieves two result objects from two different ZSQL methods. I need to join them (sort of like UNION). I can't do result1+result2, otherwise it raises an exception that the + operator isn't supported. When I try to do this (read below, I explained what i've done if you are lazy to read the code) result1 = context.zsqlmethod1() result2 = context.zsqlmethod2() if (len(result1) == 0):  return resu
 lt2
 row1 = 0 row2 = len(result1) + 1 col = 0 for r in result2:  col = 0  if (context.duplicateExists(result1, result2[row1][0]) == -1):  result1[row2][col] = result2[row][col]  col = col + 1  row1 = row1 + 1  row2 = row2 + 1return result1Basically, it loops through the rows and columns of result2 and adds them to the end of th e result 1. However it for some reason raises "index out of range" and says that assigning result1[0][0]=result2[0][0] (if there is an element in both of them) is illegal because:   Error Value: object does not support item or slice assignment   I realize that in most programming languages you can't add them to result1 without resizing it first, but I can't find much documentaiton on member functions of the result object, so I can't resize it.
   I
 am completely stuck, I've tried everything, spent so much time on it, can anyone please help save my sanity :PThanks in advance guys! I really appreciate it.Y Alric, The merging of two zsql result sets is easy - here's one way: newResults = []  for r in resultset1:  newResults.append( r )  for r in resultset2:  newResults.append( r )  return newResults.  David  
		Yahoo! Photos 
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.___
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] help with url rewriting

2005-11-15 Thread Chris Withers

Faheem Mitha wrote:


Turns out the problem was indeed with the Proxy, I had to change to
Allow from all inside the proxy.conf, to enable reverse proxying.

  Order deny,allow
#Deny from all
#Allow from .your_domain.com
Allow from all


I'm not sure an open proxy is that hot an idea, but this has nothing to 
do with Zope. I suggest you go and ask on #apache on irc.freenode.net



1) I can still access my plone site unauthenticated via
http://machine_address:9673/test_plone.


Again, nothing to do with Zope. iptables is the way to go, and I bet £5 
you lock yourself out of your machine within 2 hrs of playing with this ;-)


Go to #debian on irc.freenode.net and wear flameproof clothing ;-)

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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] help with url rewriting

2005-11-12 Thread Tino Wildenhain
Am Freitag, den 11.11.2005, 23:45 -0500 schrieb Faheem Mitha:
 
 On Fri, 11 Nov 2005, Faheem Mitha wrote:
 
 
...
 The main error is
 
 [Fri Nov 11 18:51:56 2005] [error] [client client_ip_address] 
 client denied by server configuration:
  ^^
This means Apache, not Zope

 proxy:http://127.0.0.1:9673/VirtualHostBase/https/server_ip_address:443/test_plone/VirtualHostRoot/_vh_test_plone/colophon_anybrowser.png,
 referer: 
 http://server_ip_address:9673/VirtualHostBase/https/server_ip_address:443/test_plone/VirtualHostRoot/_vh_test_plone
 
 5) Here are the mods I have enabled.
...
   Alias /doc/ /usr/share/doc/
  Directory /usr/share/doc/
   Options Indexes MultiViews FollowSymLinks
   AllowOverride None
   Order deny,allow
   Deny from all
  ^ --- and here
   Allow from 127.0.0.0/255.0.0.0 ::1/128
  ^ --- and here

   /Directory

is the Problem. The example config needs
to be changed to allow serving - this is
true for static content as well as using
mod_proxy.

HTH
Tino

___
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] help with url rewriting

2005-11-12 Thread Faheem Mitha



On Sat, 12 Nov 2005, Tino Wildenhain wrote:

[snip]

5) Here are the mods I have enabled.

...

Alias /doc/ /usr/share/doc/
 Directory /usr/share/doc/
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all

 ^ --- and here

Allow from 127.0.0.0/255.0.0.0 ::1/128

 ^ --- and here


/Directory


is the Problem. The example config needs
to be changed to allow serving - this is
true for static content as well as using
mod_proxy.


I'm sorry. I don't follow what you mean. Can you be more explicit?

The web server is working fine for regular web pages, both SSL and 
non-SSL.


Thanks.Faheem.
___
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] help with url rewriting

2005-11-12 Thread Tino Wildenhain
Am Samstag, den 12.11.2005, 03:26 -0500 schrieb Faheem Mitha:
 
 On Sat, 12 Nov 2005, Tino Wildenhain wrote:
 
 [snip]
  5) Here are the mods I have enabled.
  ...
 Alias /doc/ /usr/share/doc/
   Directory /usr/share/doc/
 Options Indexes MultiViews FollowSymLinks
 AllowOverride None
 Order deny,allow
 Deny from all
   ^ --- and here
 Allow from 127.0.0.0/255.0.0.0 ::1/128
   ^ --- and here
 
 /Directory
 
  is the Problem. The example config needs
  to be changed to allow serving - this is
  true for static content as well as using
  mod_proxy.
 
 I'm sorry. I don't follow what you mean. Can you be more explicit?
 
 The web server is working fine for regular web pages, both SSL and 
 non-SSL.

Which pages beside the introductional page and the
docs? And are you sure you want to access
your Plone via 

http://yourserver/plone/ 

instead of

http://yourserver/ ?

Regards
Tino 

___
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] help with url rewriting

2005-11-12 Thread Faheem Mitha



On Sat, 12 Nov 2005, Tino Wildenhain wrote:


Am Samstag, den 12.11.2005, 03:26 -0500 schrieb Faheem Mitha:



Which pages beside the introductional page and the
docs?


The pages in the Document Root work fine. That is, the pages at
http://yourserver, which correspond to /var/www/html and
https://yourserver, which correspond to /var/www/html-ssl.

I have a config file called default, which is exactly like the ssl
config file, except for being for port 80, and not having the Zope
stuff in it. I can mail that if you want.

And are you sure you want to access

your Plone via

http://yourserver/plone/
instead of

http://yourserver/ ?


Yes. Well, https://yourserver/plone.

Thanks for your help.
 Faheem.
___
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] help with url rewriting

2005-11-12 Thread Faheem Mitha



On Fri, 11 Nov 2005, Faheem Mitha wrote:

6) I was wondering if there might be something wrong with the Proxy thing. 
I've kept proxy.conf at the Debian defaults. Included below.


In particular ProxyRequest are off, but another Debian machine I have access 
to works fine with that setting.


Turns out the problem was indeed with the Proxy, I had to change to
Allow from all inside the proxy.conf, to enable reverse proxying.

  Order deny,allow
#Deny from all
#Allow from .your_domain.com
Allow from all
/Proxy

I've now got a further question, in case anyone feels like indulging me.

1) I can still access my plone site unauthenticated via
http://machine_address:9673/test_plone.

What is the best way to switch that off so it can only be accessed via the 
https interface?


Thanks. Faheem.
___
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] help with url rewriting

2005-11-11 Thread Chris Withers

Faheem Mitha wrote:

Why not just:

/plone(.*)


This is the way to go, I don't know what Sascha meant when he was 
talking about 2 rules.


However, he did have a very good point about SSL. If you want Apache to 
do the SSL encryption and decryption, then you need to set up mod_ssl, 
sort out the certificates, etc. I have this working on a few of my 
servers but I'm working offline so can't really have a look to see what 
you're doing wrong...


cheers,

Chris

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

___
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] help with url rewriting

2005-11-11 Thread Faheem Mitha



On Fri, 11 Nov 2005, Chris Withers wrote:


Faheem Mitha wrote:

Why not just:

/plone(.*)


This is the way to go, I don't know what Sascha meant when he was talking 
about 2 rules.


However, he did have a very good point about SSL. If you want Apache to 
do the SSL encryption and decryption, then you need to set up mod_ssl, 
sort out the certificates, etc. I have this working on a few of my 
servers but I'm working offline so can't really have a look to see what 
you're doing wrong...


Yes, at least part of the problem is that I did not have SSL set up 
correctly, and I certainly didn't have certificates etc. I've done that 
now, so I'll try the Plone thing again.


Sorry for my ignorance.Faheem.
___
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] help with url rewriting

2005-11-11 Thread Faheem Mitha



On Fri, 11 Nov 2005, Faheem Mitha wrote:




On Fri, 11 Nov 2005, Chris Withers wrote:


Faheem Mitha wrote:

Why not just:

/plone(.*)


This is the way to go, I don't know what Sascha meant when he was talking 
about 2 rules.


However, he did have a very good point about SSL. If you want Apache to do 
the SSL encryption and decryption, then you need to set up mod_ssl, sort 
out the certificates, etc. I have this working on a few of my servers but 
I'm working offline so can't really have a look to see what you're doing 
wrong...


Yes, at least part of the problem is that I did not have SSL set up 
correctly, and I certainly didn't have certificates etc. I've done that now, 
so I'll try the Plone thing again.


Ok. I've now configured SSL correctly on my test machine, but am still 
getting errors. I suspect this is an apache misconfiguration, which is 
puzzling, since I have acess to a machine doing very similar things, also 
running Debian sarge, which is working.


I'll list misc bits of info below, in the hope that this will help to 
narrow the problem. I'll also list the ssl config portion of my apache 
file at the bottom of this message for good measure.


1) Firstly, SSL is now working, certificates are offered and accepted, 
yada yada.


2) I can acess the page at

http://127.0.0.1:9673/VirtualHostBase/https/%{HTTP_HOST}:443/test_plone/VirtualHostRoot/_vh_test_\plone$1 
[L,P]


fine, where I have to replace 127.0.0.1 with the IP address of the machine 
in question. This means the Virtual Host Monster is working correctly, 
right?


3) The rewriting is actually happening, because the rewriting log shows

**
client_ip_address - - [11/Nov/2005:18:51:56 --0500] 
[server_ip_address/sid#81565f0][rid#81ce540/initial] (2) 
init rewrite engine with requested uri /test_plone/colophon_xhtml.png
client_ip_address - - [11/Nov/2005:18:51:56 --0500] 
[server_ip_address/sid#81565f0][rid#81ce540/initial] (3) 
applying pattern '^/test_plone(.*)' to uri 
'/test_plone/colophon_xhtml.png'
client_ip_address - - [11/Nov/2005:18:51:56 --0500] 
[server_ip_address/sid#81565f0][rid#81ce540/initial] (2) 
rewrite /test_plone/colophon_xhtml.png - 
http://127.0.0.1:9673/VirtualHostBase/https/server_ip_address:443/test_plone/VirtualHostRoot/_vh_test_plone/colophon_xhtml.png
client_ip_address - - [11/Nov/2005:18:51:56 --0500] 
[server_ip_address/sid#81565f0][rid#81ce540/initial] (2) 
forcing proxy-throughput with 
http://127.0.0.1:9673/VirtualHostBase/https/server_ip_address:443/test_plone/VirtualHostRoot/_vh_test_plone/colophon_xhtml.png
client_ip_address - - [11/Nov/2005:18:51:56 --0500] 
[server_ip_address/sid#81565f0][rid#81ce540/initial] (1) 
go-ahead with proxy request 
proxy:http://127.0.0.1:9673/VirtualHostBase/https/server_ip_address:443/test_plone/VirtualHostRoot/_vh_test_plone/colophon_xhtml.png 
[OK]

***

This all looks pretty normal.

4) The error log is fairly unhelpful. Setting LogLevel to debug does
not seem to give any helpful information.

The main error is

[Fri Nov 11 18:51:56 2005] [error] [client client_ip_address] client denied by 
server configuration:
proxy:http://127.0.0.1:9673/VirtualHostBase/https/server_ip_address:443/test_plone/VirtualHostRoot/_vh_test_plone/colophon_anybrowser.png,
referer: 
http://server_ip_address:9673/VirtualHostBase/https/server_ip_address:443/test_plone/VirtualHostRoot/_vh_test_plone

5) Here are the mods I have enabled.

/etc/apache2/mods-enabled# ls -la

drwxr-xr-x   3 root root 4096 2005-11-11 17:21 .
drwxr-xr-x  10 root root 4096 2005-11-11 15:45 ..
lrwxrwxrwx   1 root root   37 2005-11-10 16:52 cgid.conf - 
/etc/apache2/mods-available/cgid.conf
lrwxrwxrwx   1 root root   37 2005-11-10 16:52 cgid.load - 
/etc/apache2/mods-available/cgid.load
lrwxrwxrwx   1 root root   28 2005-11-11 17:21 proxy.conf - 
../mods-available/proxy.conf
lrwxrwxrwx   1 root root   28 2005-11-11 17:21 proxy.load - 
../mods-available/proxy.load
lrwxrwxrwx   1 root root   30 2005-11-11 17:19 rewrite.load - 
../mods-available/rewrite.load
lrwxrwxrwx   1 root root   26 2005-11-10 21:21 ssl.conf - 
../mods-available/ssl.conf
lrwxrwxrwx   1 root root   26 2005-11-10 21:21 ssl.load - 
../mods-available/ssl.load
lrwxrwxrwx   1 root root   40 2005-11-10 16:52 userdir.conf - 
/etc/apache2/mods-available/userdir.conf
lrwxrwxrwx   1 root root   40 2005-11-10 16:52 userdir.load - 
/etc/apache2/mods-available/userdir.load

These are included via the main config file.

6) I was wondering if there might be something wrong with the Proxy thing. 
I've kept proxy.conf at the Debian defaults. Included below.


In particular ProxyRequest are off, but another Debian machine I have 
access to works fine with that setting.


Thanks in advance for your help.

   Faheem.

Re: [Zope] help with url rewriting

2005-11-10 Thread Sascha Welter
(Wed, Nov 09, 2005 at 10:41:32AM -0500) [EMAIL PROTECTED] wrote/schrieb/egrapse:
 From: Faheem Mitha [EMAIL PROTECTED]
 ...
 I running Apache 2.0 and Zope 2.7 on Debian Sarge. I've configured a zope 
 (Plone) instance located /var/lib/zope2.7/instance/dulci.
 
 This can be accessed via 
 http://machine_address:9673/dulci. 9673 is the 
 ^^
 http

 point on which Zope runs on Debian.
 
 I'm trying to configure Apache so that all requests of the form
 
 http://machine_address/plone are sent to
 
 https://machine_address:9673/dulci
 ^^
 https

http != https
Zope is unlikely to understand the rewritten URL with that https I would
say. I don't understand why you try to access Zope with SSL/https, plain
Zope does not understand that protocol.

If you try to use apache to do SSL for Zope, you will need it the other
way around. 

And to force connections to go through SSL, you will need a rewriterule
to redirect (either for all URLs or for /manage URLs) or some fancier
Plone setup (which I never figured out).

 and that the urls returned by Plone are consistent.
 
 I added the following lines to my Apache config, representing my best 
 guess as to how this should work. 

I don't know about the problems that Chris found with your RewriteRule,
but I stopped worrying, since I can always go to the witch and get a
usefull RewriteRule for most setups (if I might say so myself :-)
http://betabug.ch/zope/witch

 The rewriting seems to work, since when 
 I go to
 
 http://machine_address/plone
 
 the log says
 
 [Wed Nov 09 03:30:26 2005] [error] [client ...] client denied by 
 server configuration: 
 proxy:http://127.0.0.1:9673/VirtualHostBase/https/machine_address:443/dulci/VirtualHostRoot/_vh_plone
 
 However, something must be broken.

 ...

RewriteRule ^/plone(/.*)?$ 
 http://127.0.0.1:9673/VirtualHostBase/https/%{HTTP_HOST}:443/dulci/VirtualHostRoot/_vh_plone$1
  [L,P]

As for the question mark, I guess you are trying to get in one rule what
most people (and the witch) do in two rules: Cover the case where
/plone ends the URL, as well the case where something comes behind
/plone. Regular expressions are tricky with that stuff, so it's better
to use 2 rules and be covered.

Googling for [zope apache rewriterule], the ZopeWiki page
(http://zopewiki.org/ZopeAndApache) comes on the first result page,
while the witch is currently on the second page. The help page from the
VHM is also very informative.

Regards,

Sascha

___
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] help with url rewriting

2005-11-10 Thread Faheem Mitha



On Wed, 9 Nov 2005, Chris Withers wrote:


Faheem Mitha wrote:


the log says

[Wed Nov 09 03:30:26 2005] [error] [client ...] client denied by server 
configuration: 


This means you likely need to find something else in your apache.conf that's 
causing this problem...



  RewriteRule ^/plone(/.*)?$ 


That's odd..

Why not just:

/plone(.*)

?

This might actually be your problem, since that question mark means that $1 
might not exist for:


http://127.0.0.1:9673/VirtualHostBase/https/%{HTTP_HOST}:443/dulci/VirtualHostRoot/_vh_plone$1 
[L,P]


I tried

RewriteRule ^/plone(.*) 
http://127.0.0.1:9673/VirtualHostBase/https/%{HTTP_HOST}:443/dulci/VirtualHostRoot/_vh_plone$1
 [L,P]

This does not make any difference. Does this line, and the rest of the 
config stuff otherwise look Ok?


Any idea what I might be looking for in the configuration? I'm mostly 
using the Debian defaults.


Do I correctly understand that this rule will encrypt traffic sent to the 
Zope instance, and coming out? That is the intention.


Thanks in advance.
 Faheem.
___
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] help with url rewriting

2005-11-09 Thread Chris Withers

Faheem Mitha wrote:


the log says

[Wed Nov 09 03:30:26 2005] [error] [client ...] client denied by server 
configuration: 


This means you likely need to find something else in your apache.conf 
that's causing this problem...



  RewriteRule ^/plone(/.*)?$ 


That's odd..

Why not just:

/plone(.*)

?

This might actually be your problem, since that question mark means that 
$1 might not exist for:


http://127.0.0.1:9673/VirtualHostBase/https/%{HTTP_HOST}:443/dulci/VirtualHostRoot/_vh_plone$1 
[L,P]


cheers,

Chris

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

___
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] help - my zope build exits with compile errors :-(

2005-10-27 Thread Jens Vagelpohl


On 27 Oct 2005, at 21:26, Thomas Wolf wrote:

P.S. I'm trying to build this under Solaris 9 using gcc 3.3.2.


Solaris, there's your problem.

First of all, use GNU tar for unpacking the tarball. The standard  
Solaris tar is buggy.


Second of all, don't expect any good performance on Solaris. There's  
nothing you can do to alleviate that problem, apart from using a more  
suitable OS, such as Linux.


jens

___
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] help - my zope build exits with compile errors :-(

2005-10-27 Thread Thomas Wolf
Thanks a bunch Jens!  It was the buggy tar that got me :-(  Now that I think 
about it, I did see a blurb
about avoiding solaris' tar - just thought that I'd give it a try and since I 
didn't see any error messages,

I figured it succeeded...that was stupid.

Anyway, it builds now.  Many thanks again.
tom


Jens Vagelpohl wrote:


On 27 Oct 2005, at 21:26, Thomas Wolf wrote:


P.S. I'm trying to build this under Solaris 9 using gcc 3.3.2.



Solaris, there's your problem.

First of all, use GNU tar for unpacking the tarball. The standard  
Solaris tar is buggy.


Second of all, don't expect any good performance on Solaris. There's  
nothing you can do to alleviate that problem, apart from using a more  
suitable OS, such as Linux.


jens

___
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] help - my zope build exits with compile errors :-(

2005-10-27 Thread David H

Thomas Wolf wrote:


Hi,

 I'm trying to build Zope-2.7.4-0 from source (I can't use a different 
version because of the releas of Plone we're

using.)  I ran
./configure --with-python=/usr/local/zope/python/bin/python 
--prefix=/usr/local/zope
and that reported no issues.  BTW, I'm using python 2.3.5 - that's why 
I had to use the --use-python argument.


Then I ran make.  No reported problems for quite a bit into the build 
- then I get:


gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes 
-fPIC -I/usr/local/zope/python/include/python2.3 -c 
Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.c 
-o 
/usr/local/zope/Zope-2.7.4-0/build-base/python-2.3/build-temp/Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.o 

gcc: 
Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.c: 
No such file or directory

gcc: no input files

Sure enough, there's no ISO_8859_1_Splitter.c file - but I haven't got 
a clue why not.  IS this generated by an earlier
part of the build and just didn't?  Or was there something missing 
from the tar ball (I got it off www.zope.org!)


Any help/suggestion would be much appreciated,
Tom

P.S. I'm trying to build this under Solaris 9 using gcc 3.3.2.


Thomas,

I seem to recall something like this.  I think the path + file name for 
sISO_8859_1_Splitter.o is *too long* for the extractor.


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] help - my zope build exits with compile errors :-(

2005-10-27 Thread Chris McDonough

Use gnutar to unpack the Zope source tarball.

On Oct 27, 2005, at 4:50 PM, David H wrote:


Thomas Wolf wrote:



Hi,

 I'm trying to build Zope-2.7.4-0 from source (I can't use a  
different version because of the releas of Plone we're

using.)  I ran
./configure --with-python=/usr/local/zope/python/bin/python -- 
prefix=/usr/local/zope
and that reported no issues.  BTW, I'm using python 2.3.5 - that's  
why I had to use the --use-python argument.


Then I ran make.  No reported problems for quite a bit into the  
build - then I get:


gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes  
-fPIC -I/usr/local/zope/python/include/python2.3 -c Products/ 
PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/src/ 
ISO_8859_1_Splitter.c -o /usr/local/zope/Zope-2.7.4-0/build-base/ 
python-2.3/build-temp/Products/PluginIndexes/TextIndex/Splitter/ 
ISO_8859_1_Splitter/src/ISO_8859_1_Splitter.o
gcc: Products/PluginIndexes/TextIndex/Splitter/ISO_8859_1_Splitter/ 
src/ISO_8859_1_Splitter.c: No such file or directory

gcc: no input files

Sure enough, there's no ISO_8859_1_Splitter.c file - but I haven't  
got a clue why not.  IS this generated by an earlier
part of the build and just didn't?  Or was there something missing  
from the tar ball (I got it off www.zope.org!)


Any help/suggestion would be much appreciated,
Tom

P.S. I'm trying to build this under Solaris 9 using gcc 3.3.2.



Thomas,

I seem to recall something like this.  I think the path + file name  
for sISO_8859_1_Splitter.o is *too long* for the extractor.


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] help with MailTemplates 1.0.0

2005-10-13 Thread Chris Withers

Nicolas Georgakopoulos wrote:
I make it work , the fist time I try to use it I had copied my Mailhost 
object from another folder and it wasn't working. I delete it and create 
another one with a different name. When I go to the MailTemplate object 
to chooses my new MailHost it was already selected but still not 
working. 


Yes, this is annoying and slightly confusing, I've made a note on the 
revelent issue:


https://secure.simplistix.co.uk/support/issue181

Trying to execute the attachment example , you forgot to put ' ' on the 
second mail address  line: mto=('[EMAIL PROTECTED]',[EMAIL PROTECTED]),


Oops, thanks for finding that, I've fixed that for the next release.


And to send the attachment I get another error:
strongError Type: Unauthorized/strongbr/
 strongError Value: You are not allowed to access 'add_file' in this 
context/strongbr/


The user executing the python script that calls add_file needs to have 
the 'Use mailhost services' permission, did they?
Shane Hathaway's VerboseSecurity product may help you figure out what's 
going on...


- __traceback_info__: {'path': ['message'], 
'TraversalRequestNameStack': []}

KeyError: 'message'


Yes, well, see my other reply about this...

PS: The test mail I received on the first simple example,  the part  a 
href=tal:define=url root/absolute_url tal:attributes=href url 
tal:content=url/ doesn't render right , it actually show in the body 
of my message mail  like --  your interest in: a 
href=http://localhost:8080; 
http://localhost:8080/http://localhost:8080 http://localhost:8080//a


Oops, another example corrected, the source should read:

tal:body xmlns:tal=http://xml.zope.org/namespaces/tal;
  xmlns:metal=http://xml.zope.org/namespaces/metal;
Dear tal:x replace=options/mto/,

tal:x replace=user/getId/ would like to thank you for your interest in:
tal:x replace=root/absolute_url/

tal:x replace=options/message/

cheers,

The Web Team
/tal:body

cheers,

Chris - who does appreciate all the testing you're doing :-)

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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] help with MailTemplates 1.0.0

2005-10-13 Thread Nicolas Georgakopoulos

Chris Withers wrote:


And to send the attachment I get another error:
strongError Type: Unauthorized/strongbr/
 strongError Value: You are not allowed to access 'add_file' in 
this context/strongbr/


The user executing the python script that calls add_file needs to have 
the 'Use mailhost services' permission, did they?
Shane Hathaway's VerboseSecurity product may help you figure out 
what's going on...


Why should I use this product? I'm a Manager user and I have permission 
in the current folder where the object's is to Use MailHost Services , 
Add Documents, Images, and Files 
http://localhost:8080/AtestFordelete/attachment_test/manage_permissionForm?permission_to_manage=Add%20Documents%2C%20Images%2C%20and%20Files 
and Change Images and Files 
http://localhost:8080/AtestFordelete/attachment_test/manage_permissionForm?permission_to_manage=Change%20Images%20and%20Files

I change the python script code to :
 
from email.MIMEBase import MIMEBase

msg=container.my_mt.as_message(
 mfrom='[EMAIL PROTECTED]',
 mto='[EMAIL PROTECTED]',
 message='This is a test!',
 subject='Attempt 100 !')
msg.send()

*have removed the -msg.add_file(container['myfile.bin']) and Zope 
prompts for user name and password. Whatever I write (correct login or 
not) it keeps prompting the same.

If  I choose cancel your product show me the current message:

strongError Type: Unauthorized/strongbr/
strongError Value: You are not allowed to access 'send' in this 
context/strongbr/


No error is reported in the error log...


___
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] help with MailTemplates 1.0.0

2005-10-12 Thread Nicolas Georgakopoulos

Chris Withers wrote:


Nicolas Georgakopoulos wrote:

Whatever you have selected is resolving to a string instead of a 
MailHost object :-S



I have selected a Zope mailhost object



Please explain exactly what you did, including how you create the 
MailHost, the Mail Template and the Python Script, in detail...


I just tried to reproduce this on a fresh Zope 2.8.1 instance and 
couldn't...


Using the first example, the mail rendered and sent just fine.

I'm still far from convinced the thing you think is a MailHost object 
is actually a MailHost object, did you perhaps delete or rename your 
MailHost object?


Chris

I make it work , the fist time I try to use it I had copied my Mailhost 
object from another folder and it wasn't working. I delete it and create 
another one with a different name. When I go to the MailTemplate object 
to chooses my new MailHost it was already selected but still not 
working. The problem was solved when I push the save button any way and 
it works ...


Trying to execute the attachment example , you forgot to put ' ' on the 
second mail address  line: mto=('[EMAIL PROTECTED]',[EMAIL PROTECTED]),

And to send the attachment I get another error:
strongError Type: Unauthorized/strongbr/
 strongError Value: You are not allowed to access 'add_file' in this 
context/strongbr/


and the traceback:

Traceback (innermost last):
   Module ZPublisher.Publish, line 113, in publish
   Module ZPublisher.mapply, line 88, in mapply
   Module ZPublisher.Publish, line 40, in call_object
 Module Shared.DC.Scripts.Bindings, line 311, in __call__
 Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
 Module Products.PageTemplates.ZopePageTemplate, line 256, in _exec
 Module Products.PageTemplates.PageTemplate, line 102, in pt_render
- ZopePageTemplate at /AtestFordelete/tt
   Module TAL.TALInterpreter, line 206, in __call__
   Module TAL.TALInterpreter, line 250, in interpret
   Module TAL.TALInterpreter, line 426, in do_optTag_tal
   Module TAL.TALInterpreter, line 411, in do_optTag
   Module TAL.TALInterpreter, line 406, in no_tag
   Module TAL.TALInterpreter, line 250, in interpret
   Module TAL.TALInterpreter, line 501, in do_insertText_tal
   Module Products.PageTemplates.TALES, line 227, in evaluateText
 Module Products.PageTemplates.TALES, line 221, in evaluate
- URL: /AtestFordelete/tt
  - Line 12, Column 6
  - Expression: standard:'options/message'
  - Names:
   {'container': Folder at /AtestFordelete,
'context': Folder at /AtestFordelete,
  'default': Products.PageTemplates.TALES.Default instance at 0x01152AF8,
'here': Folder at /AtestFordelete,
  'loop': Products.PageTemplates.TALES.SafeMapping object at 0x01FC2990,
  'modules': Products.PageTemplates.ZRPythonExpr._SecureModuleImporter 
instance at 0x0112DD50,
  'nothing': None,
'options': {'args': ()},
  'repeat': Products.PageTemplates.TALES.SafeMapping object at 0x01FC2990,
'request': HTTPRequest, URL=http://localhost:8080/AtestFordelete/tt,
  'root': Application at ,
'template': ZopePageTemplate at /AtestFordelete/tt,
  'traverse_subpath': [],
  'user': admin}
 Module Products.PageTemplates.Expressions, line 183, in __call__
 Module Products.PageTemplates.Expressions, line 171, in _eval
 Module Products.PageTemplates.Expressions, line 127, in _eval
  - __traceback_info__: options
   Module Products.PageTemplates.Expressions, line 306, in restrictedTraverse
- __traceback_info__: {'path': ['message'], 'TraversalRequestNameStack': []}
KeyError: 'message'

I had change all my security options in the folder that I'm using the example 
objects (checked all the boxes on the Manager colum).
Am I doing something wrong?

PS: The test mail I received on the first simple example,  the part  a 
href=tal:define=url root/absolute_url tal:attributes=href url 
tal:content=url/ doesn't render right , it actually show in the body 
of my message mail  like --  your interest in: a 
href=http://localhost:8080; 
http://localhost:8080/http://localhost:8080 http://localhost:8080//a


Cheers..
___
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] help with MailTemplates 1.0.0

2005-10-11 Thread Chris Withers

Nicolas Georgakopoulos wrote:
I installed the MailTemplates product to Zope and try to run the example 
from the readme file:

--
Simple Example
 This example sends a simple templated mail to a specific
 address.
 Add the following to a Mail Template called my_mt:

 tal:body xmlns:tal=http://xml.zope.org/namespaces/tal;
 xmlns:metal=http://xml.zope.org/namespaces/metal;
 Dear tal:x replace=options/mto/,

 tal:x replace=user/getId/ would like to thank you for
 your interest in:
 a href=
tal:define=url root/absolute_url
tal:attributes=href url
tal:content=url/

 tal:x replace=option/message/


d'oh, that's a typo ;-)

tal:x replace=options/message/

I'll go and correct that in svn now :-)

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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] help with MailTemplates 1.0.0

2005-10-11 Thread Chris Withers

(for the 2nd time, please keep this on the list...)
(just for the light on thinking, that means hit reply all or make 
sure zope@zope.org is in the cc list)


Nicolas Georgakopoulos wrote:
Your documentation have anothe problem , you forgot to set a subject in 
your example :(


Oh dear, yes, I remember, I recently made subject required :-S
I'll have to fix that soon...


After I set a subject it say's :

strongError Type: AttributeError/strongbr/
strongError Value: 'str' object has no attribute '_send'/strongbr/
I don't know how to setup the _send attribute


Yes, and? Where's the rest of the traceback? I can't help you without it..

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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] help with MailTemplates 1.0.0

2005-10-11 Thread Chris Withers

(sheesh, what is it with people, is 'reply all' that hard to find? ;-)

Tino Wildenhain wrote:

tal:x replace=options/message/


*yuck* tal to render plain text. Now thats ugly ;)


Suggest something better...

I find it convenient, especially for generating html mail, which 
customer have a habit of liking ;-)


On the development front, the fewer languages anyone needs to know to do 
development, the better. TAL/TALES works just as well here...


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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] help with MailTemplates 1.0.0

2005-10-11 Thread Nicolas Georgakopoulos

Chris Withers wrote:


(for the 2nd time, please keep this on the list...)
(just for the light on thinking, that means hit reply all or make 
sure zope@zope.org is in the cc list)


Sorry for that , it was on purpose.. I'm new to Zope and thought that it 
wasn't right to bother the rest of the list with my beginner problem...



Nicolas Georgakopoulos wrote:

Your documentation have anothe problem , you forgot to set a subject 
in your example :(



Oh dear, yes, I remember, I recently made subject required :-S
I'll have to fix that soon...


After I set a subject it say's :

strongError Type: AttributeError/strongbr/
strongError Value: 'str' object has no attribute '_send'/strongbr/
I don't know how to setup the _send attribute



Yes, and? Where's the rest of the traceback? I can't help you without 
it..


cheers,

Chris


Traceback (innermost last):

 Module ZPublisher.Publish, line 113, in publish
 Module ZPublisher.mapply, line 88, in mapply
 Module ZPublisher.Publish, line 40, in call_object
 Module Shared.DC.Scripts.Bindings, line 311, in __call__
 Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
 Module Products.PythonScripts.PythonScript, line 323, in _exec
 Module None, line 1, in mailAction.py
  - PythonScript at /testFordelete/mailAction.py
  - Line 1
 Module Products.MailTemplates.BaseMailTemplate, line 117, in send
 Module Products.MailTemplates.BaseMailTemplate, line 107, in _send
AttributeError: 'str' object has no attribute '_send'

Thank's for your help, looking forward to test your product tomorrow ;) (don't 
have more time for today)

___
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] help with MailTemplates 1.0.0

2005-10-11 Thread Chris Withers

Nicolas Georgakopoulos wrote:


Sorry for that , it was on purpose.. I'm new to Zope and thought that it 
wasn't right to bother the rest of the list with my beginner problem...


The opposite is true.. by keeping this on the list, not only can other 
people help out, but other people can learn, and this becomes a resource 
for others once archived by google and gmane ;-)



 Module Products.MailTemplates.BaseMailTemplate, line 117, in send
 Module Products.MailTemplates.BaseMailTemplate, line 107, in _send
AttributeError: 'str' object has no attribute '_send'


Hmmm, what have you selected in the MailHost drop-down on the Mail 
Template's edit page?


Whatever you have selected is resolving to a string instead of a 
MailHost object :-S


cheers,

Chris

PS: What Zope version are you using?

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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] help with MailTemplates 1.0.0

2005-10-11 Thread Nicolas Georgakopoulos

Chris Withers wrote:


Nicolas Georgakopoulos wrote:



Sorry for that , it was on purpose.. I'm new to Zope and thought that 
it wasn't right to bother the rest of the list with my beginner 
problem...



The opposite is true.. by keeping this on the list, not only can other 
people help out, but other people can learn, and this becomes a 
resource for others once archived by google and gmane ;-)



 Module Products.MailTemplates.BaseMailTemplate, line 117, in send
 Module Products.MailTemplates.BaseMailTemplate, line 107, in _send
AttributeError: 'str' object has no attribute '_send'



Hmmm, what have you selected in the MailHost drop-down on the Mail 
Template's edit page?


Whatever you have selected is resolving to a string instead of a 
MailHost object :-S


I have selected a Zope mailhost object



cheers,

Chris

PS: What Zope version are you using?


Zope-2.8.1-final
___
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] help with MailTemplates 1.0.0

2005-10-11 Thread Chris Withers

Nicolas Georgakopoulos wrote:
Whatever you have selected is resolving to a string instead of a 
MailHost object :-S


I have selected a Zope mailhost object


Please explain exactly what you did, including how you create the 
MailHost, the Mail Template and the Python Script, in detail...


I just tried to reproduce this on a fresh Zope 2.8.1 instance and 
couldn't...


Using the first example, the mail rendered and sent just fine.

I'm still far from convinced the thing you think is a MailHost object is 
actually a MailHost object, did you perhaps delete or rename your 
MailHost object?


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
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] Help with virtual hosting Zope on different ports

2005-09-28 Thread Michael Sanborn
I was a little reluctant to try this, since I'm not that agile with
installing unix applications, but I gave it a shot. It actually wasn't
that hard to install, and the performance difference it makes on my
rickety old box is astonishing!

Thank you very much for this tip!

Jonathan Cyr wrote:
 Unless you need some special Apache functionality, you may want to look and 
 the Pound Rev-Proxy/Load Balancer at http://www.apsis.ch/pound.  I find it 
 much easier than getting involved with apache, it's lightweight, secure and 
 designed with Zope in mind.

 two cents,

 -Jon.

 Michael Sanborn wrote:
I have two Zope versions running behind Apache 1.3 (on FreeBSD 4)
using different ports on the same server. The only domain name
currently assigned to the server is for a Squishdot site on the older
Zope version (2.5.1) that I haven't been able to upgrade, and I don't
want to spend the time figuring it out right now. The newer Zope
version (2.8.1) has a Plone site that I would like to run as a domain
of its own.

Can someone help me figure out the combination of Apache rewrite rules
and Zope/Plone products I would need to use to accomplish this?

Just to try to make it clear, what I want is:

request: oldsite.com
result: myserver:8093/oldsite

request: newsite.com
result: myserver:8580/newsite

This is possible, isn't it?

If it helps, here are the existing rewrite rules:

VirtualHost oldsite.com
ServerName oldsite.com
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /u2/oldsite
ScriptAlias /cgi-bin/ /u2/oldsite.cgi-bin/
RewriteEngine on
RewriteCond %{HTTP:Authorization}  ^(.*)
RewriteRule ^/(oldsite/)?(.*) /usr/local/Zope/Zope.cgi/oldsite/$2
[e=HTTP_CGI_AUTHORIZATION:%2,t=application/x-httpd-cgi,l]
ErrorLog /u2/oldsite.admin/oldsite.errors
TransferLog /u2/oldsite.admin/oldsite.access
/VirtualHost

VirtualHost www.oldsite.com
ServerName www.oldsite.com
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /u2/oldsite
ScriptAlias /cgi-bin/ /u2/oldsite.cgi-bin/
RewriteEngine on
RewriteCond %{HTTP:Authorization}  ^(.*)
RewriteRule ^/(oldsite/)?(.*) /usr/local/Zope/Zope.cgi/oldsite/$2
[e=HTTP_CGI_AUTHORIZATION:%2,t=application/x-httpd-cgi,l]
ErrorLog /u2/oldsite.admin/oldsite.errors
TransferLog /u2/oldsite.admin/oldsite.access
/VirtualHost

Thanks in advance for any assistance,

Michael Sanborn
___
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] Help with virtual hosting Zope on different ports

2005-09-20 Thread Jonathan Cyr




Unless you need some special
Apache functionality, you may want to look and the Pound Rev-Proxy/Load
Balancer at http://www.apsis.ch/pound. I find it much
easier than getting involved with apache, it's lightweight, secure and
designed with Zope in mind.

two cents,

-Jon. 

Michael Sanborn wrote:

  I have two Zope versions running behind Apache 1.3 (on FreeBSD 4)
using different ports on the same server. The only domain name
currently assigned to the server is for a Squishdot site on the older
Zope version (2.5.1) that I haven't been able to upgrade, and I don't
want to spend the time figuring it out right now. The newer Zope
version (2.8.1) has a Plone site that I would like to run as a domain
of its own.

Can someone help me figure out the combination of Apache rewrite rules
and Zope/Plone products I would need to use to accomplish this?

Just to try to make it clear, what I want is:

request: oldsite.com
result: myserver:8093/oldsite

request: newsite.com
result: myserver:8580/newsite

This is possible, isn't it?

If it helps, here are the existing rewrite rules:

VirtualHost oldsite.com
ServerName oldsite.com
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /u2/oldsite
ScriptAlias /cgi-bin/ /u2/oldsite.cgi-bin/
RewriteEngine on
RewriteCond %{HTTP:Authorization}  ^(.*)
RewriteRule ^/(oldsite/)?(.*) /usr/local/Zope/Zope.cgi/oldsite/$2
[e=HTTP_CGI_AUTHORIZATION:%2,t=application/x-httpd-cgi,l]
ErrorLog /u2/oldsite.admin/oldsite.errors
TransferLog /u2/oldsite.admin/oldsite.access
/VirtualHost

VirtualHost www.oldsite.com
ServerName www.oldsite.com
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /u2/oldsite
ScriptAlias /cgi-bin/ /u2/oldsite.cgi-bin/
RewriteEngine on
RewriteCond %{HTTP:Authorization}  ^(.*)
RewriteRule ^/(oldsite/)?(.*) /usr/local/Zope/Zope.cgi/oldsite/$2
[e=HTTP_CGI_AUTHORIZATION:%2,t=application/x-httpd-cgi,l]
ErrorLog /u2/oldsite.admin/oldsite.errors
TransferLog /u2/oldsite.admin/oldsite.access
/VirtualHost

Thanks in advance for any assistance,

Michael Sanborn
___
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 )


  


-- 
Jonathan Cyr
[EMAIL PROTECTED]


___
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] Help STX in UTF-8

2005-09-01 Thread Dieter Maurer
Vlada Macek wrote at 2005-8-31 18:13 +0200:
 ...
in my product's __init__.py. Then I placed UTF-8 encoded STX file in my
language there, but the help via ZMI is displayed with garbled UTF-8
chars. It's unreadable, but it is not the matter of browser's Display
encoding switch.

It's Zope 2.7.5. What can I do to display the file correctly?

Almost surely, the charset parameter of the Content-Type
response header is not correctly set.

Find out which template presents the help pages.
See how it sets the Content-Type.
Adjust as necessary.

-- 
Dieter
___
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] HELP!! Data.fs corrupted

2005-09-01 Thread Dieter Maurer
Paul Sue wrote at 2005-8-31 14:36 -0700:
 ...
* Module AccessControl.User, line 641, in validate
* Module Products.GroupUserFolder.GroupUserFolder, line 980, in 
 authenticate

There were a few more lines after this traceback -- essential ones.

Look at them and then look at line 980 in the module identified above.

-- 
Dieter
___
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] HELP!! Data.fs corrupted

2005-09-01 Thread Paul Sue
Sorry, I should have posted an update to the list .. I figured out the problem 
.. Had to install LDAPUserFolder and CMFLDAP.

All is working now!

Thx,

Paul 

-Original Message-
From: Dieter Maurer [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 01, 2005 12:51 PM
To: Paul Sue
Cc: zope@zope.org
Subject: RE: [Zope] HELP!! Data.fs corrupted

Paul Sue wrote at 2005-8-31 14:36 -0700:
 ...
* Module AccessControl.User, line 641, in validate
* Module Products.GroupUserFolder.GroupUserFolder, line 980, in 
 authenticate

There were a few more lines after this traceback -- essential ones.

Look at them and then look at line 980 in the module identified above.

--
Dieter
___
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] HELP!! Data.fs corrupted

2005-08-31 Thread Tino Wildenhain

Paul Sue schrieb:

Hi,
 
Our server crashed and wouldn't boot up.  Fortunately, we had backups of of Data.fs on another server .. so I installed Zope 2./7.4/Plone 2.0.5 on another server and used repozo to try to restore Data.fs:
 
./repozo.py -Rv -r /temp/recover -o Data.fs


However, when I start up Zope, I get:
 
2005-08-31T01:20:21 PANIC(300) ZODB FS FS21 ERROR: /home/zope/ssoi/var/Data.fs data record exceeds transaction record at 54956706



ZODB.FileStorage.CorruptedTransactionError: /home/zope/ssoi/var/Data.fs data 
record exceeds transaction record at 54956706

I've tried restoring from a few days ago using the -D option, but I get the 
same problem.

Am I totally hooped or is there some way to recover???


Err. I dont think you need repozo to use your backup Data.fs.
You should just be able to put (a regular file copy) of
your backed up Data.fs in 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 )


  1   2   3   >