This file contains hidden or 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
| from selenium import webdriver | |
| from selenium.webdriver.common.by import By | |
| class Page(object): | |
| """ | |
| Base class that all page models can inherit from | |
| """ | |
| def __init__(self, selenium_driver, base_url='https://test.axial.net', parent=None): | |
| self.base_url = base_url |
This file contains hidden or 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
| from myapp.utils import set_current_user | |
| class CurrentUserMiddleware: | |
| def process_request(self, request): | |
| set_current_user(getattr(request, 'user', None)) | |