• Posted by allwinraju
  • December 20, 2020
  • 0 Comments

Cookies in Django – Setting, retrieving and deleting cookies

HTTP is a stateless protocol so when a request is sent to the server, it does not know whether you are requesting the page for the first time or you are the same user who has visited this page many times before. This HTTP statelessness was a problem for ecommerce website developers because persistence among […]

Read More
  • Posted by allwinraju
  • December 19, 2020
  • 0 Comments

Python one-liners

This blog post contains some of the python one-liners which I have gathered from various sources. The link to the repository is given below. If you are interested you can also add your own one-liners if I have missed any. https://github.com/Allwin12/python-one-liners anagram binary to decimal convert string to lower case convert string to upper case […]

Read More
  • Posted by allwinraju
  • December 9, 2020
  • 0 Comments

Credit card number validation using Luhn’s algorithm in python

In this blog post, we shall how to validate a credit card number using Luhn’s algorithm. We shall also learn about Luhn’s algorithm where and how it is used. This blog post also contains a sample python code to validate the credit card number. Luhn’s algorithm The Luhn algorithm or Luhn formula, also known as the “modulus 10” […]

Read More
  • Posted by allwinraju
  • December 8, 2020
  • 0 Comments

XML response in Django using Django-rest-framework

In this article, we shall see how to return the response from our Django project in XML format instead of the traditional JSON response. We have to install a third-party package first in order to render XML response. REST Framework XML provides a simple informal XML format. It was previously included directly in the REST […]

Read More