Note that there are some explanatory texts on larger screens.

plurals
  1. POtastypie -- OAuthAuthentication -- python-oauth2 import issue
    primarykey
    data
    text
    <p>I am wishing to use OAuthAuthentication in tastypie. In my ModelResource, I do: (showing only the relevant portion)</p> <pre><code>`from tastypie.authentication import OAuthAuthentication class FooResource(ModelResource): class Meta: authentication = OAuthAuthentication()` </code></pre> <p>And I get an error saying: The 'python-oauth2' package could not be imported. It is required for use with the 'OAuthAuthentication' class.</p> <p>Before this, I did a pip install of python-oauth(below), but subsequently, it continues the complaint above. Do I need to do anything else in my resource or anywhere else to explicitly import this?</p> <pre><code>`pip install -r http://code.daaku.org/python-oauth/reqs Obtaining urlencoding from git+git://github.com/nshah/python-urlencoding.git#egg=urlencoding (from -r http://code.daaku.org/python-oauth/reqs (line 1)) Cloning git://github.com/nshah/python-urlencoding.git to ./src/urlencoding Running setup.py egg_info for package urlencoding Obtaining oauth from git+git://github.com/nshah/python-oauth.git#egg=oauth (from -r http://code.daaku.org/python-oauth/reqs (line 2)) Cloning git://github.com/nshah/python-oauth.git to ./src/oauth Running setup.py egg_info for package oauth Requirement already satisfied (use --upgrade to upgrade): distribute in /usr/lib/python2.6/site-packages (from urlencoding-&gt;-r http://code.daaku.org/python-oauth/reqs (line 1)) Downloading/unpacking setuptools-git (from urlencoding-&gt;-r http://code.daaku.org/python-oauth/reqs (line 1)) Downloading setuptools-git-0.4.2.tar.gz Running setup.py egg_info for package setuptools-git Installing collected packages: urlencoding, oauth, setuptools-git Running setup.py develop for urlencoding Creating /usr/lib/python2.6/site-packages/urlencoding.egg-link (link to .) Adding urlencoding 0.0.1 to easy-install.pth file Installed /usr/lib/python2.6/site-packages/tastypie/src/urlencoding Running setup.py develop for oauth Creating /usr/lib/python2.6/site-packages/oauth.egg-link (link to .) Adding oauth 0.0.1 to easy-install.pth file Installed /usr/lib/python2.6/site-packages/tastypie/src/oauth Running setup.py install for setuptools-git Successfully installed urlencoding oauth setuptools-git Cleaning up...` </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload