
from test_app.settings import *

INSTALLED_APPS += ("cmsplugin_rst",)


## DJANGO CMSPLUGIN RST CONF ##

CMSPLUGIN_RST_WRITER_NAME = "html4css1"

CMSPLUGIN_RST_CONTENT_PREFIX = """

.. |nbsp| unicode:: 0xA0 
   :trim:
    
*Global Prefix: Start of Content*

"""

CMSPLUGIN_RST_CONTENT_SUFFIX =  \
"""*Global Suffix: End of Content*"""


CMSPLUGIN_RST_SETTINGS_OVERRIDES = {"initial_header_level": 2, # minimum "h2" when rendered to html
                                    "doctitle_xform": False, # important, to have even lone titles stay in the html fragment
                                    "sectsubtitle_xform": False, # we disable the promotion of the title of a lone subsection to a subtitle
                                    'file_insertion_enabled': False,  # SECURITY MEASURE (file hacking)
                                    'raw_enabled': False, # SECURITY MEASURE (script tag)
                                    'smart_quotes': "alt"}
                                    #"'language_code': "fr" ## SEEMS BROKEN!

                                    
def add_stuffs_to_soup(soup):
    soup.div.append("""String Appended Via Beautifulsoup Postprocessor""")

CMSPLUGIN_RST_POSTPROCESSORS = [
    "test_settings.add_stuffs_to_soup"
]



@@ -1,8 +1,36 @@
+%0Afrom textwrap import dedent
 %0Afrom te
@@ -93,16 +93,17 @@
 rst%22,)%0A%0A
+ 
 %0A## DJAN
@@ -128,16 +128,115 @@
 ONF ##%0A%0A
+if not os.environ.get(%22CMSPLUGIN_RST_SKIP_CONF%22):  # use this flag to test the zero-conf case%0A%0A    
 CMSPLUGI
@@ -268,16 +268,20 @@
 4css1%22%0A%0A
+    
 CMSPLUGI
@@ -303,21 +303,32 @@
 REFIX = 
+dedent(
 %22%22%22%0A%0A
+    
 .. %7Cnbsp
@@ -345,16 +345,20 @@
 : 0xA0 %0A
+    
    :trim
@@ -364,16 +364,20 @@
 m:%0A    %0A
+    
 *Global 
@@ -403,21 +403,30 @@
 ntent*%0A%0A
+    
 %22%22%22
+)
 %0A%0A
+    
 CMSPLUGI
@@ -451,16 +451,20 @@
 IX =  %5C%0A
+    
 %22%22%22*Glob
@@ -495,16 +495,20 @@
 t*%22%22%22%0A%0A%0A
+    
 CMSPLUGI
@@ -639,468 +639,13 @@
     
-%22doctitle_xform%22: False, # important, to have even lone titles stay in the html fragment%0A                                    %22sectsubtitle_xform%22: False, # we disable the promotion of the title of a lone subsection to a subtitle%0A                                    'file_insertion_enabled': False,  # SECURITY MEASURE (file hacking)%0A                                    'raw_enabled': False, # SECURITY MEASURE (script tag)%0A                                    '
+    %22
 smar
@@ -652,17 +652,17 @@
 t_quotes
-'
+%22
 : %22alt%22%7D
@@ -662,16 +662,20 @@
  %22alt%22%7D%0A
+    
         
@@ -730,16 +730,24 @@
 fr%22 
-## SEEMS
+ # weirdly seems
  BRO
@@ -785,16 +785,13 @@
     
-   
+%0A
     
-%0A
 def 
@@ -816,16 +816,20 @@
 (soup):%0A
+    
     soup
@@ -896,16 +896,20 @@
 or%22%22%22)%0A%0A
+    
 CMSPLUGI
@@ -933,16 +933,20 @@
 ORS = %5B%0A
+    
     %22tes
@@ -980,8 +980,11 @@
 up%22%0A
+    
 %5D
-%0A
 %0A%0A

Make test settings skippable via CMSPLUGIN_RST_SKIP_CONF environment variable.