Skip to content

Instantly share code, notes, and snippets.

View Tairy's full-sized avatar
😀
Focusing

Gengrui Guo Tairy

😀
Focusing
View GitHub Profile
'''
adminreverse from here http://djangosnippets.org/snippets/2032/
changed for working with ForeignKeys
'''
'''
reverseadmin
============
Module that makes django admin handle OneToOneFields in a better way.
A common use case for one-to-one relationships is to "embed" a model
inside another one. For example, a Person may have multiple foreign
@myvyang
myvyang / thread_pool.py
Last active August 21, 2018 06:47
简易线程池
# -*- coding: utf-8 -*-
#author: myvyang#gmail.com
import threading
import Queue
__all__ = ["ThreadPool"]
class ThreadPool(object):