问题
I am trying to use the Django-Postman
framework to send messages between users in Django 2.0
.
I have installed the app and made the necessary changes as mentioned in the docs of the framework.
However when i try to go the the message urls I get a blank page (like this screenshot):
Here is what I have done so far:
- Installed
django-postman
In
settings.py
INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'postman', 'account', 'cart', 'shop', 'landingpage', ] POSTMAN_I18N_URLS = True # default is False POSTMAN_DISALLOW_ANONYMOUS = True # default is False POSTMAN_DISALLOW_MULTIRECIPIENTS = True # default is False POSTMAN_DISALLOW_COPIES_ON_REPLY = True # default is False POSTMAN_DISABLE_USER_EMAILING = True # default is False POSTMAN_FROM_EMAIL = 'from@host.tld' # default is DEFAULT_FROM_EMAIL POSTMAN_AUTO_MODERATE_AS = True # default is None POSTMAN_SHOW_USER_AS = 'get_full_name' # default is None POSTMAN_NAME_USER_AS = 'last_name' # default is None POSTMAN_QUICKREPLY_QUOTE_BODY = True # default is False POSTMAN_NOTIFIER_APP = None # default is 'notification' POSTMAN_MAILER_APP = None # default is 'mailer'
And I have linked urls this way in
urls.py
url(r'^messages/', include('postman.urls', namespace='postman')),
How can I solve this problem?
回答1:
There appears to be a email backend missing. For example, I added:
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
POSTMAN_AUTO_MODERATE_AS = True # default is None
来源:https://stackoverflow.com/questions/51835312/django-postman-implementation-for-sending-messages