You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.check() seems to work fine (I get back True/False) but submit_spam() and submit_spam() have no return value, so it's unclear whether they worked or not. No errors, just nothing. Should I assume this means the submissions were successful? It would be handy to have a return value to work with, so we could:
if submit_spam(...):
// Do something
The text was updated successfully, but these errors were encountered:
Realizing now that there is a Python akismet lib by ubernostrum, who is a Django core developer. Seems very well documented and maintained. No offense, but I'm going to switch to using that one.
If it does not work, the library returns an exception. Checking if something has worked for what the method returns, is a fudge.
parameters = self._get_parameters(locals())
r = self._request(self.get_submit_spam_url() if is_spam else self.get_submit_ham_url(), parameters)
if r.text != "Thanks for making the web a better place.":
raise AkismetServerError("Akismet server returned an error: {0}".format(r.text))
.check()
seems to work fine (I get back True/False) butsubmit_spam()
andsubmit_spam()
have no return value, so it's unclear whether they worked or not. No errors, just nothing. Should I assume this means the submissions were successful? It would be handy to have a return value to work with, so we could:The text was updated successfully, but these errors were encountered: