| 11 | | class Bsp(PyLucidBaseModule): |
| 12 | | def __init__(self, *args, **kwargs): |
| 13 | | super(Bsp, self).__init__(*args, **kwargs) |
| | 12 | from PyLucid.system.BaseModule import PyLucidBaseModule |
| | 13 | |
| | 14 | class Bsp(PyLucidBaseModule): |
| | 15 | def __init__(self, *args, **kwargs): |
| | 16 | super(Bsp, self).__init__(*args, **kwargs) |
| | 17 | |
| | 18 | |
| | 19 | Last commit info: |
| | 20 | ~~~~~~~~~~~~~~~~~ |
| | 21 | $LastChangedDate$ |
| | 22 | $Rev$ |
| | 23 | $Author$ |
| | 24 | |
| | 25 | :copyright: 2007 by Jens Diemer |
| | 26 | :license: GNU GPL, see LICENSE for more details |
| | 27 | """ |
| 17 | | Last commit info: |
| 18 | | ---------------------------------- |
| 19 | | $LastChangedDate$ |
| 20 | | $Rev$ |
| 21 | | $Author$ |
| 22 | | |
| 23 | | Created by Jens Diemer |
| 24 | | |
| 25 | | license: |
| 26 | | GNU General Public License v2 or above |
| 27 | | http://www.opensource.org/licenses/gpl-license.php |
| 28 | | """ |
| 29 | | |
| 30 | | from PyLucid.models import PagesInternal |
| 31 | | from PyLucid.tools.content_processors import apply_markup, render_template |
| 32 | | |
| 33 | | |
| 34 | | #______________________________________________________________________________ |
| | 31 | from PyLucid.db.internal_pages import get_internal_page |
| | 32 | from PyLucid.tools.content_processors import apply_markup, \ |
| | 33 | render_string_template |
| 67 | | plugin_name = self.__class__.__name__ # Get the superior class name |
| 68 | | |
| 69 | | internal_page_name = ".".join([plugin_name, internal_page_name]) |
| 70 | | |
| 71 | | # django bug work-a-round |
| 72 | | # http://groups.google.com/group/django-developers/browse_thread/thread/e1ed7f81e54e724a |
| 73 | | internal_page_name = internal_page_name.replace("_", " ") |
| 74 | | |
| 75 | | try: |
| 76 | | return PagesInternal.objects.get(name = internal_page_name) |
| 77 | | except PagesInternal.DoesNotExist, err: |
| 78 | | msg = "internal page '%s' not found! (%s)" % (internal_page_name, err) |
| 79 | | raise PagesInternal.DoesNotExist(msg) |
| 80 | | |
| | 66 | """ |
| | 67 | retuned the internal page object |
| | 68 | Get the plugin name throu the superior class name |
| | 69 | """ |
| | 70 | plugin_name = self.__class__.__name__ |
| | 71 | internal_page = get_internal_page(plugin_name, internal_page_name) |
| | 72 | return internal_page |