'WSGIRequest' object has no attribute 'build
AttributeError at /blog/8/share/
'WSGIRequest' object has no attribute 'build_absolute_uri'
Request Method: POST Request URL: localhost
Django Version: 1.8.6
Exception Type: AttributeError Exception Value:
'WSGIRequest' object has no attribute 'build_absoulte_uri'
Traceback: File "/home/shaik/code/my_env/lib/python3.5/site-packages/django/core/handlers/base.py" in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/shaik/code/mysite/blog/views.py" in post_share
post_url=request.build_absoulte_uri(post.get_absolute_url())
Exception Type: AttributeError at /blog/8/share/
Exception Value: 'WSGIRequest' object has no attribute 'build_absolute_uri'
You might have implemented a context processor in middleware due which the data is not available in views. you may required to create your own custome middleware.
You are having a typo in method name.
It's build_absolute_uri
not build_absoulte_uri
上一篇: OLE自动化推出MS Word并带到前台