Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > HTTP (WWW)

    django-flatpages-tinymce 0.1.1

    Download button

    No screenshots available
    Downloads: 199  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    McLaud Jr | More programs
    MIT/X Consortium Lic... / FREE
    March 30th, 2011, 08:18 GMT [view history]
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    django-flatpages-tinymce description

    HTML editor on django.contrib.flatpages

    django-flatpages-tinymce is a Django app that provides on-site editing of "Flat Pages" with minimal impact on the rest of code.

    Usage:

    First of all, you need to have django-flatpages-tinymce and django-tinymce installed; for your convenience, recent versions should be available from PyPI.

    To use, just add these applications to your INSTALLED_APPS after django.contrib.flatpages app:

    INSTALLED_APPS = (
     ...
     'django.contrib.flatpages',
     ...
     'tinymce',
     'flatpages_tinymce',
    )


    If you want on-site editing of templates, you must edit flatpages templates: change {{flatpage.content} to {% flatpage_admin flatpage %} from flatpage_admin template library. So

    {% extends "base.html" %}
    {% block body %}
    {% endblock %}
    {% block body %}
    < h1 >{{flatpage.title}}< /h1 >
    {{flatpage.content}}
    {% endblock %}


    will become

    {% extends "base.html" %}
    {% load flatpage_admin %}
    {% block body %}
    < h1 >{{flatpage.title}}< /h1 >
    {% flatpage_admin flatpage %]
    {% endblock %}


    If you are bothered with < script >/< link > tags, being inserted in < body > tag and your template has something like {% block extrahead %}, you can move all plugin media in head, using {% flatpage_media %} tag.

    {% extends "base.html" %}
    {% block extrahead %}
    {% flatpage_media %}
    {% endblock %}
    {% block body %}
    < h1 >{{flatpage.title}}< /h1 >
    {% flatpage_admin flatpage %}
    {% endblock %}


    Settings

    Default settings are in flatpages_tinymce.settings.py file. Also, you can override them in site-wide settings.py file. The main of them are:

     FLATPAGES_TINYMCE_ADMIN (default True) - use TinyMCE widget in admin area
     FLATPAGES_TINYMCE_FRONTEND (default True) - use TinyMCE widget in frontend
     FLATPAGES_TEMPLATE_DIR (default: TEMPLATE_DIRS[0] + 'flatpages') - directory where flatpages templates are placed
     FLATPAGES USE_MINIFIED (defalut: not settings.DEBUG) - use minified versions of JS/CSS


    Further, you will want to change default settings of TinyMCE Editor.

    TINYMCE_DEFAULT_CONFIG = {
     # custom plugins
     'plugins': "table,spellchecker,paste,searchreplace",
     # editor theme
     'theme': "advanced",
     # custom CSS file for styling editor area
     'content_css': MEDIA_URL + "css/custom_tinymce.css",
     # use absolute urls when inserting links/images
     'relative_urls': False,
    }



    Product's homepage

    Requirements:

    · Python
    · django-tinymce
    · Django

    What's New in This Release: [ read full changelog ]

    · Minor issues with IE8.0.

      


    TAGS:

    HTML editor | flat pages | django.contrib.flatpages | Django | tinymce

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM