Revision e015e9e6 astakos/im/admin/views.py
b/astakos/im/admin/views.py | ||
---|---|---|
56 | 56 |
from astakos.im.admin.forms import AdminProfileForm |
57 | 57 |
from astakos.im.admin.forms import AdminUserCreationForm |
58 | 58 |
from astakos.im.settings import BYPASS_ADMIN_AUTH, ADMIN_PAGE_LIMIT, DEFAULT_CONTACT_EMAIL, DEFAULT_FROM_EMAIL |
59 |
|
|
60 |
logger = logging.getLogger(__name__) |
|
61 |
|
|
59 | 62 |
def requires_admin(func): |
60 | 63 |
""" |
61 | 64 |
Decorator checkes whether the request.user is a superuser and if not |
... | ... | |
311 | 314 |
'support': DEFAULT_CONTACT_EMAIL % sitename.lower()}) |
312 | 315 |
sender = DEFAULT_FROM_EMAIL % sitename |
313 | 316 |
send_mail(subject, message, sender, [user.email]) |
314 |
logging.info('Sent greeting %s', user)
|
|
317 |
logger.info('Sent greeting %s', user)
|
|
315 | 318 |
|
316 | 319 |
@requires_admin |
317 | 320 |
@transaction.commit_manually |
Also available in: Unified diff