Skip to content

Python3pkg/FeinCMS-Responsive-Content-Type

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Responsive content types for FeinCMS

This Django package allows you to create responsive content types with FeinCMS. It allows users to select the number of columns they want for small, medium of large screens, per content type. These contenttypes are wrapped in divs, containing the corresponding Foundation classes.

Installation

Use pip to install the package

$ pip install responsive_content_type

In your Django settings, add responsive_content_type to the INSTALLED_APPS

INSTALLED_APPS = (
    ...
    'responsive_content_type',
    ...
)

Usage

To create a responsive content type, simpy import the ResponsiveContentType class and extend it. Next, in your templates folder, create a folder called content, containing the template for this content type. Finally, instead of the usual {% feincms_render_region feincms_page “main” request %} template tag, use the new {% render_responsive_region feincms_page “main” request %}. This package will handle the rest.

Example:

# models.py
from django.db import models
from responsive_content_type.models import ResponsiveContentType


class Paragraph(ResponsiveContentType):
    text = models.CharField(_('Text'), max_length=200)
    
    class Meta:
        abstract = True
<!-- templates/content/paragraph.html -->
<p>
    {{ content.text }}
</p>

To do

  • Make Python 3 compatible
  • Add Bootstrap support

About

Add Foundation based content types to FeinCMS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 76.9%
  • JavaScript 19.4%
  • HTML 3.7%