2

我正在尝试使用该Django-Postman框架在Django 2.0. 我已经安装了该应用程序并按照框架文档中的说明进行了必要的更改。

但是,当我尝试转到消息网址时,我得到一个空白页面(如此屏幕截图):

空白页

这是我到目前为止所做的:

  1. 已安装django-postman
  2. 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'
    
  3. 我已经以这种方式链接了网址urls.py

    url(r'^messages/', include('postman.urls', namespace='postman')),
    

我怎么解决这个问题?

4

2 回答 2

2

http://127.0.0.1:8000/postman/message/如果您在本地主机上,请尝试。它应该可以解决问题。应用程序网址的屏幕截图

于 2020-01-21T14:04:59.633 回答
0

似乎缺少电子邮件后端。例如,我添加了:

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
POSTMAN_AUTO_MODERATE_AS = True  # default is None
于 2018-10-03T16:20:08.560 回答