
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"
]




from textwrap import dedent
from test_app.settings import *

INSTALLED_APPS += ("cmsplugin_rst",)

 
## DJANGO CMSPLUGIN RST CONF ##

if not os.environ.get("CMSPLUGIN_RST_SKIP_CONF"):  # use this flag to test the zero-conf case

    CMSPLUGIN_RST_WRITER_NAME = "html4css1"

    CMSPLUGIN_RST_CONTENT_PREFIX = dedent("""

    .. |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
                                        "smart_quotes": "alt"}
                                        #"'language_code': "fr"  # weirdly 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"
    ]


Make test settings skippable via CMSPLUGIN_RST_SKIP_CONF environment variable.
Make test settings skippable via CMSPLUGIN_RST_SKIP_CONF environment variable.

  
+ from textwrap import dedent
  from test_app.settings import *
  
  INSTALLED_APPS += ("cmsplugin_rst",)
  
- 
+  
  ## DJANGO CMSPLUGIN RST CONF ##
  
- CMSPLUGIN_RST_WRITER_NAME = "html4css1"
+ if not os.environ.get("CMSPLUGIN_RST_SKIP_CONF"):  # use this flag to test the zero-conf case
  
- CMSPLUGIN_RST_CONTENT_PREFIX = """
+     CMSPLUGIN_RST_WRITER_NAME = "html4css1"
  
+     CMSPLUGIN_RST_CONTENT_PREFIX = dedent("""
+ 
- .. |nbsp| unicode:: 0xA0 
+     .. |nbsp| unicode:: 0xA0 
-    :trim:
+        :trim:
      
- *Global Prefix: Start of Content*
+     *Global Prefix: Start of Content*
  
- """
+     """)
  
- CMSPLUGIN_RST_CONTENT_SUFFIX =  \
+     CMSPLUGIN_RST_CONTENT_SUFFIX =  \
- """*Global Suffix: End of Content*"""
+     """*Global Suffix: End of Content*"""
  
  
- CMSPLUGIN_RST_SETTINGS_OVERRIDES = {"initial_header_level": 2, # minimum "h2" when rendered to html
+     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"}
+                                         "smart_quotes": "alt"}
-                                     #"'language_code': "fr" ## SEEMS BROKEN!
+                                         #"'language_code': "fr"  # weirdly seems BROKEN!
  
-                                     
+                              
- def add_stuffs_to_soup(soup):
+     def add_stuffs_to_soup(soup):
-     soup.div.append("""String Appended Via Beautifulsoup Postprocessor""")
+         soup.div.append("""String Appended Via Beautifulsoup Postprocessor""")
  
- CMSPLUGIN_RST_POSTPROCESSORS = [
+     CMSPLUGIN_RST_POSTPROCESSORS = [
-     "test_settings.add_stuffs_to_soup"
+         "test_settings.add_stuffs_to_soup"
- ]
+     ]
  
  
- 
Make test settings skippable via CMSPLUGIN_RST_SKIP_CONF environment variable.
## Code Before:

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"
]



## Instruction:
Make test settings skippable via CMSPLUGIN_RST_SKIP_CONF environment variable.
## Code After:

from textwrap import dedent
from test_app.settings import *

INSTALLED_APPS += ("cmsplugin_rst",)

 
## DJANGO CMSPLUGIN RST CONF ##

if not os.environ.get("CMSPLUGIN_RST_SKIP_CONF"):  # use this flag to test the zero-conf case

    CMSPLUGIN_RST_WRITER_NAME = "html4css1"

    CMSPLUGIN_RST_CONTENT_PREFIX = dedent("""

    .. |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
                                        "smart_quotes": "alt"}
                                        #"'language_code': "fr"  # weirdly 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"
    ]

