This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
NOT PRODUCTION READY | |
Usage: | |
REST_FRAMEWORK = { | |
... | |
'DEFAULT_AUTHENTICATION_CLASSES': ( | |
.... | |
'ibr.users.accounts_api_v0.auth.OidcOauth2Auth' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def send_email(self, | |
template_name, | |
context={}, | |
attachments={}, | |
base_message_template='post_office/email_base_text.html', | |
base_message_template_html='post_office/email_base_html.html'): | |
''' | |
Try to send email by Django post_office library, with custom HTML template and | |
respect of user language. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AdvcashProcessor(object): | |
'''Advcash SCI processing class - accept payments, check checksums and more | |
Developer documentation: | |
http://advcash.com/files/documents/sci_russian_2.pdf | |
Usage: | |
processor = MyWebsiteAdvcashProcessor(request_data, logger=transactions_logger) | |
verification_success = processor.validate() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
# encoding: utf-8 | |
# src: https://gist.github.com/anonymous/06e0bd519490c8f03404 | |
# habraproxy.py — это простейший http-прокси-сервер, запускаемый локально , который показывает содержимое страниц Хабра. | |
# С одним исключением: после каждого слова из шести букв должен стоять значок «™». | |
# Мне было по фану. | |
# | |
# INSTALL: | |
# pip install requests lxml | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OkpayProcessor(object): | |
'''OKPAY payment notification check and enrollment class. | |
https://dev.okpay.com/en/manual/ipn/listener-implementation.html | |
https://dev.okpay.com/en/manual/ipn/testing.html | |
https://dev.okpay.com/en/guides/accepting-payments.html#ipn | |
https://dev.okpay.com/en/guides/client-verification.html#code | |
Usage: | |
processor = MyWebsiteOkpayProcessor(request.POST, logger=transactions_logger) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BASE_URL = "URL HERE"; | |
module.exports = { | |
'Register test': function (test) { | |
REGISTER_URL = BASE_URL + '/profile/register/'; | |
test_user_data = { | |
'username': 'test_user' + Math.round(Math.random() * 10000 + 10000), | |
}; | |
test | |
.open(BASE_URL + '/profile/logout/') |