Skip to main content

Django Fiber - a simple, user-friendly CMS for all your Django projects

Project description

Installation:

$ pip install django-fiber

Requirements:

These dependencies are automatically installed:

django-mptt>=0.4.2
django-piston==0.2.3rc1
beautifulsoup>=3.2.0
PIL>=1.1.7
django-staticfiles>=1.0.1
django-compressor>=0.7.1

Optionally, you may need:

textile>=2.1.5
South>=0.7.3

Settings:

settings.py

MIDDLEWARE_CLASSES = (
        ...
        'fiber.middleware.ObfuscateEmailAddressMiddleware',
        'fiber.middleware.AdminPageMiddleware',
        'fiber.middleware.PageFallbackMiddleware',
        ...
)

TEMPLATE_CONTEXT_PROCESSORS = (
        ...
        'django.core.context_processors.request',
        'staticfiles.context_processors.static_url',
        'fiber.context_processors.page_info',
        ...
)

INSTALLED_APPS = (
        ...
        'mptt',
        'staticfiles',
        'compressor',
        'fiber',
        ...
)

import os
BASE_DIR = os.path.abspath(os.path.dirname(__file__))

STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
STATICFILES_FINDERS = (
        'staticfiles.finders.FileSystemFinder',
        'staticfiles.finders.AppDirectoriesFinder',
        'compressor.finders.CompressorFinder',
)

COMPRESS_JS_FILTERS = ()

Optional settings:

These settings are optional (default values are shown):

FIBER_DEFAULT_TEMPLATE = 'base.html'
FIBER_TEMPLATE_CHOICES = []

FIBER_EXCLUDE_URLS = []

FIBER_IMAGES_DIR = 'uploads/images'
FIBER_FILES_DIR = 'uploads/files'

FIBER_METADATA_PAGE_SCHEMA = {}
FIBER_METADATA_CONTENT_SCHEMA = {}

COMPRESS = [the opposite of DEBUG]

urls.py

...
(r'^api/v1/', include('fiber.api.urls')),
(r'^admin/fiber/', include('fiber.admin_urls')),
(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', {'packages': ('fiber',),}),
...

if settings.DEBUG:
        urlpatterns += patterns('staticfiles.views',
                url(r'^static/(?P<path>.*)$', 'serve'),
        )

Post-installation:

Create database tables:

$ python manage.py syncdb

All static Fiber files need to be symlinked in (or copied to) your media folder:

$ python manage.py collectstatic --link

Usage:

At the beginning of your template(s), load the Fiber template tags:

{% load fiber_tags %}

Using the Fiber template tags, you can:

  • write out content items, that either

    • have a specified name

    • are linked to a specific location on the current page

    • are linked to a specific location on another page

  • write out valid XHTML menu structures

    • of pages below a named root page (this is the menu name),

    • limited to a minimum and maximum level (depth),

    • that mark the currently active page,

    • optionally expanding all descendants of the currently active page,

    • with all possible css hooks you could ever need

Content items

You can write out content items with the ‘show_content’ and ‘show_page_content’ template tags:

{% show_content "content_item_name" %}
{% show_page_content "block_name" %}
{% show_page_content other_page "block_name" %}

Examples

This shows content item named ‘address’:

{% show_content "address" %}

This shows content items that are linked to the location named ‘content’ on the current page:

{% show_page_content "content" %}

This shows content items that are linked to the location named ‘content’ on another page ‘other_page’:

{% show_page_content other_page "content" %}

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

django-fiber-0.9.4.tar.gz (2.2 MB view details)

Uploaded Source

File details

Details for the file django-fiber-0.9.4.tar.gz.

File metadata

File hashes

Hashes for django-fiber-0.9.4.tar.gz
Algorithm Hash digest
SHA256 73b82c6ad03a4db33e77fb1a6a384a6435434726063178863b7100c6a69efcb2
MD5 f92b12b0552c0e5d60db572803e81612
BLAKE2b-256 eaf0597da3c79a743054562a98c95bacb5fa06d5e767a46396d8884057ec1f94

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page