Simple, flexible app for integrating static, unstructured content in a Django site
Project description
django-pagelets
Simple, flexible app for integrating static, unstructured content in a Django site
Features
“Pagelets” for adding small pieces of content to otherwise static templates
CMS “pages” which include any number of pagelets and, if needed, attachments
Different pagelet content types including HTML and Markdown
An integrated WYSIWYG editor (WYMeditor) which can be selectively enabled/disabled
Dependencies
Required
Django admin site - The django.core.context_processors.request context processor
Optional
WYMeditor (included in pagelets media)
Installation and Setup
django-pagelets is available on PyPI, so the easiest way to install it is to use pip:
pip install django-pagelets
Add pagelets to INSTALLED_APPS in settings.py and run syncdb:
INSTALLED_APPS = ( ..., 'pagelets', ... )
Add the pagelets URLs to urls.py, e.g.:
urlpatterns += patterns('', (r'^pagelets/', include('pagelets.urls.content')), (r'^pagelets-management/', include('pagelets.urls.management')), )
In development, you can serve pagelet’s static media in urls.py:
import pagelets path = os.path.join(os.path.dirname(pagelets.__file__), 'media') urlpatterns += patterns('', ( r'^%spagelets/(?P<path>.*)' % settings.MEDIA_URL.lstrip('/'), 'django.views.static.serve', {'document_root': path, 'show_indexes': True} ), )
Visit the admin site, add and save a new page, and click the View on site link. If everything is setup correctly, you should be able to see and edit the content you just added.
Development sponsored by Caktus Consulting Group, LLC..
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
File details
Details for the file django-pagelets-0.5.1.tar.gz
.
File metadata
- Download URL: django-pagelets-0.5.1.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dc8b891308240d533859a88bf0e7ef0d24e1f9b55573be41905a127e2545f3f |
|
MD5 | 7ba074ff946d13c435a40d694731b102 |
|
BLAKE2b-256 | bc3a457671461038fa22accb297ebb1c984a4e9437e75cd310f91364bff58b5f |