Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.
/ django-conman Public archive

NOT READY: Work in progress. A content management system for django

License

Notifications You must be signed in to change notification settings

meshy/django-conman

Repository files navigation

django-conman

Coverage Status Build Status Requirements Status

A CONtent MANagement system for Django. (Get it?)

Requirements

Tested against:

  • Python 3.4, 3.5, 3.6
  • Django >=1.10

Requires (should be automatically installed if using pip):

  • django-polymorphic

Install

# From PyPI...
pip install django-conman

# ...or from source
pip install -e git+https://github.com/meshy/django-conman.git#egg=conman

Minimal configuration

# settings.py
INSTALLED_APPS += ['conman.routes']

# urls.py
urlpatterns = [
    # All other URLS should go above this catch-all.
    url(r'', include('conman.routes.urls')),
]

Basic custom app

In the following example, MyRoute.trusted_content contains HTML that is safe to be rendered directly into a template. Only use |safe with extreme caution in your own projects.

# my_template.html
{{ route.trusted_content|safe }}


# models.py
from conman.routes.models import Route

class MyRoute(Route):
    trusted_content = models.TextField()

    template_name = 'my_template.html'


# admin.py
from conman.routes.admin import RouteChildAdmin
from django.contrib import admin
from .models import MyRoute

@admin.register(MyRoute)
class MyRouteAdmin(RouteChildAdmin):
    pass

A more complex example might use a rich text field such as the HTMLField from djagno-tinymce, and be careful to sanitise the HTML with bleach.

About

NOT READY: Work in progress. A content management system for django

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages