Ticket #2858: hostname.diff
File hostname.diff, 1.2 KB (added by , 18 years ago) |
---|
-
global_settings.py
1 1 # Default Django settings. Override these with settings in the module 2 2 # pointed-to by the DJANGO_SETTINGS_MODULE environment variable. 3 3 4 import socket 5 4 6 # This is defined here as a do-nothing function because we can't import 5 7 # django.utils.translation -- that module depends on the settings. 6 8 gettext_noop = lambda s: s … … 88 90 DEFAULT_CHARSET = 'utf-8' 89 91 90 92 # E-mail address that error messages come from. 91 SERVER_EMAIL = 'root@localhost' 93 try: 94 SERVER_EMAIL = 'root@%s' % socket.gethostname() 95 except: 96 SERVER_EMAIL = 'root@localhost' 92 97 93 98 # Whether to send broken-link e-mails. 94 99 SEND_BROKEN_LINK_EMAILS = False … … 146 151 147 152 # Default e-mail address to use for various automated correspondence from 148 153 # the site managers. 149 DEFAULT_FROM_EMAIL = 'webmaster@localhost' 154 try: 155 DEFAULT_FROM_EMAIL = 'webmaster@%s' % socket.gethostname() 156 except: 157 DEFAULT_FROM_EMAIL = 'webmaster@localhost' 150 158 151 159 # Subject-line prefix for email messages send with django.core.mail.mail_admins 152 160 # or ...mail_managers. Make sure to include the trailing space.