Skip to content

Instantly share code, notes, and snippets.

palibaya / gist:5361696
Created Apr 11, 2013
Environment for Behave + Django + Selenium
View gist:5361696
# -*- coding: utf-8 *-*
import os
import urlparse
import logging
from selenium import webdriver
# This is necessary for all installed apps to be recognized, for some reason.
os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings'
def before_all(context):
palibaya / gist:5362798
Last active Dec 16, 2015
Composite Unique
View gist:5362798
class MyModel extends CActiveRecord
public function rules()
return array(
array('attr_a', 'compositeUnique', 'other' => 'attr_b'),
public function compositeUnique($attribute,$params)