[Zope] How to get the variable in an URL ?

Pascal Samuzeau samuzeau@oreka.com
Wed, 24 Apr 2002 13:03:16 +0100


                                                                      
Hello                                                                 
                                                                      
When I try <dtml-var "REQUEST.form['try-it']> I have the following    
error :                                                               
                                                                      
Type de l'erreur : KeyError                                           
Valeur de l'erreur : keyword                                          
                                                                      
Traceback (innermost last):                                           
  File zope/lib/python/ZPublisher/Publish.py, line 223, in            
publish_module                                                        
  File zope/lib/python/ZPublisher/Publish.py, line 187, in publish    
  File zope/lib/python/Zope/__init__.py, line 226, in                 
zpublisher_exception_hook                                             
    (Object: cerf)                                                    
  File zope/lib/python/ZPublisher/Publish.py, line 171, in publish    
  File zope/lib/python/ZPublisher/mapply.py, line 160, in mapply      
    (Object: CasCatalog)                                              
  File zope/lib/python/ZPublisher/Publish.py, line 112, in            
call_object                                                           
    (Object: CasCatalog)                                              
  File zope/lib/python/OFS/DTMLMethod.py, line 199, in __call__       
    (Object: CasCatalog)                                              
  File zope/lib/python/DocumentTemplate/DT_String.py, line 546,       
in __call__                                                           
    (Object: CasCatalog)                                              
  File zope/lib/python/DocumentTemplate/DT_Util.py, line 231, in      
eval                                                                  
    (Object: REQUEST['keyword'])                                      
    (Info: REQUEST)                                                   
  File <string>, line 2, in f                                         
    (Object: guarded_getitem)                                         
  File zope/lib/python/AccessControl/DTML.py, line 104, in            
guarded_getitem                                                       
    (Object: CasCatalog)                                              
  File zope/lib/python/AccessControl/ZopeGuards.py, line 151, in      
guarded_getitem                                                       
  File zope/lib/python/ZPublisher/HTTPRequest.py, line 897, in        
__getitem__                                                           
KeyError: (see above)                                                 
                                                                      
                                                                      
                                                                      
When I try <dtml-var "REQUEST"> I have the URL , URL0, BASE3          
as:                                                                   
                                                                      
http://website/folder/document,                                       
                                                                      
but never I see my parameter "variable"                               
                                                                      
Sincerily                                                             
PS                                                                    
                                                                      
-------------------                                                   
> Pascal Samuzeau wrote:                                              
>                                                                     
> > Hello,                                                            
> >                                                                   
> > I have a link as :                                                
> >                                                                   
> > <a                                                                
href="http://website/folder/document?variable=try-it">Try</a>         
> >                                                                   
> > I want to get the variable in my document.                        
> >                                                                   
> > I did REQUEST.form['varibale']. But it doesn't work, of cource,   
I                                                                     
> > haven't a form.                                                   
> >                                                                   
> > What i the syntax t oget this variable???                         
>                                                                     
> maybe REQUEST['variable']?                                          
> whats in your REQUEST (is "variable" present?)?                     
> -------------------------------------------------------------       
> Who's got only a hammer sees the world as a nail                    
> hans augustin  (software developer)           hans@beehive.de       
> beehive elektronische medien GmbH                                   
http://www.beehive.de                                                 
> phone: +49 30 847-82 0                  fax: +49 30 847-82 299      
>                                                                     
>                                                                     
>                                                                     
                                                                      
--------------------------------------------------                    
Oreka ! Nous sommes l'internet moins cher !                           
Surfez 25% moins cher avec http://www.oreka.com