Adding image to Python Django web app
Adding images and other media files is same as adding other static files. Sometime you may need to segregate images in a separate folder.
Adding images and other media files is same as adding other static files. Sometime you may need to segregate images in a separate folder.
Step by step instruction on how to use Python for website development using Django as the web framework, Visual Studio Code as the editor on macOS.
Here is a simple way to copy a file in Python programming using one of the copy methods in shutil library module.
There are several ways to get a sub-string from a string in Python programming. Here we will see a simple slicing techniques to get sub string.
Here is a simple method to find the current directory of the script file in Python programming using a method from the os module.
Sometime you may need to manually raise exception in Python programming instead of thrown automatically.
There are couple of simple ways to get the last element of a list in Python programming. Let us see both these methods with samples.
Here is a simple tip to find the number of elements in a list in Python programming. Get the count of elements in a list.
Here we will see simple tip to cinvert a string to datetime object in Python programming using the datetime.strptime() method.
To check and parse a string to float, I wrote two simple functions. One of the function checks for float and the other converts the string to a float.
There are couple of efficient ways to merge / join / concatenate multiple lists in Python programming. Let’s see how to use them with example.
Here we will see how to write date from list to a file. We will also see a simple technique to write every list element in separate line in the file.
Here we will see how to open the file, read the contents to a list variable with a line per list item. Reading a file into a list is quiet simple in python.
Simple steps to upgrade python version in visual studio code python workspace environment. Upgrading python virtual environment in VS Code.
list = list should not be used to copy or clone. Doing so will not copy the contents of one list to another. Instead the child list will be a reference to the master list.
In some situations you may need to use more than one exception in a single except clause. Here is the syntax to catch multiple exceptions in a single line.
Here we will see how to generate hash using SHA3 hash code (SHA3-224, SHA3-256, SHA3-384, SHA3-512) algorithms in Python programming.
In this article we will go through how to generate hash using SHA-2 hash code (SHA224, SHA256, SHA384, SHA512) algorithms in Python.
Here we will see how to generate hash codes using SHA1 hash code algorithm in Python programming using the hashlib module.
Lat’s see more about MD5 hash code generation in Python programming with sample codes using hashlib module.