Re: [Zope] ZJetDA product and Microsoft Access

2006-07-26 Thread Philip Kilner
Hi Michael,

michael nt milne wrote:
> I know it's totally
> crazy to want to hook Access up with Zope using sql queries but I'd just
> like to know if it's been done or is possible.
> 

Crazy on so many levels.../but/, although I can't tell you anything
about the DA you are asking about, I can very strongly recommend the
eGenix mxODBC DA - using that product, it is possible, and does work.


-- 

Regards,

PhilK

"Human language continually changes, innit."
- Stephen Juan
___
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] Running 2 instances of Zope on Apache

2006-07-26 Thread Dieter Maurer
ianripping wrote at 2006-7-26 01:30 -0700:
> ...
>
>ServerAdmin [EMAIL PROTECTED]
>ServerName commsg6lds
>RewriteEngine On
>RewriteRule ^/(.*)
>http://localhost:8080/VirtualHostBase/http/commsg6lds:80/extranet/VirtualHostRoot/$1
>[L,P]
>
>
>I am using rewrite rule and this works for just the internal address
>http://commsg6lds
>
>How would I configure this for http://live.commsg6lds
>Do I have to enable NameVirtualHost?
>What should I have for listen? Currently:
>Listen 80

You really should read Apache's "NameVirtualHost" documentation...



-- 
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] Mark Pilgrim's Feed Parser in Zope

2006-07-26 Thread Gabriel Genellina

At Wednesday 26/7/2006 18:57, KJZZ Webmaster wrote:


And you were right! This is not seen as as a valid dictionary (nor is it
seen as a string):

stuff = container.externalmethod(feedurl=feedurl)
test = same_type(stuff, {})
print test
return printed

returns "0"

However, interestingly enough, if I copy and paste the all the text that
is returned by the external method into the script, I am able to confirm
that it is a dictionary:

stuff= {'lastbuilddate': u'Mon, 24 Jul 2006 12:06:18 EDT', 
u'subtitle': 'U.S.',

u'generator': 'NPR/RSS Generator 2.0 etc...'}


In this case you are using the Python syntax to create a dictionary, 
so it's not a surprise when it *is* a dictionary...


Are you sure that your external method returns this *text*? It seems 
that you are looking at the string representation of some 
dictionary-like object. You can convert any dictionary-like object 
into a true dictionary using the builtin function dict:


  d = dict(an_object_that_acts_like_a_dictionary)



Gabriel Genellina
Softlab SRL 






__
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas


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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Plone Site

2006-07-26 Thread Martin Aspeli

SANDRA LORENA ANAYA DIAZ wrote:

Hi,

I have installed zope 2.7 and I need add a Plone Site. This feature don`t 
exist? How I do to add a Plone site in this version of Zope?


http://plone.org/documentation/how-to/setup-from-source

Martin

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

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Newbie: Missing a Variable (TAL/METAL Question)

2006-07-26 Thread David H




beno - wrote:

  Hi;
  I have the following block of code:
   
  
  
    title
    
  modification date  
    author
    content
  

  
  that works fine. But I'd like to call the following in that
table:
   
  
  
  where "XXX" is the "item" that changes each time a new item from
the batch is called. In other words, there is a folder with a "batch"
of files, and each file is an "item". So, since the files' titles are
simply sequential numbers, it would look something like this:
   
  


...

How do I do that? Even better, is it possible to just open up each file
and read its contents??

  Thanks,
  Ben
   
  

Ben,
First this is wrong:



If should be


But that may be wrong in the context you've given.  

Since "do it in python" has been a theme lately, you can also return a
macro from a python script like so:

Where there is an author might be a parameter.
#some python script
#
  return container.YourMacroFolder.someMacro[ author ]
---

And in your ZPT: (where result.author is just a stub for whatever your
using)

macro goes
here

I suggest *always* doing stuff in python when things are not clear. 
Then code back into your Page Templates, if desired

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] Mark Pilgrim's Feed Parser in Zope

2006-07-26 Thread Jonathan


I found a way to test if the "ExternalMethod" really returned a dict here:

http://infrae.com/mailman_/pipermail/silva-dev/2004q2/001091.html

And you were right! This is not seen as as a valid dictionary (nor is it
seen as a string):

stuff = container.externalmethod(feedurl=feedurl)
test = same_type(stuff, {})
print test
return printed

returns "0"

However, interestingly enough, if I copy and paste the all the text that
is returned by the external method into the script, I am able to confirm
that it is a dictionary:

stuff= {'lastbuilddate': u'Mon, 24 Jul 2006 12:06:18 EDT', u'subtitle': 
'U.S.',

u'generator': 'NPR/RSS Generator 2.0 etc...'}

test = same_type(stuff, {})
print test
return printed

returns "1"

Also, I tried to render the copied text from the external method using the
page template, and received a different error message:

"TypeError: string indices must be integers" (see the attached traceback).

I don't know if this last test will be useful, but I thought I'd give it
a try.

Do you know if there is a way of changing the data type of an object?

Do you know if there is a listing of data types that I could test for?


There is an easy, but potentially dangerous way to turn a string 
representative of a python dictionary back into a 'real' python 
dictionary... only do this if you are sure of the contents of the 
dictionary:  in an external method:


def string2dict(instr):
   dict = {}
   dict['__builtins__'] = None
   return eval(instr, dict)


hth

Jonathan




Thanks kindly,

John T.









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



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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Newbie: Missing a Variable (TAL/METAL Question)

2006-07-26 Thread beno -
Hi;  I have the following block of code:           title      modification date  author    content    that works fine. But I'd like to call the following in that table:   where "XXX" is the "item" that changes each time a new item from the batch is called. In other words, there is a folder with a "batch" of files, and each file is an "item". So, since the files' titles are simply sequential numbers, it would look something like this:     ...     How do I do that? Even better, is it possible to just open up each file and read its contents??  Thanks,  Ben 
		Do you Yahoo!? 
Get on board. You're invited to try the new Yahoo! Mail Beta.___
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] Mark Pilgrim's Feed Parser in Zope

2006-07-26 Thread KJZZ Webmaster
Dieter,

Appreciate your help.

I found a way to test if the "ExternalMethod" really returned a dict here:

http://infrae.com/mailman_/pipermail/silva-dev/2004q2/001091.html

And you were right! This is not seen as as a valid dictionary (nor is it
seen as a string):

stuff = container.externalmethod(feedurl=feedurl)
test = same_type(stuff, {})
print test
return printed

returns "0"

However, interestingly enough, if I copy and paste the all the text that
is returned by the external method into the script, I am able to confirm
that it is a dictionary:

stuff= {'lastbuilddate': u'Mon, 24 Jul 2006 12:06:18 EDT', u'subtitle': 'U.S.',
u'generator': 'NPR/RSS Generator 2.0 etc...'}

test = same_type(stuff, {})
print test
return printed

returns "1"

Also, I tried to render the copied text from the external method using the
page template, and received a different error message:

"TypeError: string indices must be integers" (see the attached traceback).

I don't know if this last test will be useful, but I thought I'd give it
a try.

Do you know if there is a way of changing the data type of an object?

Do you know if there is a listing of data types that I could test for?

Thanks kindly,

John T.


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
   - 
  Module TAL.TALInterpreter, line 206, in __call__
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 649, in do_loop_tal
  Module Products.PageTemplates.TALES, line 206, in setRepeat
  Module Products.PageTemplates.TALES, line 221, in evaluate
   - URL: /mypath/pagetemplate
   - Line 2, Column 2
   - Expression: 
   - Names:
  {'container': ,
   'context': ,
   'default': ,
   'here': ,
   'loop': ,
   'modules': ,
   'nothing': None,
   'options': {'args': ()},
   'repeat': ,
   'request': http://localhost:/mypath/pagetemplate>,
   'root': ,
   'template': ,
   'traverse_subpath': [],
   'user': admin}
  Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
   - __traceback_info__: news['entries'][0:25]
  Module Python expression "news['entries'][0:25]", line 1, in 
  Module AccessControl.ZopeGuards, line 67, in guarded_getitem
TypeError: string indices must be integers
___
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] Running 2 instances of Zope on Apache

2006-07-26 Thread Peter Bengtsson

How about something like this::

ServerAdmin [EMAIL PROTECTED]
ServerName live.commsg6lds
RewriteEngine On
RewriteRule ^/(.*)
http://localhost:8080/VirtualHostBase/http/live.commsg6lds:80/extranet/VirtualHostRoot/$1
[L,P]


ServerAdmin [EMAIL PROTECTED]
ServerName dev.commsg6lds
RewriteEngine On
RewriteRule ^/(.*)
http://localhost:9080/VirtualHostBase/http/dev.commsg6lds:80/extranet/VirtualHostRoot/$1
[L,P]


What way live.commsg61ds points to zope on port 8080
and dev.commsg61ds points to another zope on port 9080


ianripping wrote:

I have tried using the exaplme provided but having no luck.

This is my standard config file:


ServerAdmin [EMAIL PROTECTED]
ServerName commsg6lds
RewriteEngine On
RewriteRule ^/(.*)
http://localhost:8080/VirtualHostBase/http/commsg6lds:80/extranet/VirtualHostRoot/$1
[L,P]


I am using rewrite rule and this works for just the internal address
http://commsg6lds

How would I configure this for http://live.commsg6lds
Do I have to enable NameVirtualHost?
What should I have for listen? Currently:
Listen 80


--
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] Running 2 instances of Zope on Apache

2006-07-26 Thread KE Liew

What does your RewriteRule Log tell you?

http://betabug.ch/zope/witch

Check out that site to help you write it out ;)


Regards,

Liew

On 7/26/06, ianripping <[EMAIL PROTECTED]> wrote:


I have tried using the exaplme provided but having no luck.

This is my standard config file:


ServerAdmin [EMAIL PROTECTED]
ServerName commsg6lds
RewriteEngine On
RewriteRule ^/(.*)
http://localhost:8080/VirtualHostBase/http/commsg6lds:80/extranet/VirtualHostRoot/$1
[L,P]


I am using rewrite rule and this works for just the internal address
http://commsg6lds

How would I configure this for http://live.commsg6lds
Do I have to enable NameVirtualHost?
What should I have for listen? Currently:
Listen 80
--
View this message in context: 
http://www.nabble.com/Running-2-instances-of-Zope-on-Apache-tf1998979.html#a5499540
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 )


___
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] ZJetDA product and Microsoft Access

2006-07-26 Thread michael nt milne
HiThanks a lot for this. I'll try that out. Cheers.On 7/26/06, Jesper Steen Steffensen <[EMAIL PROTECTED]
> wrote:
HiI've had a look at this product and installed it on Zope 
2.8.7. It installed fine but when I look in the 'add' menu I'm not seeing an 'add ZJetDA database connection' which you get for other installed database adapters. Possibly I'm wrong in expecting this? I know it's totally crazy to want to hook Access up with Zope using sql queries but I'd just like to know if it's been done or is possible.
Thanksmichael

 I've tried the ZJet adapter as well without luck. Go with the ZODB DA instead.It works perfectly.To connect to an MS Access DB on a windows machine you'll need to set the DB up as a system data source on the machine. This is done in the Start menu -> Administration -> ODBC datasources.
Add a system data source in there, and browse to your mdb file. Give the data source a name of your own choice, and when you go back into the zope manager and add the DB  connection you need to write this data source name (DSN) in the connection string. After that your ZSQL methods will work perfectly.
Worked for me. I was forced to use an MS Access DB as well due to some very strict network policies about approved software for the network.

___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
 )-- michael
___
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] ZJetDA product and Microsoft Access

2006-07-26 Thread Jesper Steen Steffensen
HiI've had a look at this product and installed it on Zope 
2.8.7. It installed fine but when I look in the 'add' menu I'm not seeing an 'add ZJetDA database connection' which you get for other installed database adapters. Possibly I'm wrong in expecting this? I know it's totally crazy to want to hook Access up with Zope using sql queries but I'd just like to know if it's been done or is possible.
Thanksmichael

 I've tried the ZJet adapter as well without luck. Go with the ZODB DA instead.It works perfectly.To connect to an MS Access DB on a windows machine you'll need to set the DB up as a system data source on the machine. This is done in the Start menu -> Administration -> ODBC datasources.
Add a system data source in there, and browse to your mdb file. Give the data source a name of your own choice, and when you go back into the zope manager and add the DB  connection you need to write this data source name (DSN) in the connection string. After that your ZSQL methods will work perfectly.
Worked for me. I was forced to use an MS Access DB as well due to some very strict network policies about approved software for the network.
___
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] ZJetDA product and Microsoft Access

2006-07-26 Thread michael nt milne
HiI've had a look at this product and installed it on Zope 2.8.7. It installed fine but when I look in the 'add' menu I'm not seeing an 'add ZJetDA database connection' which you get for other installed database adapters. Possibly I'm wrong in expecting this? I know it's totally crazy to want to hook Access up with Zope using sql queries but I'd just like to know if it's been done or is possible.
Thanks-- michael
___
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] Running 2 instances of Zope on Apache

2006-07-26 Thread ianripping

I have tried using the exaplme provided but having no luck.

This is my standard config file:


ServerAdmin [EMAIL PROTECTED]
ServerName commsg6lds
RewriteEngine On
RewriteRule ^/(.*)
http://localhost:8080/VirtualHostBase/http/commsg6lds:80/extranet/VirtualHostRoot/$1
[L,P]


I am using rewrite rule and this works for just the internal address
http://commsg6lds

How would I configure this for http://live.commsg6lds
Do I have to enable NameVirtualHost?
What should I have for listen? Currently:
Listen 80
-- 
View this message in context: 
http://www.nabble.com/Running-2-instances-of-Zope-on-Apache-tf1998979.html#a5499540
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 )