Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes
fckconnector.FCKeditorRequest Class Reference

List of all members.

Public Member Functions

def __init__
def has_key
def get

Public Attributes

 request
 environ
 get_request

Detailed Description

Definition at line 53 of file fckconnector.py.


Constructor & Destructor Documentation

def fckconnector.FCKeditorRequest.__init__ (   self,
  environ 
)

Definition at line 55 of file fckconnector.py.

00055 
00056        def __init__(self, environ):
00057               if environ: # WSGI
00058                      self.request = cgi.FieldStorage(fp=environ['wsgi.input'],
00059                                                  environ=environ,
00060                                                  keep_blank_values=1)
00061                      self.environ = environ
00062               else: # plain old cgi
00063                      self.environ = os.environ
00064                      self.request = cgi.FieldStorage()
00065               if 'REQUEST_METHOD' in self.environ and 'QUERY_STRING' in self.environ:
00066                      if self.environ['REQUEST_METHOD'].upper()=='POST':
00067                             # we are in a POST, but GET query_string exists
00068                             # cgi parses by default POST data, so parse GET QUERY_STRING too
00069                             self.get_request = cgi.FieldStorage(fp=None,
00070                                                  environ={
00071                                                  'REQUEST_METHOD':'GET',
00072                                                  'QUERY_STRING':self.environ['QUERY_STRING'],
00073                                                  },
00074                                                  )
00075               else:
00076                      self.get_request={}


Member Function Documentation

def fckconnector.FCKeditorRequest.get (   self,
  key,
  default = None 
)

Definition at line 80 of file fckconnector.py.

00080 
00081        def get(self, key, default=None):
00082               if key in self.request.keys():
00083                      field = self.request[key]
00084               elif key in self.get_request.keys():
00085                      field = self.get_request[key]
00086               else:
00087                      return default
00088               if hasattr(field,"filename") and field.filename: #file upload, do not convert return value
00089                      return field
00090               else:
00091                      return field.value

Here is the caller graph for this function:

def fckconnector.FCKeditorRequest.has_key (   self,
  key 
)

Definition at line 77 of file fckconnector.py.

00077 
00078        def has_key(self, key):
00079               return self.request.has_key(key) or self.get_request.has_key(key)


Member Data Documentation

Definition at line 60 of file fckconnector.py.

Definition at line 68 of file fckconnector.py.

Definition at line 57 of file fckconnector.py.


The documentation for this class was generated from the following file: