RE: [Zope] 2.3 and Products

2001-01-26 Thread Max Møller Rasmussen

From: Chris McDonough [mailto:[EMAIL PROTECTED]]

This is not true.  The behavior is the same as before... the plans to make
restart optional were waylaid by complications.  ;-(

Another thing with products. Whenever I do a referesh with the refresh tab,
another instance of the product shows up in my "add" dropdown selector. So
If I have a "maxms goodstuf" product that i am editing I get a select box
like:

Dtml Document
Dtml Method
Folder
maxms goodstuf
maxms goodstuf
maxms goodstuf
maxms goodstuf
maxms goodstuf
maxms goodstuf
maxms goodstuf
Catalog

After a little while.

Is there a solution to this?

Regards Max M

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




RE: [Zope] Editors [OT]

2001-01-25 Thread Max Møller Rasmussen

From: Chris Withers [mailto:[EMAIL PROTECTED]]

Hmmm... interesting, maybe it's time to find a new editor...

Try www.ultraedit.com .

It's not free, but it ain't expensive, and I use it 12 hours/day with joy.
Has only crashed on me twice in 4 years.

regards Max M

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




RE: [Zope] Getting an object from it's id

2001-01-23 Thread Max Møller Rasmussen

From: Geoff Armstrong [mailto:[EMAIL PROTECTED]]

In DTML there doesn't seem to be a way of saying, "I have this string with
the name of an object, now fetch me the object."

Shure there is:

dtml-var "some_container_object[remote_id].title"

As far as I remember.

regards Max M

A snippet I use somewhere:

dtml-in "emner[_['sequence-item']].objectValues('maal')"
dtml-var titlebr
dtml-var descriptionbrbr
/dtml-in

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




RE: [Zope] Zope Versus Enhydra Comparison article

2001-01-17 Thread Max Møller Rasmussen

From: Ron Bickers [mailto:[EMAIL PROTECTED]]

 Using Zope we knew that we would reach situations which may be
 unresolvable in the short term, and could not make significant business
 decisions with so many unknown factors and lack of any way to circumvent
 problems.

What in the world does that mean?!?  Maybe it should read "We don't know
how
to use Zope or code in Python."

No it probably means that in enhydra they can solve any problem with brute
force, just like you can in asp and php.

Ie. if you have trouble understanding the security mechanism in Zope you are
lost until you understand it.

If you have trouble with the Enhydra security mechanism, you can allways
write your own.

Sometimes you can get stuck in Zope for days, without knowing how to
proceed, or without knowing how to find out, because you simply got to do it
the Zope way. In a commercial setting that is very dangerous when you work
on a deadline.

In a simpler system you have to do more yourself, but you won't be painted
into a corner as easily, as you can allways do a "hack". to solve your
problem. Zope is more closed in that regard. Well anyways when you know
enough about Zope to make a hack, you probably also know how to do it the
right way.

But it's only a matter of documentation AFAIK.

Regards Max M

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




RE: [Zope] Zope Versus Enhydra Comparison article

2001-01-17 Thread Max Møller Rasmussen

From: Chris Withers [mailto:[EMAIL PROTECTED]]

 problem. Zope is more closed in that regard. Well anyways when you know
 enough about Zope to make a hack, you probably also know how to do it the
 right way.

Sadly, that's true, but changing I think...

Oh don't misunderstand me. I am just about getting over the "Zope wall" and
it has been well worth the climb. 

Everything is so much faster than in any other system I program in. OK a
hitcounter I could probably do faster in php or asp, but that's not really
the problems I try to solve.

For real world web application I have yeat to see anything beat Zope/Python.

You just got to accept to do it the "Zope way" or you will be in a world of
pain. :-)

People like me who has used asp, php etc. for years has better forget what
we know when starting on Zope, and then take it 1 step at a time.

Sometimes in the process I have been so tired of Zope and tried to think out
a smarter way to do things and then after having a heureka moment when I get
a brilliant idea, I have nearly allways thought a little bit harder about it
and discovered that Zope usually does it that way allready.

So learn to live with the quirks and Just Do It.

Regards Max

   (Zope on)

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




RE: [Zope] Form data type coercion syntax and javascript

2001-01-17 Thread Max Møller Rasmussen

From: Mayers, Philip J [mailto:[EMAIL PROTECTED]]

Not a problem per-se, just a query - how are people dealing with things
like
this:

snipped lots of stuff...

Anything more elegant?

I don't know if it is something like this you mean:

self.document.form['test:list'].value = 'stuff to fill in';

or perhaps?

self.document.form['test:list'] = new Option("Red"+i,"color_red");

regards Max M

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




RE: [Zope] ZClasses meet PythonScripts, sample request

2001-01-16 Thread Max Møller Rasmussen

From: Timothy Wilson [mailto:[EMAIL PROTECTED]]

 You have id as a form variable.  You will be disappointed by its
 behavior.

Care to elaborate on the problems with using id as a form variable.

You can be easily bitten by acquisition on this.

If you call a dtml-method that wants to use your "id" variable from the form
and you do: dtml-var id it will return the id of the zClass that the
method is in. If you use the form from a dtml-document you will get the id
of that. Under no circumstances will you get the variable from the form.

To get the id from the form you will have to use this idiom:

dtml-var "REQUEST['id']"

or

dtml-with REQUEST
dtml-var id
/dtml-with

Regards Max M

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




RE: [Zope] My Add list is so full...

2001-01-16 Thread Max Møller Rasmussen

From: Francois-regis Chalaoux

Since long time ago I have this reflexion.  Now I have installed so many
thing in Zope the add list combobox is huge :

There are too many meta-type item in add list. Is is possible to
organize sublist of meta-type into  products sublist ?

aha ...

Max M's law $1:

"Anything that is a list in a userinterface will eventually need to evolve
into a tree."

Well that doesn't help much, but at least your problem has a name now.

Other than that there is nothing to do about it.

Regards Max M ;-)

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




[Zope] How do I authenticate through pcgi and win2000 ????

2001-01-15 Thread Max Møller Rasmussen

I have installed zope on port 8080 on a win 2K machine.

It runs nicely, but due to firewalls and other reasons it has to run on port
80. So I have added zope.pcgi etc. to the IIS. And it runs nicely.

But when I try to use a manage page I cannot log in without being a member
of the win2K domain, and that is not feasible in this case. I have tried all
setting, I think.

Is there any way to do it?

Should I make my own authentication page so users can log on through a form?
If so how is this done?

Regards Max M

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




RE: [Zope] Design Q: Product vs. External Methods

2001-01-15 Thread Max Møller Rasmussen

From: Oleg Broytmann [mailto:[EMAIL PROTECTED]]

   I can assure it is. I run zope.net.ru in debug mode, and did debugging
of an External Method that draw the left column. After I modified the
source file Zope reread it, sure.

I have never had problems with that either. It autorefreshes nicely.

regards Max M

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




RE: [Zope] MySQLDA and images beeing corrupted

2001-01-12 Thread Max Møller Rasmussen

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]

Any ideas?
I feel like I am *so* close to making this work!

It sounds like you have some sort of escape problem, with special characters
being handled as text.

Don't you have to treat the image as text when inserting them into mySQL and
then escape special characters? I betcha there is a special function for
that. Try it.

regards Max M

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




RE: [Zope] get property of type 'list'

2001-01-10 Thread Max Møller Rasmussen

From: Andrei Belitski [mailto:[EMAIL PROTECTED]]

I add a list property to a DTML document of type 'tokens' (e.g. '[1, 2,
3]') wenn i try to retrieve it with _.getitem i get '[1,' '2,' '3]'
instead of '1' '2' '3'

How can I get Zope to interpret my property like a list not a string or
whatever else?

Actually it IS treating it as a list:

dtml-var "tokens[0]" Should return '1'

This should list each item:

dtml-in tokens
dtml-var sequence-itembr
/dtml-in


Regards Max M

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




RE: [Zope] Design/DTML question

2001-01-10 Thread Max Møller Rasmussen

From: Timothy Wilson [mailto:[EMAIL PROTECTED]]

Right now, I've got the dates stored in a TinyTable. I can iterate through
that list and generate the links, but I can't figure out how to display the
table in two columns.

table width=100% border=0 cellpadding=4
tr align=left valign=top
dtml-in meetingDateTable

dtml-if sequence-eventr align=left valign=top/dtml-if

td width=50%
dtml-var meeting_date
/td

dtml-if sequence-enddtml-if sequence-even
td width=50% !-- an empty cell --/td
/tr
/dtml-if/dtml-if

dtml-if sequence-odd/tr/dtml-if

/dtml-in
/table

regards Max M

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




RE: [Zope] [Newbie] Can Zope ...

2001-01-09 Thread Max Møller Rasmussen

From: Smith Ray [mailto:[EMAIL PROTECTED]]

The cost thrown up in the air was in the order of $AUS20,000 for a 
3 year rental, per site (At the moment that is about $US35,000)
When you start talking dozens of sites you quickly start looking
for alternatives!

Zope can easily do most all of the things you mention in zClasses. The most
difficult items you are requesting though is calendaring and discussion.
Currently there are no real good products available so I guess you will have
to roll your own in a Python Product, and that can be a bit difficult to
learn.

The rest sounds like a 2-4 weeks job. maybe 4-6 weeks if depending on how
newbie you are :-)

For me the biggest bonus about Zope vs. closed system is not the $ savings
but the gained flexibility and freedom. It might take a little longer to set
up your own system in zope, but You will know it by heart afterwards and can
easily change the sites.

Regards Max M

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




[Zope] Multiple select boxes saves selected id's even though the Objectsare deleted. are deleted.

2001-01-09 Thread Max Møller Rasmussen

I have a zClass with a multiple selection. The selected items are selected
from a list of id's from a folder. 

They are then saved in the zClass as a list of strings.

But when one of the selected items on the folder is deleted the id is still
in the zClass.

Naturally it should be deleted from the "selected" list automatically, but I
don't think that is feasible. I would have to traverse a lot of different
subfolders to see if an object was selected there.

Is there a standard idiom for doing this?

(Don's say zPatterns please as this won't help here.)

Regards Max M

--
Another way of explaining the same problem is here:

Folder1
   item1
   item2
   item3
   item4

selectBox = ['item1', 'item2', 'item3', 'item4']

selected = ['item1','item2']

After delete of item1 from Folder1

Folder1
   item2
   item3
   item4

selectBox = ['item2', 'item3', 'item4']

selected = ['item1','item2']

The problem is that 'item1' still is in selected.

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




RE: [Zope] Job listings?

2000-12-22 Thread Max Møller Rasmussen

From: Jiva DeVoe [mailto:[EMAIL PROTECTED]]

Is it inappropriate to post a job listing looking for Zope
knowledgable coders on this list?  I don't see anything in the list
charter about it, but I don't want to be rude.  Let me know!  Thanks!

It happens from time to time, and I have seen no protests against it.

I guess that as long as it doesn't fill the list nobody minds.

Regards Max M

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




[Zope] Dreamweaver, webdav and Zope

2000-12-15 Thread Max Møller Rasmussen

I have just upgraded to DreamWeaver 4.0. Lo and behold, it has webDav
support.

I can open the site in DreamWeaver and it looks just great. It would be a
really, I mean REALLY, nice management interface for Zope.

Two problems though:

1) I cannot open my dtml methods in Dreamweaver as they have no
extensions. Appart from giving them extensions has anybody had succes with
this in Dreamweaver? I can solve it by dragging them onto an empty page, but
that ain't to neat. It also only gives the code view.

2) The files that DreamWeaver gets over is rendered html files. So it is
not actually dtml, but the html resulting from the dtml method. Anybody has
a clue to why this is?

Regards

Max M

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




RE: [Zope] Indirect addressing

2000-12-07 Thread Max Møller Rasmussen

From: Ragnar Beer [mailto:[EMAIL PROTECTED]]

+ myfolder
   index_html
   my_external_method
   dtml_method_1
   dtml_method_2
   ...

In index_html I want to include either dtml_method_1 or 
dtml_method_2, ... (one method for every week of year). 
my_external_method tells me which dtml_method to include.
This would logically be handled with "dtml-var dtml-var 
my_external_method" in index_html but this doesn't work.

Something like this ought to work:

dtml-var "objectValues('DTML Method')[my_external_method()]"

This is a no-no, as you cannot have nested dtml:

dtml-var dtml-varmy_external_method

Regards Max M

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




RE: [Zope] Zope Beginner

2000-12-06 Thread Max Møller Rasmussen

From: Mark A. Pappas [mailto:[EMAIL PROTECTED]]

after the -D. In the start.bat. I tried all kinds of things and never was
able to get zope up on port 80 as a web server (www.whatever.com_ or
XXX.XXX.XXX.XXX). What am I missing?

Your approach sound about right.

Perhaps you are running another webserver at port 80? Have you got Apache or
IIS running on your machine allready, chances are that they are using port
80 allready creating a conflict.

Regards Max M

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




RE: [Zope] Simple site - hard to make ?

2000-12-05 Thread Max Møller Rasmussen

From: Michael Jenner [mailto:[EMAIL PROTECTED]]

Is this easy to do in Zope or ??

VERY easy if you know how. But it also depends on you abilities

Regards Max M

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




RE: [Zope] How to use newline_to_br?

2000-12-04 Thread Max Møller Rasmussen

From: Roland C. Reumerman [mailto:[EMAIL PROTECTED]]

- in the response method there is a dtml-var data fmt="newline_to_br"

You are allmost there:

dtml-var data newline_to_br

Should do it for you

Regards Max M

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




RE: [Zope] The not-very-Super user

2000-12-04 Thread Max Møller Rasmussen

From: Brian Lloyd [mailto:[EMAIL PROTECTED]]

Yes - the whole lame login-as-superuser-create-a-manager-and-relogin 
process will be gone in 2.3. At install time you'll create a first 
manager and just use that. A "superuser" will not even exist, unless 
and until you need it and explicitly create it.

Any timeframe on that 2.3 beast?

regards

Max M

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




RE: [Zope] Search and replace

2000-11-20 Thread Max Møller Rasmussen

From: Martin Winkler [mailto:[EMAIL PROTECTED]]

Another thought: If Zope would offer s/r, then a bunch of programmers
would stick in their bad behaviour _not_ implementing dtml-var's, because
"it's easy and effortless to replace everything from 'Copyright 2000' to
'Copyright 2001'". But think of it: Maybe this string is correct somewhere 
and SHOULD stay the same. So s/r is at least inefficient, because you'd 
have to check every file whether Zope should replace or not.


try and do this correctly:

dtml-in customers
The customer is: dtml-var customer
/dtml-in

Search: "customer"
Replace: "buyer"

U ... can of worms

Max M

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




RE: [Zope] ZClasses on top of my Python classes?

2000-11-15 Thread Max Møller Rasmussen

From: Randall Kern [mailto:[EMAIL PROTECTED]]

I've seen several doc tidbits suggesting one create ZClasses derived from
their 
Python classes, sticking all the biz logic in the python classes, and the 
presentation in the ZClasses...

Could someone provide some insight into why this is better than simply
writing 
separate python classes for logic and presentation?  (Although I have to
admit 
hitting the "Restart Server" button every time I make a typo is getting
old)

Well one thing is that it clearly separates logic from presentation, and if
you know zClasses it is easier to get started with while stille being nice
to program in Python.

You can reuse the same Python logic and give it several different interfaces
in several zClasses.

Regards Max M

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




[Zope] Test - Is both the maillist and www.zope.org down?

2000-11-13 Thread Max Møller Rasmussen

???

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




RE: [Zope] Dump .zexp export to readable source?

2000-11-08 Thread Max Møller Rasmussen

From: Robin Becker [mailto:[EMAIL PROTECTED]]

zClasses are not written in Python so there is no code to see. Except fot
the dtml code and you can see that when you have imported a zClass
product.

...
I disagree strongly. Many of the useful coding tools need line oriented
Ascii text; where is diff or grep for my ZClass code. The XML export
form would do except that the differences caused by ordering/numbering
mean that diff reports many irrelevant differences. Zope loses by not
having a decent external storage mechanism for its programming.

Whoa there ... I didn't say anything you could disagree with. I just stated
facts. But I do agree that writing software in Zope is a problem for me too.
I would also like a flat text storage system, but I also see why it is
difficult considdering the design choices made in Zope.

I believe that my problems stems from the fact that code, content and
presentation is to strongly interwoven.

zClasses are nice and simple but difficult to edit, as it has to be done in
the browser. Or at least pasted into it. You also get yourself painted into
a corner pretty quickly.

Subclassing a Pyhton class as a base for a zClass is kind of nice. But
currently I am having problems using that method as it seems that "helper
classes" cannot be adressed from dtml methods in the zClass. (Se my acessing
parameters in a "helper class" posting).

Products are difficult to make, and all the tutorials are rather bad.
Business logic and presentation is mixed together. (Business logic should
not use any code or libraries from Zope at all.)

A nice way to work would be to make a Python class that is completely
independent of Zope. Test and debug it.

Then make a thin Zope wrapper that adds just enough functionality to make it
work in Zope, and so that it can be accessed nicely via dtml.

I am trying this approach currently, but it gets ugly real fast. It will
probably be nicer when I understand it fully. I Will post a How-to then.

Regards Max M

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




RE: [Zope] asked a million times again...

2000-11-08 Thread Max Møller Rasmussen

 Okay, I got the dtml-var filename to work right assuming that that
 files are arranged properly according to aquistion, but then when I
 try to get the file from another folder like
 
 dtml-var "folder.filename"
 
 It displays the code of that page rather thatn recognizing that it is
 content. What should I do?

Perhaps dtml-var "folder.filename()" will do? It executes the method
"filname()" and returns the result.

Regards Max M

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




RE: [Zope] Can't delete products

2000-11-08 Thread Max Møller Rasmussen

From: Stephan Goeldi [mailto:[EMAIL PROTECTED]]

I deleted some products in Control_Panel several times. Some are gone (ok),

some stay and seem to be undeletable. I'm sure someone shows me the way to 
delete it from the command line (it's Zope 2.2.2 on RedHat Linux).

You should also delete the products from your product directory.

Maybe that is the problem?

regards 
Max M


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




RE: [Zope] Asked a million times already... Im sure

2000-11-06 Thread Max Møller Rasmussen

From: Chris Trowbridge [mailto:[EMAIL PROTECTED]]

I know that many people have probobly already asked this, but how would I
do the equivilant of a server side include?
It seems obvious enough from examples that it is merely...

 dtml-var filename

but I always end up with either blank content or '[]'

If you want to include it from a file on the computer and not an object in
Zope then you should probably use the FileSystem product to make it visible
to your file.

If the file you want to include is in Zope allready the you should make
shure that the incl_file is in your out_files' aquisition path. ie. directly
beside you document or in a stright line between your document and the root.
Or you should adress it directly.

/
folder1
incl_file
output_dtml
folder2
folder3

Here output_dtml can se and "include" incl_file

/
folder1
incl_file
folder2
output_dtml
folder3

Here it cannot. Except if you adress it like: 

dtml-var "folder1.incl_file" (Think of it as ../folder1/incl_file)

Regards Max

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




RE: [Zope] Combining products

2000-11-05 Thread Max Møller Rasmussen

From: Anders Eriksson [mailto:[EMAIL PROTECTED]]

I would like to have the membership and the other parts from PTK added
to the Squishdot (or the other way around - which ever is easiest).

I am afraid that there is no easy way of doing that. It would be like
combining any other 2 applications.

Regards Max M

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




RE: [Zope] PHP and Zope

2000-11-03 Thread Max Møller Rasmussen

If you want to you could just use Apache as a front end server serving php
pages, and as a proxy to Zope.

That way you can have the best of both worlds.

But I would recommend using Zope, as you will have far greater possibilities
for re-use of your code.

Regards Max M

-Original Message-
From: Vincent - D. Ertner [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 03, 2000 2:44 AM
To: Zope
Subject: [Zope] PHP and Zope


Hi Zopers,

I learned PHP and now discovered Zope. So I'd like to put a
simple question:

What's the best way to incorporate the advantages of PHP and
Zope? Should I focus on one and forget the other?

Okay, these are two questions and I honestly doubt that anyone
would suggest to drop Zope ;-)))

Anyway: Please gimme some starting hints on my way to the perfect
content managed web site!

Thanx in advance!

Cheers,

Vince

 '''
 ô¿ô
  -



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

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




RE: [Zope] My Items will not show themself in manage_main (objectItems)

2000-11-01 Thread Max Møller Rasmussen

From: Ender [mailto:[EMAIL PROTECTED]]

First os all. Thank you for the patience. I know it is boring to "Solve
other peoples problems for them", but I am really trying hard myself,
reading the source 
of Zope and other products. It's just such a steap learning curve because it
is underdocumented. (I have 6+ years of experience in web scripting and 12+
in programming + database overall, so usually i catch on fast.)

 I was under the impression that when I inherit ObjectManager that my
object
 would be a complete ObjectManager. But do I have to overwrite some
methods
 with my own?

No you don't but generally an objectmanager would wants to add some
custom logic, like a Folder which is a specialized objectmanager.

I don't want that in this product. It should just be a plain folder, where
anything can be put. Well at least Foders, images and dtml methods.

ok, i'm not certain that i understand your problem. you original problem
was getting dtml methods to show up in the manage views. in your product
your it appears that your methods aren't really dtml methods that are
contained within the objectmanager but rather class methods of the
discussion class. to have them show up in the manage_views you need to
change them to be methods that are added to a discussion object.

In my mxm_diskuss class I have a list containing messages:

self.testComments = [.] (will be renamed to "comments" when it's done.)

These comments are not meant to be seen in the folder view, they should only
be visible when called through dtml methods. like this method to make a list
of all messages:

index_html:
dtml-var standard_html_header
dtml-in testComments
ba href="view?id=dtml-var id"dtml-var title/a/b 
By: dtml-var author idtml-var date/ibr
/dtml-in
dtml-var standard_html_footer

What I find "brilliant" about the idea is that when a customer wants a
discussion group I only have to change 3 standard dtml files to give it a
new functional interface. And I can build a library of look and feels. And
there is no recursion in it so it will behave like a list, and be easily
codeable from dtml.

The last discussion product ever needed :-) It will be ZPL (when it's done.)

here some code that illustrates how.
# add a folder for view
self.manage_addFolder('views')
# get a file handle
fh = open(join(Views_Dir, 'DiscussionIndex.dtml'))
# add a DTML method with contents of the file.
self.views.manage_addDTMLMethod(id='news_center_index_html', file=fh)

a method created this way will show up in the manage_view of the object.

My problem is not adding object programatically, but doing it in the
management  interface. When I add them I can press "add  edit" and I can
paste the dtml source, and the method works. But they don't show up on the
list when viewing the folder.

Well I guess that if I dont have to do anything special to add objects to an
objectmanager, then I must have a permission problem when viewing them. I
guess I will look more into that. Currently I am lookin for a permission
that prevents seing the ObjectItems in an objectmanager, but so far without
any luck.

grr... documentation.

Kind regards Max M

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




[Zope] How do I change dtml template on the fly in Python product?

2000-10-27 Thread Max Møller Rasmussen

I have asked this question somewhat differently in another thread but here I
go again from another angle, as it might have been my approach that was
wrong to begin with.

I have a Python product that allready does what I want it to, but I want to
be able to create different views of the products content. (Model View
Controller principle). To do this I have created a folder with different
views (Or skins if you would prefer the Gnome/KDE way of saying it.)

views
view1
list.dtml
view.dtml
edit.dtml
view2
list.dtml
view.dtml
edit.dtml

In my class I have made a value that hold the name of the selected view, I
call this:

self.selView

I want to make it possible to use the different sets of dtml files to create
a different look and feel to the data.

I want to write my "index_html" method so that it returns a rendered version
of "list.dtml" corresponding to the selected view, by the name of the folder
holding  the selected view.

something like this (which doesn't work):

def index_html():
return HTMLFile('views/' + self.selView+ 'list')

Is that the best way to do it?

Regards

Max M

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




[Zope] How to render a HTMLFile in a method in a product

2000-10-26 Thread Max Møller Rasmussen

I would have thought that the two examples below where equivalent but only
the top one works like expected. (It renders the page.)

The second one just shows the source of the vanilla dtml page.

--
test = HTMLFile('vanilla', globals())

--
def test(self):
"A simpe test method"
return  HTMLFile('vanilla', globals())
--

How do I execute the dtml file in a method. I have searched the
documentation, but it is sketchy to say the least.

I cannot use the first approach as I need to define the filename on the fly
in my method.

def test(self):
"A simpe test method"
return  HTMLFile('skins/' + self.skin, globals())

self.skin is only available in my object, so naturally if I try to say:

test = HTMLFile('skins/' + self.skin, globals())

I get an error.

Regards

Max M

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




RE: [Zope] How to render a HTMLFile in a method in a product

2000-10-26 Thread Max Møller Rasmussen

From: Chris Withers [mailto:[EMAIL PROTECTED]]

Thanks for the reply

testisDocTemp = 1

def test(self,ignored,md):
" A simple test method "
return HTMLFile('skins/' + self.skin, globals())(None,md)

Is this documented anywhere? I have a little trouble using code I don't
understand. Pretty Please.

Regards

Max M

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




[Zope] How should a collection be in a Python product if i want to traverse it with dtml-inrse it with dtml-in

2000-10-25 Thread Max Møller Rasmussen

This is a question I guess has something to do with popping an object onto
the namespace, or about me not understanding how stuff works.

When I make a list of objects:

class simple:
def __init__(self, value):
self.value = value

theList = [simple(1), simple(2), simple(3), simple(4)]

I would expect to be able to traverse it like below (The objects namespace
would be popped onto the namespace.):

dtml-in theList
dtml-var value
/dtml-in

But it isn't so. What do I need to do to make the objects namespace count in
my traversal? (I'd like to keep the dtml as simple as possible.)

--

If I make a list:

theList = [1, 2, 3, 4]

I can traverse it with:
dtml-in theList
dtml-var sequence-item
/dtml in

-

and if it's a list if dicts:

theList = [{'value':1},{'value':2},{'value':3},{'value':4}]

I can traverse it like:

dtml in theList
dtml-let item=sequence-item
dtml-var "item['value']"
/dtml-let
/dtml in


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




RE: [Zope] Updating auto incrementing counter in a propertysheet

2000-10-24 Thread Max Møller Rasmussen

From: Bill Anderson [mailto:[EMAIL PROTECTED]]

Is it more important that they be in an order, or that they be in a
specific sequential list?

Actually what is important is that they are integers and in a specific
order. So the datestamp method isn't that feasible for me.

(I'm trying to make a "fake tree" for a diskussion product.)

It is really easy to implement and doesn't use recursion, so traversing the
tree is done with a simple for loop.

It uses a dictionary with tupples as keys to emulate the recursive
structure. Simple example here if anybody cares.


-

class fakeTree:
def __init__(self):
#create tree and insert root element
self.treeKeys = {}
self.treeKeys[0] = (0,)
self.tree = {}
self.tree[(0,)] = ''

def insert(self, id, parent, value):
# create new key
keyList = list(self.treeKeys[parent])
newKeyList = keyList.append(id)
newKeyTuple = tuple(newKeyList)
self.treeKeys[id] = newKeyTuple
# insert in tree with new tuple key
self.tree[newKeyTuple] = value

def print(self):
sortedKeys = treeKeys.keys()
sortedKeys.sort()
spacesInIndent = 3
for key in sortedKeys:
print key
print spacesInIndent * len(key) * ' ' + treeKeys[key]

tree = fakeTree()
tree.insert(1, 0, 'max m')
tree.insert(2, 0, 'gitte')
tree.insert(3, 1, 'magnus')
tree.print()


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




[Zope] How do you guys/gals test Zope products from Python?

2000-10-24 Thread Max Møller Rasmussen

I am using Zope and Python 1.5.2 on Win2000. I guess that it is a fairly
simple setup.

My Zope site is in a folder called c:\mxmZope, and my vanilla Python is in
C:\Program Files\Python.

usually when I write Python I just use PythonWin to edit and run my scripts.
I then write test in the buttom of my file that shows that everything works.


This works nicely, but when writing Zope products I get really frustrated. I
cannot easily automate my tests.

I put my products into C:\mxmZope\lib\python\Products\name and edit them
from there, but trying to edit just a simple syntax error means a restart of
Zope. That gets tired real fast. Especially when all you have to do to make
mistakes is forgetting a comment under a method etc.

I cannot run the program from my PythonWin or IDLE as they are set to the
standard Python enviroment. Do other set os.path.append('ZopeDir') or
something and the comment that out when running or what?

The error messages I get that way are also rather lacking. Reloading the
file in the browser, reading the source and getting a traceback like the one
below, for a method I know exists. But dissapeared because of some, probably
minor, typing mistake.

-
  ... SNIP
  File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 162, in publish
  File C:\mxmZope\lib\python\ZPublisher\BaseRequest.py, line 380, in
traverse
  File C:\mxmZope\lib\python\ZPublisher\HTTPResponse.py, line 529, in
notFoundError
NotFound: (see above)
--

I am shure that there must be a better way, but what is it? How do you guys
edit and test your products? Even .asp is far better than the way I am doing
it now.

At least I dont have to restart the server when I make a simple mistake, I
can also easily put in testcode and Response.Writes to se what is happening.

I love Python among other things because of the nice traceback and debugging
features, but I feel that they are somewhat lost when developing Zope.

Shurely it must be me being ignorant here.

Regards Max M

"There must be more than just this." - V-ger

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




RE: [Zope] NEWBIE: assign next free ID automatically

2000-10-23 Thread Max Møller Rasmussen

This is untested, but an idea:

dtml-in "objectValues()[:-1]" sort=id reverse
dtml-call "REQUEST.set('new_id', id+1)"
dtml-var new_id

It is still subject to failure if 2 or more processes are writing an article
in the same time.

Furthermore it has to find and sort all the items in the folder. That could
take a long time if there are lots of them.

Maybe you should somehow insert a dtml-try until you succed in writing the
article.

Another aproach would be to have the folder with your articles have a
property "lastID" and let "nexID" be a method that automatically would
increment lastID end return it.

Maybe it is possible to lock the lastID property??

From: Patrick Koetter [mailto:[EMAIL PROTECTED]]

What is it that I want to do?
I want to evaluate the highest ID (all are 'int') within the folder and
assign the next highest.
I'm sure this is easy to you...


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




[Zope] Updating auto incrementing counter in a propertysheet

2000-10-23 Thread Max Møller Rasmussen

What am I doing wrong here ... please !!

I am trying to make an autoincrementing counter for use in a diskussion
forum. It's purpose is to autogenereate id's for new messages.

It is important that the id's are in order, so I need to make them this way.

I have a zClass (objectmanger) with a property called "lastID", on a
propertysheet called "hidden".

I have then written a dtml mehtod that should return the id incremented by 1
and then sets the lastID to this new id.

the dtml for the "newID()" dtml method looks like this:
--
dtml-call "REQUEST.set('new_id', lastID+1)"
dtml-call "REQUEST.set(lastID, new_id)"
dtml-return "_.int(new_id)"
--

When I try to get the property directly via the browser i get a result of
"1" The default value for lastID=0 to begin with so this sounds plausible,
but when I refresh the browser nothing happens. So I guess that lastID isn't
updated in the above code.

How do I do that?

Also when I the try to insert "newID()" in my "mxm_comment_add" method in my
zClass, to autogenerate numbers, like this:

dtml-with "mxm_comment.createInObjectManager(newID(), REQUEST)"

I get the following traceback: (And I would expect it to run at least 1 time
with "1" as a new id.)

Traceback (innermost last):
  File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 222, in
publish_module
  File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 187, in publish
  File C:\mxmZope\lib\python\Zope\__init__.py, line 221, in
zpublisher_exception_hook
(Object: RoleManager)
  File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 171, in publish
  File C:\mxmZope\lib\python\ZPublisher\mapply.py, line 160, in mapply
(Object: index_html)
  File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 112, in call_object
(Object: index_html)
  File C:\mxmZope\lib\python\App\Factory.py, line 178, in index_html
(Object: RoleManager)
  File C:\mxmZope\lib\python\OFS\DTMLMethod.py, line 172, in __call__
(Object: mxm_comment_add)
  File C:\mxmZope\lib\python\DocumentTemplate\DT_String.py, line 528, in
__call__
(Object: mxm_comment_add)
  File C:\mxmZope\lib\python\DocumentTemplate\DT_With.py, line 133, in
render
(Object: mxm_comment.createInObjectManager(newID(), REQUEST))
  File C:\mxmZope\lib\python\DocumentTemplate\DT_Util.py, line 337, in eval
(Object: mxm_comment.createInObjectManager(newID(), REQUEST))
(Info: newID)
  File lt;stringgt;, line 0, in ?
  File C:\mxmZope\lib\python\OFS\DTMLMethod.py, line 168, in __call__
(Object: newID)
  File C:\mxmZope\lib\python\DocumentTemplate\DT_String.py, line 528, in
__call__
(Object: newID)
  File C:\mxmZope\lib\python\DocumentTemplate\DT_Util.py, line 337, in eval
(Object: REQUEST.set('new_id', lastID+1))
(Info: REQUEST)
  File lt;stringgt;, line 0, in ?
NameError: (see above)

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




RE: [Zope] Animated GIFs

2000-10-10 Thread Max Møller Rasmussen

From: Lars Heber [mailto:[EMAIL PROTECTED]]

Sorry, I think you misunderstood me!
I _don't_ want to stop the gif, but it does after the last frame! --
Now I tried the same Zope page in NS and IE, this phenomenon appears only
with
NS...

I did understand you, but I could not replicate your problem in IE. I didn't
try it in NS as I don't have it installed.

So I would say it most be a Netscape specific problem.

- Either it is because NS has some abscure bug if the file doesn't have a
.gif name with a dot, but as far as I remember you had allready tried that.

- Maybe Zope sends the wrong header that somehow makes NS foul up, but when
I send a request like this via telnet:

telnet localhost 8080
GET /test/ferierejser_banner_50aar.gif HTTP/1.0

I get this response, which looks fine.

HTTP/1.0 200 OK
Server: Zope/Zope 2.2.2 (binary release, python 1.5.2, win32-x86)
ZServer/1.1b1
Date: Tue, 10 Oct 2000 09:20:38 GMT
Connection: close
Content-Type: image/gif
Content-Length: 15341
Last-Modified: Tue, 10 Oct 2000 06:40:53 GMT

GIF89a\?i?áfHJèuÞ+«lòï ..
lots of Gif data

So I don't think it's a zope problem. Have you tried to save the gif you
receive and then open it again, if it loops then it is an interresting
problem.

My bet would be that it is a NS problem. Maybe try it out on antoher version
of NS

Regards

   Max M

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




[Zope] Namespace problem with the dtml-sendmail and the smtphost

2000-10-04 Thread Max Møller Rasmussen

I have a dtml method in a zClass that looks like this:

dtml-sendmail smtphost=theSMTPHost
To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Subject: This is a test

A test!!!
/dtml-sendmail

"theSMTPHost" is defined as a property in the zClass. But when i use the
method I get a:

Error Type: error
Error Value: host not found

If i write:

dtml-sendmail smtphost="mail.tele.dk"

It gets send without a hitch.

and if I write dtml-var theSMTPHost it returns mail.tele.dk as expected.

I then try this, which also fails.

dtml-call "REQUEST.set('theSMTPHost', 'mail.tele.dk')"
Mailhost: dtml-var theSMTPHost

dtml-sendmail smtphost=theSMTPHost
To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED]
Subject: This is a test

A test!!!
/dtml-sendmail

Is it not possible to set the smtphost to a string in a dtml variabel?

Regards Max M

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




[Zope] Sorting and accessing elements in the

2000-10-03 Thread Max Møller Rasmussen

I am making a mailer zClass where it will only be nessecary to make the form
fields with the values you want to send, then the zClass will give you a
reply on the webpage and send a nicely formatted e-mail.

The problem is that the form elements are unknown but they need to be set up
in predictable order to format the output automatically.

To do this I need the form values in a sorted order. I can then give the
form fields names like this:

input type=text name="1) First Name" value="Max M"
input type=text name="2) Last Name" value ="Rasmussen"



Then the mail can be automatically formatted like this:

1) First Name
Max M

2) Last Name
Rasmussen

etc



I have tried to use the sequence-item as a key in REQUEST.form, but it
doesn't work like I want it to.

-

dtml-var standard_html_header

dtml-var webReplyp
dtml-call "REQUEST.set('keys', REQUEST.form.keys())"
dtml-call "keys.sort()"

dtml-in keys
dtml-var sequence-item:br
dtml-var "REQUEST.form[sequence-item]"p   THIS IS WHAT DOESNT
WORK
/dtml-in

dtml-var standard_html_footer

-

Regards Max M


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




[Zope] Permission problem with my own zClass.

2000-09-14 Thread Max Møller Rasmussen

I have made a zClass called "newsProduct" that is articles with predefined
properties.

It works nicely when I am logged on as an Administrator. I can add articles.
No problem.

I also have a site with the following structure

root
news

I want some users to be able to add "news" articles in the "news" folder.
This I can do by making a user folder in the "news" folder and setting the
users as administrators, but I do NOT want them to be able to add anything
but articles. So that is a bad idea.

Thus I want to make a new role called "author" that can only add articles.
in the news-folder.

I have made a user in the "news" userfolder, and given this user the
"author" role. In the news folder I have also checked the box "add newss"
under "author" (a single article is also called "news" in the management
interface).

My test_author can logon nicely, seeing the "news" folder as the root. And
under the "To add an item select an item type" select box, 2 products turn
up "Z Gadfly Database Connection"(No idea why!)  "News". But when I select
"news" a login prompt pops up. I cannot login as test_author, so I cannot
create any news in the "news folder."

Does anybody has any ideas about what more I need to set in order to make
the "author" role able to create articles.

Kind Regars Max M, Denmark


This is the content of my newsProduct
Help (NewsProduct)  
newsClass  
newsClass_add (newsClass constructor)  
newsClass_addForm (newsClass constructor input form)  
newsClass_add_permission (newsClass constructor permission)  
newsClass_factory (newsClass factory)  

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




[Zope] This must be a namespace problem

2000-09-08 Thread Max Møller Rasmussen

I have a site structure like this:

root
subfolder

Then i have made a dtml document "index_html" in the "root" folder like
this:


html
headtitletest/title/head
body
   dtml-var content
/body
/html


Also I have a dtml method "content" in the root folder like this:


h2Root folder/h2
this is the content of the root folder


Then I have made a method "content" in "subfolder"


h2Sub folder/h2
this is the content of the sub folder


all in all:

root
index_html
content
subFolder
content


When i view "root" folde i see the index_html document just fine, and the
content gets inserted like it should. But when I view the "subFolder" I
would expect it to look for the "index_html" in the root folder and then the
"content" method in the subFolder.

But it uses the "root" folder "content". How can I make it us the "content"
in the current directory, but the index_html from the root folder. Can this
not be done??

Kind regards 
Max M

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




Re: [Zope] [Ann] Another Zope Book

2000-08-18 Thread Max Møller Rasmussen

Fra: Kapil Thangavelu [mailto:[EMAIL PROTECTED]]

I think most developers are forced to learn
through trial and error because the docs don't do the components justice
since they tend to focus on working understanding of zope's framework
from dtml. and in the end they are forced to turn to the source which
can be confusing without knowing the parts of the framework from a
fundamental not a working perspective.

comments?

2 right you are. We need more info about Zope from a Python programmers POW.
Setting pages up in dtml is not that interresting from my point of view.

We need more detailed documentation on all the seperate modules, and far
more/better on making products.

dtml is not for programming and business logic, only for presentation.

Max M

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




[Zope] Problems publishing simple object directly thru ZServer

2000-08-09 Thread Max Møller Rasmussen

--
I have made a very simple class that I am trying to publish thru ZServer:
--
class hello:

"""A very simple publishable objet in zope"""

def world(self):
"DocStrings are NOT optional"
return "hello world"
--
I have changed the following in z2.py
--

#zh = zhttp_handler(MODULE, '', HTTP_ENV)
#hs.install_handler(zh)

sys.path.insert(0,'C:/root/pythonScripts/hello') # add MyModule to the
Python path
my_handler = zhttp_handler('hello', '')  # create a handler
hs.install_handler(my_handler)   # install it in the http
server#

--
And I get this traceback:
--

Zope Error
Zope has encountered an error while publishing this resource. 

exceptions.TypeError

Sorry, a Zope error occurred.

Traceback (innermost last):
  File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 222, in
publish_module
  File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 171, in publish
  File C:\mxmZope\lib\python\ZPublisher\mapply.py, line 160, in mapply
(Object: world)
  File C:\mxmZope\lib\python\ZPublisher\Publish.py, line 112, in call_object
(Object: world)
TypeError: unbound method must be called with class instance 1st argument
--

Can anyone see the error of my ways? I can't. I would think that: "unbound
method must be called with class instance 1st argument" would mean I had
forgotten "self" in my method but this is clearly not the case.

Kind Regards Max M

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