Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
MoinMoin.datastruct.backends.config_dicts.ConfigDicts Class Reference
Inheritance diagram for MoinMoin.datastruct.backends.config_dicts.ConfigDicts:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.datastruct.backends.config_dicts.ConfigDicts:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __contains__
def __iter__
def __getitem__
def is_dict_name
def get

Public Attributes

 request
 page_dict_regex

Private Member Functions

def _retrieve_items

Private Attributes

 _dicts

Detailed Description

Definition at line 18 of file config_dicts.py.


Constructor & Destructor Documentation

def MoinMoin.datastruct.backends.config_dicts.ConfigDicts.__init__ (   self,
  request,
  dicts 
)

Definition at line 20 of file config_dicts.py.

00020 
00021     def __init__(self, request, dicts):
00022         super(ConfigDicts, self).__init__(request)
00023 
00024         self._dicts = dicts


Member Function Documentation

Check if a dict called <dict_name> is available in this backend.

Reimplemented from MoinMoin.datastruct.backends.BaseDictsBackend.

Definition at line 25 of file config_dicts.py.

00025 
00026     def __contains__(self, dict_name):
00027         return self.is_dict_name(dict_name) and dict_name in self._dicts

Here is the call graph for this function:

Get a dict by its moin dict name.

Reimplemented from MoinMoin.datastruct.backends.BaseDictsBackend.

Definition at line 31 of file config_dicts.py.

00031 
00032     def __getitem__(self, dict_name):
00033         return ConfigDict(request=self.request, name=dict_name, backend=self)

Here is the caller graph for this function:

Definition at line 28 of file config_dicts.py.

00028 
00029     def __iter__(self):
00030         return self._dicts.iterkeys()

Reimplemented from MoinMoin.datastruct.backends.BaseDictsBackend.

Definition at line 34 of file config_dicts.py.

00034 
00035     def _retrieve_items(self, dict_name):
00036         try:
00037             return self._dicts[dict_name]
00038         except KeyError:
00039             raise DictDoesNotExistError(dict_name)
00040 
def MoinMoin.datastruct.backends.BaseDictsBackend.get (   self,
  key,
  default = None 
) [inherited]
Return the dictionary named <key> if key is in the backend,
else default. If default is not given, it defaults to None, so
that this method never raises a DictDoesNotExistError.

Definition at line 329 of file __init__.py.

00329 
00330     def get(self, key, default=None):
00331         """
00332         Return the dictionary named <key> if key is in the backend,
00333         else default. If default is not given, it defaults to None, so
00334         that this method never raises a DictDoesNotExistError.
00335         """
00336         try:
00337             return self[key]
00338         except DictDoesNotExistError:
00339             return default
00340 

Here is the caller graph for this function:

def MoinMoin.datastruct.backends.BaseDictsBackend.is_dict_name (   self,
  name 
) [inherited]

Definition at line 311 of file __init__.py.

00311 
00312     def is_dict_name(self, name):
00313         return self.page_dict_regex.match(name)

Here is the caller graph for this function:


Member Data Documentation

Definition at line 23 of file config_dicts.py.

Definition at line 309 of file __init__.py.

Definition at line 308 of file __init__.py.


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