所以我刚开始使用django-postman==3.2.2
,我正试图使用django-ajax-selects==1.3.6
来集成auto-complete,而使用django-authtools==1.2.0
来获得一个定制的用户模型,但运气不佳。在
设置.py
AJAX_LOOKUP_CHANNELS = {
'postman_users': dict(model='authtools.user', search_field='email'),
}
POSTMAN_AUTOCOMPLETER_APP = {
'arg_default': 'postman_users',
}
AUTH_USER_MODEL = 'authtools.User'
我试着从model='authtools.user
改为model='auth.user
,但没用。在
网址.py
^{pr2}$然后转到内置的postman视图http://localhost:8000/messages/write/,当我填充接收者输入时,什么也没有发生。在
我错过了什么?这不应该只在这些设置下工作吗?在
作为一种解决方法,我最终使用了
django-autocomplete-light
,我发现它比django-ajax-selects
更容易使用和理解 然后,我创建了自己的扩展表单并传递到write视图:在我的网址.py公司名称:
^{pr2}$我想是因为这个。在
相关问题 更多 >
编程相关推荐