Blog

Viewing posts by ravi

Django Pagination of Data

Pagination is, dividing data into multiple pages each of fixed size. Modern web applications host huge amounts of data and returning all the data at once is not only not user-friendly but it can choke the network.

Django Form Customization and Validation - Adding Your Own Validation Rules

We had a basic introduction to Django's Forms and Model forms in my previous post. We will now discuss in detail the validation of form data.

Django Forms and Model Forms

What is a form?

Forms are the most generic way of accepting input from the sites users. A form is a set of HTML input elements enclosed in the <form>...</form> tags. An HTML form submits the data using either GET or POST HTTP methods and the data is of the form of key-value pairs. These values can be accessed from the request object's GET/POST attributes in the view.

Django Middleware - The new version of middleware and how to use it?

What is Django's Middleware?

Django's middleware framework allows the developers to hook into the request/response processing. They allow us to alter the request/response globally on every request/response cycle. For example the AuthenticationMiddleware alters and associates the request object with a user (using sessions) for each request, which is passed on to the views.

Python and the Context Managers

Context managers is one of those features of Python that makes it extremely easy to write clean code. Context managers are extensively used by Python programmers, but very few understand how they work. Let us explore them a bit.

Recent Posts

Archive

2022
2021
2020
2019
2018
2017
2016
2015
2014

Tags

Authors

Feeds

RSS / Atom