fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bugfix for book infobox
[wolnelektury.git]
/
apps
/
piston
/
store.py
diff --git
a/apps/piston/store.py
b/apps/piston/store.py
index
787791a
..
13377d6
100644
(file)
--- a/
apps/piston/store.py
+++ b/
apps/piston/store.py
@@
-23,7
+23,7
@@
class DataStore(oauth.OAuthDataStore):
elif token_type == 'access':
token_type = Token.ACCESS
try:
elif token_type == 'access':
token_type = Token.ACCESS
try:
- self.request_token = Token.objects.get(key=token,
+ self.request_token = Token.objects.get(key=token,
token_type=token_type)
return self.request_token
except Token.DoesNotExist:
token_type=token_type)
return self.request_token
except Token.DoesNotExist:
@@
-32,7
+32,7
@@
class DataStore(oauth.OAuthDataStore):
def lookup_nonce(self, oauth_consumer, oauth_token, nonce):
if oauth_token is None:
return None
def lookup_nonce(self, oauth_consumer, oauth_token, nonce):
if oauth_token is None:
return None
- nonce, created = Nonce.objects.get_or_create(consumer_key=oauth_consumer.key,
+ nonce, created = Nonce.objects.get_or_create(consumer_key=oauth_consumer.key,
token_key=oauth_token.key,
key=nonce)
if created:
token_key=oauth_token.key,
key=nonce)
if created:
@@
-45,10
+45,10
@@
class DataStore(oauth.OAuthDataStore):
self.request_token = Token.objects.create_token(consumer=self.consumer,
token_type=Token.REQUEST,
timestamp=self.timestamp)
self.request_token = Token.objects.create_token(consumer=self.consumer,
token_type=Token.REQUEST,
timestamp=self.timestamp)
-
+
if oauth_callback:
self.request_token.set_callback(oauth_callback)
if oauth_callback:
self.request_token.set_callback(oauth_callback)
-
+
return self.request_token
return None
return self.request_token
return None