Django Postman实现,用于发送消息

时间:2018-08-14 06:50:52

标签: python django django-urls django-messages

我正在尝试使用private void onpostExe() { if (points != null && points.size() > 0) { PolylineOptions lineOptions; lineOptions = new PolylineOptions(); lineOptions.addAll(points); lineOptions.width(8); lineOptions.color(Color.RED); lineOptions.geodesic(true); mMap.addPolyline(lineOptions); } 框架在Django-Postman中的用户之间发送消息。 我已经安装了该应用,并按照in the docs of the framework进行了必要的更改。

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

blank page

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

  1. 已安装Django 2.0
  2. django-postman

    settings.py
  3. 我已经在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'

    中以这种方式链接了网址
    urls.py

我该如何解决这个问题?

2 个答案:

答案 0 :(得分:1)

如果您在本地主机上,请尝试http://127.0.0.1:8000/postman/message/。它应该可以解决问题。screenshot of the app url

答案 1 :(得分:0)

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

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
POSTMAN_AUTO_MODERATE_AS = True  # default is None