Skip to content

Instantly share code, notes, and snippets.

View tuxcanfly's full-sized avatar
🏠
Working from home

Javed Khan tuxcanfly

🏠
Working from home
View GitHub Profile
class ImportFieldForm(LazyModelForm):
label = forms.ChoiceField(choices=(), required=False)
header = forms.ChoiceField(choices=(), required=False, error_messages={'valid': 'Please choose a star rating'})
class Meta:
model = ImportField
def __init__(self, *args, **kwargs):
self.labels = kwargs.pop('labels')
self.headers = kwargs.pop('headers')
self.helper = FormHelper()
@tuxcanfly
tuxcanfly / selenium_dom.py
Created May 31, 2012 07:33 — forked from pamelafox/selenium_dom.py
Python Selenium Dom Helper Functions
from selenium.common.exceptions import NoSuchElementException, TimeoutException
class DomHelper(object):
driver = None
waiter = None
def open_page(self, url):
self.driver.get(url)
/*
*
* Author: Scott Borduin, Lioarlan, LLC
* License: GPL (http://www.gnu.org/licenses/gpl.html) -or- MIT (http://www.opensource.org/licenses/mit-license.php)
*
* Release: 0.15
*
* Acknowledgement: Based partly on public contributions from members of the Sencha.com bulletin board.
*
*/