tips
Django Tips #19 Protecting Sensitive Information
The internet is a wild land. Security must be priority one when deploying a web application on the internet. The Django framework does an amazing job providing reliable and secure APIs. But none of that matters if we don’t use them properly.
tutorial
How to Handle GitHub Webhooks Using Django
tutorial
How to Add Social Login to Django
tips
Django Tips #18 Difference Between ugettext And ugettext_lazy
The Django translation API provides several utility functions to help you translate your application. They are all
available in the django.utils.translation
module. For the most cases you will be using ugettext()
and
ugettext_lazy()
.
tutorial
How to Deploy a Django Application to Digital Ocean
DigitalOcean is a Virtual Private Server (VPS) provider. In my opinion it’s a great service to get started. It’s cheap and very simple to setup. In this tutorial I will guide you through the steps I go to deploy a Django application using Ubuntu 16.04, Git, PostgreSQL, NGINX, Supervisor and Gunicorn.
tutorial
How to Use Django's Generic Relations
You probably have already seen Django’s ContentTypes and wondered how to use it or what is it for anyway. Basically it’s a built in app that keeps track of models from the installed apps of your Django application. And one of the use cases of the ContentTypes is to create generic relationships between models. That’s what this post is about.
packages
How to Use django-hosts Library
This is a very handy Django package that I’ve used in a couple of projects. Essentially django-hosts let you serve different parts of your application under different subdomains. For example, let’s say we have a Django application deployed on www.example.com. With this app you can serve an e-commerce under shop.example.com and the help center under help.example.com. And in the end, it’s just a single Django website.
references
List of Useful URL Patterns
The ability to create beautiful and meaningful urls is certainly something I love about the Django Framework. But truth is, it’s very hard to get it right. Honestly I always have to refer to the documentation or to past projects I’ve developed, just to grab the regex I need.
packages
How to Use Python isort Library
isort is a Python utility / library to sort imports alphabetically, and automatically separated into sections. It’s very useful in Django projects, specially in views where we usually deal with a great amount of imports.
tips
Django Tips #17 Using QuerySet Latest & Earliest Methods
Similar to the QuerySet methods first
and last
, the API also offer the earliest
and latest
methods. They
are convenience methods which can be used to enhance the readability of the code.
- ← Previous
- First page
- Page 6 of 11
- Last page
- Next →