This file contains 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
/Google\ Chrome\ Canary --enable-logging --v=1 --vmodule=*/webrtc/*=2,*/libjingle/*=2,*=-2 --enable-logging=stderr | |
// Easier: | |
/Google\ Chrome\ Canary --enable-logging --v=1 --vmodule=*/webrtc/*=2,*=-2 --enable-logging=stderr |
This file contains 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 project.utils import classmaker | |
class Category(TranslatableModel, MPTTModel): | |
# https://github.com/ojii/django-nani/issues/39 | |
__metaclass__ = classmaker() | |
This file contains 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
# modified version of http://tomforb.es/using-python-metaclasses-to-make-awesome-django-model-field-choices | |
# that preserves order of definition | |
import inspect, itertools | |
class Option(object): | |
_counter = itertools.count() | |
def __init__(self, value, verbose_name=None): | |
self._count = Option._counter.next() |