Hi > On Mon, 2007-04-02 at 15:24 +1000, Michael Lake wrote: > >>Hi all >>I have a problem I think when I use the markup package. This provides >>markdown, >>textile and restructuredtext markups. I have the following in views.py: >> >>def testwiki: >> >> content = ''' >>Restructured Text Test >>====================== .... >>''' >> >>return render_to_response("app/testwiki.html" , {'content': content}) >>In testwiki.html I have {{ content|restructuredtext}} >> >>The page is displayed but there is no heading level 1 i.e. I'm missing >>"Restructured >>Text Test". If I place any character above the heading like 'a' then the >>heading >>shows fine. It also works fine if I have a H1 anywhere lower down. But If I >>just wish >>to have one H1 level Im in problems.
Malcolm Tredinnick wrote: > This is normal Restructured Text behaviour, although I agree it's a bit > weird when you first see it. It's kind of a consequence of a ReST > feature combined with us (Django) diving into the middle of the output > processing pipeline to extract only what we need. > > There is no specific way to specify the document title or subtitle. So > ReST uses the initial *unique* heading markup as the document title. The > restructured text template tag only returns the document "fragment" > after the markup has been performed. This does include the document > title, which is why you are "losing" the first heading. > > This is in the ReST documentation > (http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html ) > under "Document Structure", if you care. > > Not sure what a good workaround would be that is always going to work. Bugger :-) That will probably wipe it out of use for me. I'm writing an app where users will be inputting experiment descriptions using a wiki hence the use of either markdown, textile or ReST. There will only be one H1 level. Markdown is nice but does not have tables (I have a table extension for Python-Markdown but it looks comlicated to install), textile uses h1., h2. which I don't like as much and ReST looked fine. The users will also be incorporating text entry boxes into the wiki so I have written a small filter that turns [[name=volts size=40]] into <input name="volts" size=40/>. It's neat but I wanted the tables to allow users to align the input boxes. I'll probably have to look at extending Markdown and potter back here and ask questions when I get stuck. Thanks Malcolm. Mike -- Michael Lake --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---