Day 3 - Writing the model

[Still working on this]

By now we have the model in place and we can use the admin interface to create or edit any of the tables. Use the admin interface to create a Blog and a Comment on that. The admin model is useful if you just want to do CRUD operations on the tables, [...]

Day 2 - The basic model

Django provides a very nice ORM, which means you generally would not need to write database queries. IMO, Django’s well designed and very simple ORM is one of its strongest points. So lets dive in and start some code.
Before we start interacting with the database we need to tell Django the database connection details. This, [...]

Day 1 - Your first code

Before we get into the deep and the dirty of coding the Blog applications, lets check if the server parses the Python code. Modify the f:\project\urls.py to tell what function we want to be called when we access a page. Lets have a simple welcome page when we access /dBlog/

from django.conf.urls.defaults import *
urlpatterns = patterns(’dBlog.views’,
(r’^dBlog/$’, [...]

Day 1 - The first steps.

I use windows as my development platform. By the way, you have installed Django, haven’t you. If not head over to installation guide and install. We want to start a Django project and then a Django application inside the project.

F:\>django-admin.py startproject project
F:\>cd project
F:\project>django-admin.py startapp dBlog
Lets see if everything got created correctly.
F:\project>cd dblog
F:\project\dBlog>dir
Volume in drive F [...]

Deciding on the features

So what do you want to be in your blog? Just the basics please. We will add features as we move along.
We want

A list of all the pages
A detail view of each post
Ability for the blog owner to post
Comments!

Lets get it done.

Building a Django blog.

Some days ago James Bennett asked “Where is Django’s blog application“. And he replies
there is no “definitive” Django blogging application; there are a bunch of them available if you go looking, but you’re not likely to get anyone to recommend one of them as “the” Django blogging app
Well, this is what we are going to [...]