Commits

Guilherme Gondim  committed 2b17a02 Merge

Merged up

  • Participants
  • Parent commits f8d170f, 7d2c6c8
  • Branches 2.x-exper1

Comments (0)

Files changed (2)

File doc/source/index.rst

 
    intro
    versions  
-
+   quickstart
 
 Indices and tables
 ==================

File doc/source/quickstart.rst

+Quick start
+============
+
+Create your project
+-------------------
+
+.. code-block:: sh
+
+ 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:
+
+.. code-block:: python
+
+ 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
+------------------------
+
+.. code-block:: sh
+ 
+ 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.