16fa837eb6a023dc7d7a3366c1608b55ec0ab318
[cas.git] / src / emails / views.py
1 from django.contrib.auth.decorators import login_required
2 from django.shortcuts import render
3 from .models import Alias
4 from . import BASE_DOMAINS
5
6
7 @login_required
8 def my_aliases(request):
9     return render(request, 'emails/my_aliases.html', {
10         'base': ['{}@{}'.format(request.user.username, dom) for dom in BASE_DOMAINS],
11         'to_me': Alias.get_to_user(request.user),
12         'from_me': Alias.get_from_user(request.user),
13         })