forked from extern/django-helpdesk
fixing those two python files
This commit is contained in:
parent
179ceb2f82
commit
f017adea63
@ -31,7 +31,7 @@ The default is : ::
|
||||
Whatever you pass in, will replace the *Python Interface by Fuzzyman* part.
|
||||
**0.2.0** will change with the version of this interface.
|
||||
|
||||
Usage example::
|
||||
Usage example:
|
||||
|
||||
from akismet import Akismet
|
||||
|
||||
@ -203,13 +203,13 @@ class Akismet(object):
|
||||
worked out.
|
||||
"""
|
||||
data['comment_content'] = comment
|
||||
if not 'user_ip' in data:
|
||||
if 'user_ip' not in data:
|
||||
try:
|
||||
val = os.environ['REMOTE_ADDR']
|
||||
except KeyError:
|
||||
raise AkismetError("No 'user_ip' supplied")
|
||||
data['user_ip'] = val
|
||||
if not 'user_agent' in data:
|
||||
if 'user_agent' not in data:
|
||||
try:
|
||||
val = os.environ['HTTP_USER_AGENT']
|
||||
except KeyError:
|
||||
|
@ -109,6 +109,7 @@ def api_return(status, text='', json=False):
|
||||
|
||||
|
||||
class API:
|
||||
|
||||
def __init__(self, request):
|
||||
self.request = request
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user