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.
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
settings.py module into multiple files.
In this tutorial you will learn how to setup a Django project to send emails using the Mailgun service.
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.
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 before
is_validfield, but with no result.