Skip to main content

RichText Content with TYPE_CHOICES configurability

Project description

feincms_richtextplus is a feincms plugin that copies the functionality of the original RichTextContent, and adds TYPE_CHOICES configuration option

Convenient when you need to render RichText data using different templates which you can pick from admin page

Installation

  1. Add “feincms_richtextplus” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = (
        ...
        'feincms_richtextplus',
    )
    
  2. Create RichTextPlusContent for your Page model (or any other Base-derived model) like this:

    from feincms_richtextplus.models import RichTextPlusContent
    # ...
    Page.create_content_type(SimpleTableContent, TYPE_CHOICES=(
        ('default', 'default richtextplus'),
        ('wrapped', 'wrapped data'),
        # ... (other TYPE_CHOICES)
    ))
    
  3. Define templates for every TYPE_CHOICES entry, i.e.:: project_dir/app/templates/content/richtextplus/default.html project_dir/app/templates/content/richtextplus/wrapped.html

  4. Migrate Page

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
feincms_richtextplus-1.1.0-py3-none-any.whl (6.2 kB) Copy SHA256 hash SHA256 Wheel py3
feincms_richtextplus-1.1.0.tar.gz (5.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page