Quick start

Create your project

django-admin.py startproject ourblog
cd ourblog

Configure settings

Now, edit ourblog/settings.py

First, setup your database, timezone and directories. Consult the Django docs for getting additional information.

Then, add ‘diario’ into INSTALLED_APPS tuple.

The next step is to configure URL dispatcher. Edit ourblog/urls.py file:

from django.conf.urls.defaults import *
from diario.views.entries import EntryList, EntryDetail

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
 url(r'^$', EntryList.as_view(), name='diario-entry-list'),
 url('^(?P<slug>[-\w]+)/$', EntryDetail.as_view(), name='diario-entry-detail'),
 url(r'^admin/', include(admin.site.urls)),
)

Okay, you’ve almost done!

Create templates

You need to make a smart design for your blog first. Then, consult the django documentation to get additional information about templates.

For this guide, you need to create exactly two template pages:

entry_list.html - context contains object_list variable.

entry_detail.html - context contains object variable.

Initialize database

python manage.py syncdb
python manage.py migrate diario

Example project

We have an example project that uses Diario. Visit https://bitbucket.org/semente/the-diary/ to see how it works.