Show
Ignore:
Timestamp:
05/23/08 16:33:49 (6 months ago)
Author:
JensDiemer
Message:

new page_msg system. Use a middleware to make page_msg lazy: ticket:193

  • update settings_example.py (insert new middleware)
  • change """contextpage_msg?""" to """request.page_msg"""
  • add a simple page_msg unittest (Need more tests!)
  • update _install data (Templates and index page)
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pylucid/PyLucid/db_dump_datadir/PyLucid_page.py

    r1562 r1585  
    44default = {} 
    55records = [ 
    6 [1, u'<h2>Welcome to your PyLucid CMS =;-)</h2> \r\n<p>\r\nNote:\r\n</p>\r\n<ul>\r\n\t<li>After install deactivate the _install section!</li> \r\n</ul>\r\n<h3>list of last page updates</h3>\r\n<p>\r\n<a href="{% lucidTag RSSfeedGenerator count="10" %}" type="application/rss+xml" title="page updates">RSS feed</a><br />\r\n{% lucidTag page_update_list %}\r\n</p>\r\n', None, 0, u'index', u'index', u'index', 1, 1, 1, u'', u'', '2007-06-22 09:48:29', '2007-12-04 02:25:55', 1, 1, True, True, None, None] 
     6[1, u'Note:\r\n\r\n* After install deactivate the _install section!\r\n\r\n=== list of last page updates\r\n\r\n{% lucidTag page_update_list count=10 %}', None, 0, u'Welcome', u'Welcome', u'Welcome to your PyLucid CMS =;-)', 1, 1, 6, u'', u'', '2007-06-22 09:48:29', '2008-05-23 11:24:42', 1, 1, True, True, None, None] 
    77[2, u'h2. sub menu\r\n\r\n{% lucidTag sub_menu %}', None, 0, u'example pages', u'ExamplePages', u'example pages', 1, 1, 2, u'', u'', '2007-06-22 09:48:29', '2007-06-22 09:48:33', 1, 1, True, True, None, None] 
    88[3, u'h1. tinyTextile help\r\n\r\nh1. headlines\r\n\r\nheadlines are introduced with \'h1.\':\r\n\r\n<pre>\r\nh1. h-1 headline\r\n\r\nh2. h-2 headline\r\n</pre>\r\n\r\nResult:\r\n\r\nh1. h-1 headline\r\n\r\nh2. h-2 headline\r\n\r\n(Important: one blank line under the headline!)\r\n\r\n<hr class="big_hr">\r\n\r\nh1. Text formatting\r\n\r\n<pre>\r\nI am a --small-- word with &lt;small&gt; tag.\r\nThis is a *fat* word with &lt;strong&gt; tag.\r\n</pre>\r\n\r\nResult:\r\n\r\nI am a --small-- word with ==<small>== tag.\r\nThis is a *fat* word with ==<strong>== tag.\r\n\r\n<hr class="big_hr">\r\n\r\nh1. Links\r\n\r\nLinks according in the following pattern:\r\n\r\n<pre>"LinkText":URL</pre>\r\n\r\nexamples:\r\n<pre>\r\nhttp://exampledomain.dtl\r\nftp://exampledomain.dtl\r\nmailto:name@exampledomain.dtl\r\nhttp://www.python-forum.de\r\nor better: "Das deutsche Python-Forum":http://www.python-forum.de\r\nThis is a link, too: "Link":?#unten\r\nWiki like, internal PyLucid links: [[ExamplePageName]]\r\n</pre>\r\n\r\nResult:\r\nhttp://exampledomain.dtl\r\nftp://exampledomain.dtl\r\nmailto:name@exampledomain.dtl\r\nhttp://www.python-forum.de\r\nor better: "Das deutsche Python-Forum":http://www.python-forum.de\r\nThis is a link, too: "Link":?#unten\r\nWiki like, internal PyLucid links: [[ExamplePageName]]\r\n\r\n<hr class="big_hr">\r\n\r\nh1. List\r\n\r\nYou can make ==<ul>== liste with "*" and ==<ol>== list with "#".\r\nNote: You can\'t mixed this list types ;)\r\n\r\nexamples:\r\n\r\n<pre>\r\nnormal list:\r\n* Lorem ipsum dolor sit amet\r\n** consectetuer adipiscing elit\r\n**** sed diam nonummy nibh\r\n**** euismod tincidunt ut laoreet\r\n** dolore magna aliquam erat volutpat.\r\n\r\nnumbered list:\r\n# Lorem ipsum dolor sit amet\r\n## consectetuer adipiscing elit\r\n#### sed diam nonummy nibh\r\n#### euismod tincidunt ut laoreet\r\n## dolore magna aliquam erat volutpat.\r\n</pre>\r\n\r\nResult:\r\n\r\nnormal list:\r\n* Lorem ipsum dolor sit amet\r\n** consectetuer adipiscing elit\r\n**** sed diam nonummy nibh\r\n**** euismod tincidunt ut laoreet\r\n** dolore magna aliquam erat volutpat.\r\n\r\nnumbered list:\r\n# Lorem ipsum dolor sit amet\r\n## consectetuer adipiscing elit\r\n#### sed diam nonummy nibh\r\n#### euismod tincidunt ut laoreet\r\n## dolore magna aliquam erat volutpat.\r\n\r\n<hr class="big_hr">\r\n\r\nh1. Bilder\r\n\r\nEin HTML-img-Tag wird erzeugt, wenn eine Adresse mit einem "!"-Zeichen\r\numschlossen ist.\r\n\r\n<pre>\r\n!http://images.sourceforge.net/images/project-support.jpg!\r\n!/favicon.ico!\r\n!http://domain.tld/pics/ich werde zu keiner URL weil hier leerzeichen sind.jpg!\r\n</pre>\r\n\r\nResult:\r\n\r\n!http://images.sourceforge.net/images/project-support.jpg!\r\n!/favicon.ico!\r\n!http://domain.tld/pics/ich werde zu keiner URL weil hier leerzeichen sind.jpg!\r\n\r\n<hr class="big_hr">\r\n\r\nh1. Embed Python SourceCode\r\n\r\nPut sourcecode between ==<python>== tag. Note: The start and end tag must be located alone in a line!\r\n\r\nexample:\r\n\r\n==\r\n<python>\r\n#!/usr/bin/python\r\n# -*- coding: UTF-8 -*-\r\n\r\n"""Ein kleines Skript"""\r\n\r\nprint "Hello Word: I love Python!"\r\n</python>\r\n==\r\n\r\nResult:\r\n<python>\r\n#!/usr/bin/python\r\n# -*- coding: UTF-8 -*-\r\n\r\n"""Ein kleines Skript"""\r\n\r\nprint "Hello Word: I love Python!"\r\n</python>\r\n\r\n\r\n<hr class="big_hr">\r\n\r\nh1. Embed source code generally\r\n\r\nWith the ==<code=ext>== Tag you can highlight everything, which offers Pygments.\r\n\'ext\' is the file extension.\r\n\r\nexamples:\r\n\r\n==\r\n<code=php>\r\n<?php\r\n$conn_id = ftp_connect($ftp_server);\r\n?>\r\n</code>\r\n<code=css>\r\nbody {\r\n  color: black;\r\n}\r\n</code>\r\n==\r\n\r\nResult:\r\n\r\n<code=php>\r\n<?php\r\n$conn_id = ftp_connect($ftp_server);\r\n?>\r\n</code>\r\n<code=css>\r\nbody {\r\n  color: black;\r\n}\r\n</code>\r\n\r\n<hr class="big_hr">\r\n\r\nh1. Escaping\r\n\r\nText inner two "="-chars would be escaped.\r\n\r\nexample:\r\n--------\r\n========\r\nTable: <table width="90%" border="0" align="center">\r\nLink: <a href="URL">txt</a>\r\nInput: <input type="submit" value="preview" />\r\n========\r\n\r\nIt goes also within a flow text:\r\nHere ist no Link: ========<a href="URL">txt</a>======== nice?\r\n\r\n<hr class="big_hr">\r\n\r\nh1. pre-Formarted-Text\r\n\r\nYou can use the ==<pre>== tag. tinyTextile ingnore the Markup in the area.\r\n\r\n<pre>\r\nExample:\r\n---------\r\nh2. Not a textile headline\r\n<h3>Manuelly h3 headline with html tags</h3>\r\n* This is not a...\r\n* ...textile list\r\n</pre>\r\n\r\n<hr class="big_hr">\r\n\r\nh1. HTML-Code\r\n\r\nYou can insert any HTML code directy in you page. tinyTextile ingnore it.', 2, 0, u'tinyTextile example', u'TinyTextileExample', u'complete tinyTextile Formating examples', 1, 1, 2, u'', u'', '2007-06-22 09:48:29', '2007-06-22 09:51:45', 1, 1, True, True, None, None]