One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
# Import EmailMessage class - https://docs.djangoproject.com/en/1.9/topics/email/#django.core.mail.EmailMessage | |
from django.core.mail import EmailMessage | |
email = EmailMessage('... Subject ...', '... Body ...', 'from-email', | |
['to-email-1', 'to-email-2'], ['bcc-email-1', 'bcc-email-2']) | |
# now let's create a csv file dynamically | |
import csv, StringIO | |
attachment_csv_file = StringIO.StringIO() | |
writer = csv.writer(attachment_csv_file) |
FROM python:3 as build-system | |
RUN pip install -U pip | |
COPY requirements.txt requirements.txt | |
### create temporary image used to download and vendor packages using private key ### | |
FROM build-system as intermediate | |
# add credentials on build |
# users/admin.py | |
from django.contrib import admin | |
from django.contrib.auth import get_user_model | |
from django.contrib.auth.admin import UserAdmin | |
from .forms import CustomUserCreationForm, CustomUserChangeForm | |
from .models import CustomUser | |
class CustomUserAdmin(UserAdmin): | |
add_form = CustomUserCreationForm |