django

How to create Photo Gallery with Django

Introduction Here we will see how to create photo gallery with Django. Photo gallery also known as image gallery, media gallery or photo album is used to manage your photos. You can view the images one by one from a list of images in a gallery. In this example we will use some images to […]

Creating custom template tags and filter in Django

Introduction Creating custom tags and filter in Django templates is pretty simple. It acts like a custom function that can be used in Django templates. The situation may occur where you need to split a string or you need to access array element using variable as an index, then you have to create custom tags […]

Working with media files in Django templates

Introduction In this tutorial we will see working with media files in Django templates. Media files, such as, images, videos etc. are frequently loaded into our web application as these files improve end users’ experience. Note that static resources or files and media files are two different things. Media files are generally uploaded by users […]

Working with static resources in Django templates

Introduction In this tutorial we will see working with static resources in Django templates. Static resources, such as, css (Cascading Style Sheet), images, js (JavaScript) are frequently required to include in our web application as these resources increase look and feel and to handle any events of the web pages. Django provides django.contrib.staticfiles to help […]

Working with parent and child templates in Django

Introduction Here we will see working with template inheritance in Django or on other words, working with parent and child templates in Django. Being a web framework, Django needs a convenient way to generate HTML dynamically. The most common approach relies on templates. A template contains the static parts of the desired HTML output as […]

Scroll to top