tips
Django Tips #19 Protecting Sensitive Information
![Django Tips #19 Protecting Sensitive Information](/media/2016/11/featured-tip19.jpg)
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
![How to Handle GitHub Webhooks Using Django](/media/2016/10/featured-webhooks.jpg)
tutorial
How to Add Social Login to Django
![How to Add Social Login to Django](/media/2016/10/featured-social.jpg)
tips
Django Tips #18 Difference Between ugettext And ugettext_lazy
![Django Tips #18 Difference Between ugettext And ugettext_lazy](/media/2016/10/featured-tip18.jpg)
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
![How to Deploy a Django Application to Digital Ocean](/media/2016/10/featured-do.jpg)
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
![How to Use Django's Generic Relations](/media/2016/10/featured-generic.jpg)
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
![How to Use django-hosts Library](/media/2016/10/featured-django-hosts.jpg)
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
![List of Useful URL Patterns](/media/2016/10/featured-urls.jpg)
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
![How to Use Python isort Library](/media/2016/10/featured-isort.jpg)
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
![Django Tips #17 Using QuerySet Latest & Earliest Methods](/media/2016/10/featured-tip17.jpg)
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 →