Django Nomadblog¶
This is a basic Django application implementing the simplest form of a blogging system. It is capable of managing multible blogs and users. It has been written with an eye put on keeping modularity and flexibility as much as possible, so you won’t find lots of goodies in the code (tagging, related posts, blogroll), but just a couple of features to help you start hacking it to your needs.
Contents:
Installation¶
The package is listed in the Python Package Index. You can use your favorite
package manager like easy_install
or pip
:
pip install django-nomadblog
Or, you can clone the latest development code from its repository:
git clone git@github.com:nabucosound/django-nomadblog.git
Add nomadblog
to the INSTALLED_APPS
setting of your settings.py
:
INSTALLED_APPS = (
...
'nomadblog',
)
If you use South you can run the included migrations:
./manage.py migrate nomadblog
If you don’t, use your own migration tool or simply syncdb
:
./manage.py syncdb
Configuration¶
Multiblog¶
A simple project setting and a URL pattern is all we need to configure our django-omadblog installation for single or multiple blog management.
If you want to maintain multiple blogs, enable the following variable in your project settings:
NOMADBLOG_MULTIPLE_BLOGS = True
Multiblog-enabled configurations require that the urls receive the blog_slug
:
# Add this pattern into your root url conf
urlpatterns = patterns('',
...
(r'^blogs/(?P<blog_slug>[-\w]+)/', include('nomadblog.urls')),
Otherwise just do:
(r'^blog', include('nomadblog.urls')),
Default Post model¶
By default, django-nomadblog
uses the Post
model, but you can extend it
with your own one, that will be then used by the app views:
POST_MODEL = 'yourapp.models.YourExtendedPostModel'
Post status’ choices¶
By default posts can be draft, private or public, only public ones are listed or displayed. You can override your status choices as well as which one of the choices is the display filter for listings:
POST_STATUS_CHOICES = (
(0, 'Borrador'),
(1, 'Pendiente de revision'),
(2, 'Revisado'),
(3, 'Publicado'),
)
PUBLIC_STATUS = 3