[Zope] Core Session

2001-01-28 Thread josh on

Is core session a part 2.3?  
Can someone point me to the documentation on it?

Thanks,

josh 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] with a variable

2001-01-12 Thread josh on


I got it to work thanks for the help!






it was the cobination of no quotes around the the userid AND setting the
variable as a string not an integer!

arrrggghh... thank godness, now I can have lunch.

josh 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] with a variable

2001-01-12 Thread josh on

thanks Steve and Rick,

Unfortunately  both your solutions brought up this error:

Error Type: SystemError
Error Value: bad argument to internal function

> 
> 
> 
> 
> or
> 

> > This works:
> > 
> > 
> > 

I want to get some properties for a zclass instance after being passed its
id in a variable. In these tests I have been defining the varible in the
code, in the final case it will be passed through the url.

Using the id directly as above works fine, it writes the attribute to the
page.

Thanks for any help,

Josh 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] with a variable

2001-01-12 Thread josh on

I want to read an zclass instances' properties.  I want to make some dtml
that can be passed the instances' id then give me the properties that I
request.

I was trying   and it worked when I plugged the id striaght into
it, but when I tried substituting that with a dynamic varible I couldn't get
it to work.

I have been trying some other approaches that maybe someone could tell me if
I am on the right track or if there is some cumentaion that could help me
out.  I have been going through the list archives for hours!

here is a my latest failed attempt!




I know that I could use the Catalog, but it seems crazy to have to track
everyvariable property of an object that I want to access.

I am sure that this is a basic problem and would love some help with it.

josh 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 )




[Zope] with a variable

2001-01-11 Thread josh on

Hi,

a small problem!,

This works:




This doesn't:





Nor this:





Nor this:





What I want to do is have a varible passed to the page which says what
zclass instance to get the properties of.

any help appreciated.

josh on


===
write: [EMAIL PROTECTED]
read: www.futurefarmers.com
read: www.crd.rca.ac.co.uk/~josh
interrupt (i love it): (415) 552 2124
=


___
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 the catalog - successfully!

2000-12-11 Thread josh on

I was having a lot of problems with keeping a catalog up to date when I
manipulated data in an instance of a zclass (catalog aware).  I was calling
this, from a dtml file in the same folder as the instances, and one folder
down from the Catalog:




This just was not re-indexing the Catalog successfully at all.  I checked
the zope list and I think that a lot of people have had the same problem,
including myself a few months back... All the answers suggest using:



or even:




So I just littered that all through my code in the vein hope that the
Catalog would get the hint. But it was stubborn.  The data would be altered,
meanwhile the Catalog remained oblivious.

The good news is that I have seemingly found a way to update my catalog by
making a method of my zclass called update_dtml which I call when change the
data of an instance. the method contains only one thing (of course):



I call it from the dtml that manipulates the data of the instance (from a
file in the same directory as the instances):





The bad news is that I don't have a clear understanding of why this works. I
guess that the  is context sensitive and is a
method of the zclass, so it needs to be called from there.

Does this make sense ?  If it does I think that it should be turned into a
how to.

or am I just being silly?

josh on

===
write: [EMAIL PROTECTED]
read: www.futurefarmers.com
read: www.crd.rca.ac.co.uk/~josh
interrupt (i love it): (415) 552 2124
=


___
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] zcatalog, zclass instances

2000-12-09 Thread josh on

Hello,

I am building a small community site.
I am building the login/signup system.
I have a problem with the creation of new users on signup.  I have a users
zclass which is catalog aware.  I used the job board tutorial to set it up
(thanks! very useful documentation)
When I a user signs up I search the catalog for their username, because I
want to keep that unique. here is the code:

Content-type: application/x-www-form-urlencoded


_root.feedback=sorry+name+taken






This page is passed the variable "username".  This works to catch existing
usernames most of the time.  However, in a few cases it will miss the fact
that the name matches an existing name and go ahead to the  page:






_root.feedback=success

This code usually successfully adds a new user.  However if the username is
a duplicate (it shouldn't arrive at this page, but if it does) it will only
successfully make a new zclass instance of the user if they are a single
letter long
Thus I get a user list that looks like this:

max , yay , josh , mary , peter , john , ann , dog , cat , badger , fork , g
, k , ww
, u , u , u , u , u , b , u , erm , frog , erk , damn , erkf , this , bg , q
, q , e , u , aname , j , j , j , j , j , j , j , j , j , j , amy , y , y ,
y

So for single letter names the user signs up no matter whether someone else
has that name or not.  Which is not what I want. But the problem does not
end their, else I would just not permit one letter name. For those who
choose names of more than one letter, they may be told that they have
successfulluy created a new user when they haven't.  The times when this
happens are usually if I haven't closed and opened the browser between
sign-ups.  However it happens seemingly randomly.

I am calling all this code from a flash file in the same directory.  I have
the same thing working using zope and SQL no problem, but can't work it out
with zcatalog.  Unfortunately I need to!

My first inuitions are that:

1: it has something to do with the pages being cached.
2: I am not updating the catalog properly, though I added the lines
suggested in the job board tutorial to the add method of the zclass:
  

Any hints will be appreciated...

I think I may be reporting the same problem that is mentioned in:

http://www.egroups.com/message/zope/44901

but I am not sure.

thanks for your time

josh on




===
write: [EMAIL PROTECTED]
read: www.futurefarmers.com
read: www.crd.rca.ac.co.uk/~josh
interrupt (i love it): (415) 552 2124
=


___
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] user permissions

2000-07-24 Thread josh on

I just installed 2.2 on win98.

I log on as a superuser, and try and make a new folder an I get:

>Zope Error
>
>   Zope has encountered an error while publishing this resource.
>
>   Error Type: SuperCannotOwn
>   Error Value: Objects cannot be owned by the superuser

So I used to do that I thought.  I tried to make a new acl user, but
couldn't log in with that name password combo.  I saw that webmaster asked
this a couple of days ago, but I saw no answer.

Am I being dumb and missing the obvious?  Do I need to go and read some how
to about users and permissions?

any help would be great.

josh 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] scared

2000-06-20 Thread josh on

I have reinstalled zope and zodb, and copied the data.fs across.  It was
about two days old.  All the changes that I had made were gone.  Luckily I
made a backup of my app yesterday by exporting it.

I must have a bad understanding of how this works.  I had imagined that
everytime I hit CHANGE, that the data.fs file would have been updated.

When the computer crashed where were all my current changes?  Is there a
temp file I might be able to recover, as I am still missing quite a few
hours work!

The lesson that I have learnt is to back up regularly by exporting.  Is this
the right conclusion?

Thanks,

 josh 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] scared

2000-06-20 Thread josh on

Thanks Chris,

> As for your error, it looks like something bad happened when zope tried
> to write to the log file. Did you do any funny configuration fro your
> logging? What version of Zope are you using?

I haven't changed anything to my knowledge.

It did stop working after a crash though.  Perhaps something is corrupted, I
got a friend to test my site.  He kept rightclicking and choosing "back", as
quickly as he could and then it crashed...

I think the page it crashed on had some .js in it...

erk,

I am using "Notes on Zope 2.0"

oh gee I thought I was using 1.6!

What version would you recommend installing?

Thanks,

josh





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

2000-06-20 Thread josh on

Would it be a bad idea to just install another copy of zope in a different
directory?  Would that clash somehow?

josh


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

2000-06-20 Thread josh on

when things happen that I have no understanding of their cause I get a
little scared.

I started up zope this morning, it seemed to open normally.
(I am running zserver and zope on  a win98 machine)
However when I went to access the site through the web, the server would
shut down.

I have recently exported the app. that I was working on, which makes me
happy but I need to get it back up and working asap.  What information do I
need to get the bottom of this?
I don't know how to copy and paste from a dos window, so I will transcribe
what I can see, hopefully someone can tell me where I might look next! (I
have taken out all the directory structure from the filenames)

File "...\ZServer\medusa\asyncore.py", line 321, in handle_error
self.close()
File "..\ZServer\HTTPServer.py", line 356, in close p.more() #free up
resources held by producer
File "..\ZServer\Producers.py", line 108, in more getattr(self.logger,
self.method)(self.bytes)
File "..\ZServer\medusa\http_server.py", line 275, in log, _ _ [%s] "%s" %d
"%s" "%s"\n' % (  LOG STUFF )
...
IOError: [Errno 9] Bad file descriptor


Oh I feel rotten, way out of my depth!  I just want zope to work!!!
Not really sure where to start, will reinstalling the whole thing write over
my data?
I guess I have it backed up, but still...

thanks for ANY help!!

josh 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 )




[Zope] compiling images

2000-06-14 Thread josh on

Hello,

I have been trying to get a collaborative comic book buider made in zope and
macromedia director.

First I want to say that I have enjoyed working in the open source world of
zope so much more than director.  Whilst some parts of Director are well
documented, others are positively hidden away...  completely propritary it
seems.  Where as here there is a great will to share and distribute
knowledge... anyhow that is by the by. (but really appreciated!)

My problem is I can't find a good plug-in for Director that lets it export
images from shockwave files.  They are just 1bit images, so what I can do is
export them as a string of 0s and 1s.

Could I use zope or PYTHON to convert 25000 0s and 1s into an, er, a PNG
file I guess it would have to be.

note, I haven't ever written any python, though I here it is very lovely!

I guess Director would send it via post to a zope page which would then
process it and save a png file.

Am I optomistic?

josh 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] saving files to zope

2000-06-13 Thread josh on


Oh goodness, I fear that this isn't going to be anywhere near as easy as I
might have hoped!

Thanks for the good questions.

> Its not quite clear to me what you want to do...
> Which application/OS do you want to save it with?
> what _exactly_ do you want?

It is a macromedia director shockwave file, that exports a picture file to
my server Zope, zserver on win98.  The shockwave will be embedded in a
webpage served on a page served by zope in fact it is already there:

http://194.80.197.15:8080/sqladdaline/shockwave/index_dtml

Hit the enter button and it saves a file!  yeah right, hehe...

I have it so that it is supposed to save a file "test.jpeg"  hoping that it
would just save into that directory.

no luck... I am not sure whether the problem lies on the zope or Director
side of things.  The director file works locally but I have never had it
work as a shockwave file.

As for which of these protocols it would use, I am undure, the first I would
guess. however it would have to happen behind the scenes, and I would then
want to be able to refer to these files from zope.

> - http multipart file upload? -> make yourself a file upload form (see
zope
> doc on how to do this)
>
> - ftp ? direct your ftp-client to port 8021 of you zope machine
>
> - http/webdav -> direct your webdav-client to port 8080 of your machine
(if
> you're using zserver, port 80 if apache)

ok this sounds good too, perhaps this is what it is doing already?

> - filesystem (samba) ? -> install product LocalFS and scan its
> documentation. it lets you use files in the server's filesystem from zope.

Thanks for your time,

josh 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 )




[Zope] saving files to zope

2000-06-13 Thread josh on

Hi,

I want to export images from a shockwave file and have them stored on my
computer and accessable by zope.

Can I just have the shockwave movie save files to say:

www.myzopeserver.com/savefileshere

where that folder has its permissions set such that anonymous can post a
file there?

or is it more complicated than that?

thanks josh 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] dtmll-in variables

2000-06-08 Thread josh on

Hi,

 I am trying to only perform a task if there are less than a certain amount
of records returned by a query.

Jonothan gave me the variable name for the record count:

> > is there an easy way to get a record count of total number of items or
> > iterations returned by a dtml-in tag?
>
> 
> --jfarr

But I am struggling to put that into an if statement:


line:


WHOOP WHOOP



There are ten lines returned by this query but zope sees the line:



and thinks I am trying to say sequence minus length,
rather than refer to the dtml var sequence-length

Could anyone help me ut with this?

josh on

On another smaller note how do I write a greater than sign in this context?








___
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] dtmll-in variables

2000-06-08 Thread josh on



> > is there an easy way to get a record count of total number of items or
> > iterations returned by a dtml-in tag?
> 
> 
> --jfarr


great, thanks a lot!

I think that this page should be updated with this info:

http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.7.2.html

unless I am wrong.

josh 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 )




[Zope] dtmll-in variables

2000-06-07 Thread josh on

is there an easy way to get a record count of total number of items or
iterations returned by a dtml-in tag?

I want to say if more than 26 records are returned then don't do this.

i.e.


 26>
do this

do this



thanks for your time

josh 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] stupid question I guess

2000-06-07 Thread josh on

> sure - where is it? :)

great question, it took me ages to finds this again, I think it could be
linked from zope resources, or documentation,

it is in in the zdp:

http://zdp.zope.org/projects/zfaq/faq/DTML#951171060

this is a link to the appropriate section, there is an answer to the
question, how do I define variables in zope, which has the dtml-let answer,
but it is less explicit and fleshed out than yours.

josh 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] stupid question I guess

2000-06-07 Thread josh on

wow great answer, thanks that has just peeled off another layer of zope
mystery for me.

can this be put in the dynamic faq?

josh on


- Original Message -
From: Tony McDonald <[EMAIL PROTECTED]>
To: Zope List <[EMAIL PROTECTED]>
Sent: Wednesday, June 07, 2000 3:17 PM
Subject: Re: [Zope] stupid question I guess


> At 2:55 pm +0100 7/6/00, Chris Withers wrote:
> >josh on wrote:
> >>  can I set a local variable in zope on a dtml page
> >>  
> >
> >Yup:
> >
> >
> >
> >Nice syntax, huh? ;-)
> >
> >Chris
>
> now now :)
>
> (tested)
>
> 
> blah blah blah ... ie the scope of the variable
> 
> 
>
> don't fall into the trap of doing this
> 
> blah blah blah ... ie the scope of the variable
> 
> 
>
> 'cos Zope won't let you enter it (it thinks that the 'I' is a
> variable name). Remember that anything in " " is evaluated as a
> Python expression...
>
> try this instead
> 
> blah blah blah ... ie the scope of the variable
> 
> 
>
> You can have multiple variables set too...
> 
> blah blah blah ... ie the scope of the variable
>  :: 
> 
>
> See lib/python/DocumentTemplate/DT_Let.py for more details...
>
> hth
> tone
>
>
> --
> Dr Tony McDonald,  FMCC, Networked Learning Environments Project
> http://nle.ncl.ac.uk/
> The Medical School, Newcastle University Tel: +44 191 222 5888
> Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2
>
> ___
> 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 )




[Zope] stupid question I guess

2000-06-07 Thread josh on

but I can't find the answer...

can I set a local variable in zope on a dtml page
eg



thanks josh 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] Looking forward to a better future at prototype world

2000-06-06 Thread josh on


> This is REALLY cool.  I can't manage to login though.


oh thanks,

ok, that might be because you didn't put in a tagline or it had punctuation
that sql doesn't like.

If not that is bad.

I will try and sort this out it is a big bug!

thanks for the feedback.


___
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] Looking forward to a better future at prototype world

2000-06-06 Thread josh on

I just made this in zope

and am testing it,

I hope that you find it fun, tell me what you think, if you will.  Any
feedback would be loved, and thanks for all the help I recieved on this
list.

http://194.80.197.15:8080/sqladdaline

josh 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 )