tutorial
How to Setup Amazon S3 in a Django Project
In this tutorial you will learn how to use the Amazon S3 service to handle static assets and the user uploaded files, that is, the media assets.
Q&A
Ask Vitor #3: Mocking Emails
Phillip Ahereza asks:
I’m writing unit tests for my django app and I was wondering if there are any packages for mocking email or if there is any way I could mock sending and receiving of emails.
tips
Django Tips #20 Working With Multiple Settings Modules
Usually, it’s a good idea to avoid multiple configuration files, instead, keep your project setup simple. But that’s
not always possible, as a Django project starts to grow, the settings.py
module can get fairly complex. In those
cases, you also want to avoid using if
statements like if not DEBUG: # do something...
. For clarity and strict
separation of what is development configuration and what is production configuration, you can break down
the settings.py
module into multiple files.
tutorial
How to Configure Mailgun To Send Emails in a Django Project
In this tutorial you will learn how to setup a Django project to send emails using the Mailgun service.
tutorial
How to Deploy a Django Application on RHEL 7
In this tutorial, you will learn how to deploy a Django application with PostgreSQL, Nginx, Gunicorn on a Red Hat Enterprise Linux (RHEL) version 7.3. For testing purpose I’m using an Amazon EC2 instance running RHEL 7.3.
Q&A
Ask Vitor #2: How to dynamically filter ModelChoice's queryset in a ModelForm?
Michał Strumecki asks:
I just want to filter select field in a form, regarding a currently logged user. Every user has own categories and budgets. I want to display only a models related with a currently logged user. I’ve tried stuff with filtering beforeis_valid
field, but with no result.
article
Class-Based Views vs. Function-Based Views
If you follow my content here in the blog, you probably have already noticed that I’m a big fan of function-based views. Quite often I use them in my examples. I get asked a lot why I don’t use class-based views more frequently. So I thought about sharing my thoughts about that subject matter.
Q&A
Ask Vitor #1: Getting form data to appear in URL and for use in the next view
Devon Moore asks:
I want to have the user specify a date in a custom form. This date will append the current URL with the date valuepath/YYYY-MM-DD/
I then need to capture the date and use it to filter data from the database to display that date’s data.
I’m using class based views and for the report I’m using generic view since this view is a custom report I’m building using multiple db models.
tutorial
How to Create Django Admin List Actions
Django Admin list actions are meant to be used to perform operations in bulk. All Django Admin list views already come with a default action “Delete selected <ModelName>s”. In this short tutorial I will guide you through the steps to create your own list actions.
tutorial
How to Create Infinite Scroll With Django
In this tutorial I will show you how to implement a very simple infinite scrolling with Django. Basically we will take advantage of Django’s pagination API and a jQuery plug-in. You will find examples using both function-based views and class-based views.
- ← Previous
- First page
- Page 4 of 11
- Last page
- Next →