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
# -*- coding: utf-8 -*- | |
# TODO FIXME HARD-CODING KLUDGE MONKEYS PATCHING EACH OTHER | |
# Django (1.2 at least), I DON'T LIKE YOU | |
class FakeSQLUnicode(unicode): | |
def as_sql(*args, **kwargs): | |
# See django.db.models.sql.compiler, get_grouping, the place with `hasattr(col, 'as_sql') | |
# MySQL GROUP BY doesn't work with COALESCE() in GROUP BY, | |
# failing with Database error 1111, "invalid use of group function". | |
# Solution: convert the aggregate to the `id` which is there anyway! :D |
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
# -*- coding: utf-8 -*- | |
""" | |
Phantom JS test drivers for Django | |
Tips: | |
* to check a value of a (global) JS variable, one can use: | |
driver.execute_script('return <variable_name>') | |
""" |
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
"Ciribim ciribom" | |
Ciribim ciribom | |
älä luule että uskotaan | |
Ciribim ciribom | |
sua enää ollenkaan | |
Tytön täytyy ymmärtää | |
se milloin häntä narrataan |