Steps with explanations to set up a server using:
- Virtualenv
- Virtualenvwrapper
- Django
- Gunicorn
| import requests | |
| from lxml import html | |
| USERNAME = "<USERNAME>" | |
| PASSWORD = "<PASSWORD>" | |
| LOGIN_URL = "https://bitbucket.org/account/signin/?next=/" | |
| URL = "https://bitbucket.org/dashboard/overview" | |
| def main(): |
| from re import compile | |
| from django.conf import settings | |
| from django.http import HttpResponseRedirect | |
| from django.utils.http import is_safe_url | |
| EXEMPT_URLS = [compile(settings.LOGIN_URL.lstrip('/'))] | |
| if hasattr(settings, 'LOGIN_EXEMPT_URLS'): | |
| EXEMPT_URLS += [compile(expr) for expr in settings.LOGIN_EXEMPT_URLS] | |
| class LoginRequiredMiddleware: |
| import os | |
| import sys | |
| import re | |
| import pdb | |
| class EmailParser: | |
| warnings = [] | |
| def __init__(self, filename): |