Re: [Zope] newbie Q. DTML syntax

2000-05-31 Thread Nick Garcia

Brad Moulton wrote:
 
 As a newbie i have tried a few variations on the following
 but the dtml-if never returns true
 
  dtml-in "PARENTS[0].objectValues(['customer'])" sort=lname
 dtml-if "(_['sequence-item'].title == AUTHENTICATED_USER)"
   trtdcustomer /tdtddtml-var accno/td
 ...and other values from "customers" folder with meta type customer
 /dtml-if
 /dtml-in
 
 I have previously modified an add_instance method to store
 AUTHENTICATED_USER as the "title"
 viewing the folder shows this to be so.
 If I display these values they appear the same. I just do not know the
 correct syntax inside dtml-if

You actually have the syntax correct, you're just comparing apples to
oranges.  AUTHENTICATED_USER is an object, that when called just happens
to return a string.  Your if statement above is comparing the string
attribute title to the object AUTHENTICATED_USER, which is why it's
always returning false.  The correct comparison above would be:

dtml-if "(_['sequence-item'].title ==
AUTHENTICATED_USER.getUserName())"

The getUserName function of the AUTHENTICATED_USER object returns a
string containing the username.

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
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] !--#var title-- = Zope ?!

2000-06-06 Thread Nick Garcia

Jonathan wrote:
 
 "Zope" is the name of the main folder so when you do dtml-var
 title you are getting that folder's title.
 
 dtml-var title_or_id will give you the title or id of the object
 that it is within (DTML Document title or id). That is probably what
 you want.
 
 Well, that don't work either. And if I am correct; dtml-var
 title_or_id yields the same results as !--var title_or_id-- right?

Yes, that is correct.  I think what you want is dtml-var
document_title which should get you the title of the document whether
it's a DTML Method or a DTML Document.
-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
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] Facing problems with MySQLDA

2000-06-16 Thread Nick Garcia

vikas wrote:
 
 Sir,
 I am still a new user of zope and I want to use MySQL database with
 zope. I have downloaded ZMySQLDA1.4 (stable). I have followed all the
 steps for installing properly but still I am unable to use MySQL
 connection. I have also added a Product named as ZMySQLDA in the product
 management screen but I am not sure how to connect zope with MySQL. Also
 sir please guide me where and how do i create ZMySQL connection string.
 My OS is Turbolinx 6.0
 The database is MySQL which I am using is the one provided with the OS.
 Thanking you in anticipation.

If you have the ZMySQLDA Product installed and you can add ZMySQL
Database Connections, then you're pretty muchd one.  You still have to
go in and create a user in MySQL for Zope to use, and the connection
string follows this format:

database_name[@dbserver] [user] [password]

Once a Database Connection has been established, you can create Z SQL
Methods.

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
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] Namespace question

2000-06-29 Thread Nick Garcia

Rogerio Atem de Carvalho wrote:
 
 Hi,
 
 I working on an structure like this:
 
 folder1
   |
   folder11
  |
  folder111
 
 I have some objects in folder111 which I want to pass
 as parameters to a dtml method in folder1 (two levels
 above). I tried something like:
 
 dtml-with "PARENTS[2]"
  tddtml-var "mtdCreate(_.None, _,
 qry_item='par1',qry_table='par2', list_name='par3')"
 /td/tr
 /dtml-with
 
 where par1 and par2 are strings and par3 is an object
 in folder111. mtdCreate is in folder1. it doesn't
 work...
 
 How can I do that

You should be able to do:

dtml-with "folder11.folder111"
  tddtml-var "mtdCreate(_.None, _, qry_item='par1',qry_table='par2',
list_name='par3')"
  /td/tr
/dtml-with

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
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] http://www.atomasoft.com/yahoo-yes!.something

2000-07-18 Thread Nick Garcia

Jonathan Desp wrote:
 
 Hi,
 
 If you go there -
 
 http://www.atomasoft.com/yahoo-yes!.something
 
 You will see my "Not Found" page, because there is no such page in my
 database.
 
 But I'm always seeing those ugly sentences below, and I'd like to cut them
 and then don't see them anymore, what I can do ? Where is the file to edit ?
 What I need to erase ? I searched the mailing list with several keyword, my
 "standard_html_footer (Standard Html Footer) " file is very good and
 perfect, but I don't want to see the "ugly sentences" like:

You're running your server in debug mode.  Turn debug mode off and you
won't see them anymore.  If you're using ZServer you need to edit start
and take out the -D option.

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
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] Announcement: zCommerce First Public Release!

2000-07-24 Thread Nick Garcia

Chris Withers wrote:
 
 Hi Nick,
 
 Is zCommerce OSS?
 It's a pretty M$-like press release (blegh!) but the 'download here' bit
 implies it's going to be Open Source. If so, then it sounds very cool
 :-)

Of course its OSS!  We're going to set up CVS for it soon and
everything.  I didn't write the announcement BTW :)

 PS Did you have to spam zope-dev in as well? ;-)

Sorry, I wasn't sure if I should or not, but in the end I decided to do
it because there's a lot of development opportunity in there.

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
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] Your feedback: what should DateTime strftime() behavior be?

2000-07-25 Thread Nick Garcia

Brian Lloyd wrote:
 
 What do you think?

+1

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
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] OK, I think I have a workaround to the pcgi problem....

2000-07-26 Thread Nick Garcia

Bill Anderson wrote:
 
 o Use the pcgi directory from 2.1.6
 o Put "PCGI_CLOSE_FDS=0" in Zope.pcgi
 o rerun w_pcgi.py
 
 This seems to be working, though I haven't rebooted the machine

Hmmm... I was just trying to get 2.2.0 working with PCGI yesterday and
couldn't get it working either.  These instructions got it up and
running, but now I'm seeing something a bit strange and I was wondering
if you were seeing the same thing.  If I go to a page that doesn't
exist, I get this error:

Error Type: NameError
Error Value: URL

!--
Traceback (innermost last):
  File /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line
222, in publish_module
  File /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line
187, in publish
  File /usr/local/Zope-2.2.0-src/lib/python/Zope/__init__.py, line 221,
in zpublisher_exception_hook
(Object: ApplicationDefaultPermissions)
  File /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/Publish.py, line
162, in publish
  File /usr/local/Zope-2.2.0-src/lib/python/ZPublisher/BaseRequest.py,
line 451, in traverse
NameError: (see above)

--

Is it just me?

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
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] OK, I think I have a workaround to the pcgi problem....

2000-07-26 Thread Nick Garcia

Nick Garcia wrote:
 
 Hmmm... I was just trying to get 2.2.0 working with PCGI yesterday and
 couldn't get it working either.  These instructions got it up and
 running, but now I'm seeing something a bit strange and I was wondering
 if you were seeing the same thing.  If I go to a page that doesn't
 exist, I get this error:
 
 Is it just me?

[Answering my own post]

It's not just me, and it only happens when you don't have an index_html
at the root and you try to access just the domain (try it, it's fun!).

I'll put this in the Collector.

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
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 dtml-if question

2000-07-26 Thread Nick Garcia

joel grimes wrote:
 
 How do I do this?
 
 I have a table with a field called SerialNumber.  I want to test it for null
 and return a non-breaking space if it's null.
 
 Here's what I tried:
 
 dtml-if "SerialNumber = null"nbsp;
 dtml-elsedtml-var SerialNumber
 /dtml-if

dtml-var SerialNumber null="nbsp;"

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
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] Announcement: zCommerce First Public Release!

2000-07-24 Thread Nick Garcia

CodeIt announces the much-anticipated release of zCommerce. zCommerce,
in it's first public release, provides a flexible shopping cart and
order processing engine that you can use along with a few lines of DTML
to develop just about any kind of e-commerce application. Our hope is
that along with your help, we can develop a standard for e-commerce
components that are fully customizable and scalable to meet the needs of
even the most demanding e-commerce sites.

"CodeIt is a strong believer in Zope and open source in general. Being a
recognized leader in the Zope community we believe we have a
responsibility to Zope and everyone else in the community to help
improve it, hence the alpha release of zCommerce. We look forward to
your comments, suggestions and patches."  - Jason Reid, CEO CodeIt
Computing

zCommerce can be downloaded from
http://www.zope.org/Members/ngarcia/zCommerce.  More information on
ZCommerce in general will be available at http://www.zope-store.com.

CodeIt Computing is one of the leading providers of Zope based
solutions.  We offer a full range of services from Zope Hosting to
custom application development. Located in Southern California, we
design custom sites and applications exclusively in Zope.  Please visit
our website at http://www.codeit.com to find out more about us, and our
exciting career opportunities.

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
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] Full path var on Zope.org login link (Ethan!)?

2000-07-31 Thread Nick Garcia

ethan mindlace fremen wrote:
 
 "J. Atwood" wrote:
 
  What DTML-VAR do they use on Zope.org to populate the came_from variable for
  the 'login' link?
 
 http://www.zope.org/standard_html_header/view_source
 
 dtml-URL0;

Note that if you have any variables in your URL, this won't work.  You
have to do:

dtml-var URL0dtml-if QUERY_STRING?dtml-var QUERY_STRING/dtml-if

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
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] Installation of 2.2.0 under Linux

2000-08-03 Thread Nick Garcia

Steve Sorenson wrote:
 
 Hello,
 When I installed the source code of 2.2.0 on my Linux machine, I got an
 error message saying "Error 256" just after it began compiling the python
 modules.  The same thing happens when I attempt to install the linux2
 release.  Has anybody else experienced anything of thie nature?

I think that means that you don't have the python development
libraries.  If you use RPMs, you need the python-devel package.

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
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] retrieving data from REQUEST.form

2000-08-11 Thread Nick Garcia

jesse wrote:
 
 dtml-var "REQUEST.form['list']"
 
 it comes out with
 
 line one line two line three
 
 All the line breaks dissapear! So there is nothing to replace! Does anyone have any 
ideas how I could solve this problem?

The line breaks don't disappear, they just don't mean anything in HTML. 
You can still replace them.  You can do dtml-var
"_.string.replace(REQUEST.form['list'], '\n', 'br')" and it should do
what you want.

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

___
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-dev] Unpickleable Error

2000-06-16 Thread Nick Garcia

So, I'm getting this error when trying to use one of my Products under
Zope 2.2b1:

  Error Type: UnpickleableError
  Error Value: Cannot pickle type 'StringO' objects

What exactly is a StringO object, and why can't it be
pickled/unpickled?  It worked fine under 2.1, so I'm assuming there have
been changes to the pickling routines that haven't been completely
cleaned up yet?

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

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




Re: [Zope-dev] Unpickleable Error

2000-06-19 Thread Nick Garcia

Nick Garcia wrote:
 
 Brian Lloyd wrote:
 
   So, I'm getting this error when trying to use one of my Products under
   Zope 2.2b1:
  
 Error Type: UnpickleableError
 Error Value: Cannot pickle type 'StringO' objects
  
   What exactly is a StringO object, and why can't it be
   pickled/unpickled?  It worked fine under 2.1, so I'm assuming
   there have
   been changes to the pickling routines that haven't been completely
   cleaned up yet?
 
  There shouldn't be any changes at all happening to any of the pickling
  machinery... A 'StringO' object is what you get when you use
  cStringIO.StringIO. Is your product using cStringIO for anything? If
  not, it would be best to trace this in the debugger to see what is
  trying to pickle a StringO...
 
 The product isn't using cStringIO.  I didn't even know it existed until
 now ;)  I stepped through the code, and in lib/python/ZODB/Connection.py
 in the commit() function, when it gets to the line dump(state) on line
 347 where state is (apparently) all the correct information for my
 object, it gets the UnpickleableError.  I noticed in the Collector that
 bug #383 was about Unpickleable errors with SQL methods.  The object
 that's trying to get pickled in this case contains SQL methods.
 Granted, bug 383 was from around this time last year, but it's the best
 lead I've got so far.  I don't use cStringIO anywhere in my product.

Well since my product *does* use the SQL class, and the SQL class
uses the DA class, and the DA class uses cStringIO, I guess
*technically* I am using it.  We create SQL methods then store them as
properties of the class.  This may be what it's choking on.

-- 
Nick Garcia | [EMAIL PROTECTED]
CodeIt Computing | http://codeit.com

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