Joseph Oseh Frank's blog

Create a blog application with django, part 7: add pagination in django blog

When you start adding content to your blog, you will soon realize you need to split the list of posts across several pages. Django has a built-in pagination class that allows you to manage paginated data easily.

Read more

Create a blog application with django, part 6: create django templates

Now that We have created views and URL patterns for the blog application. It's time to create the HTML templates to display posts in a user-friendly manner. The render() function looks for HTML templates inside a directory called templates inside your app directory.

Read more

Create a blog application with django, part 5: write django views

A Django view is just a Python function that receives a web request and returns a web response. All the logic to return the desired response goes inside the view. First, we will create our application views, then we will define a URL pattern for each view, and finally, we …

Read more

Create a blog application with django, part 4: django querysets and managers

Now that you have a fully functional administration site to manage your blog's content, it's time to learn how to retrieve information from the database and interact with it. Django comes with a powerful database abstraction API that lets you create, retrieve, update, and delete objects easily. The Django Object-relational …

Read more

Create a blog application with django, part 3: create django admin site

Now that we have defined the Post model, we will create a simple administration site to manage your blog posts. Django comes with a built-in administration interface that is very useful for editing content. The Django admin site is built dynamically by reading your model metadata and providing a production-ready …

Read more