django的外键查询
假设我有两个表(model),分别叫useraccount和userrole:
class UserAccount(meta.Model):
person = meta.ForeignKey(Person, core=True)
account = meta.ForeignKey(User, core=True)
class UserRole(meta.Model):
...
想飞之心,永远不死!
假设我有两个表(model),分别叫useraccount和userrole:
class UserAccount(meta.Model):
person = meta.ForeignKey(Person, core=True)
account = meta.ForeignKey(User, core=True)
class UserRole(meta.Model):
...
在水木的python版看到这样一个题目,很多人给出了很多方法,其中有两个很pythonic,而且比较通用,作为一个小trick记下来:
一种方法是用itertools里的chain方法,chain的作用是将多个迭代组...
参考了这几篇文章:Emacs23安装配置慢慢来、EmacsCvsAndDebian、Emacs CVS on Debian、HOWTO: Install GNU Emacs with antialiasing,在debian sid上安装了emacs23,把安装的步骤写一下:
1. 准备工作,要安装ssh和tex...
move to the place of first space, M+\, done :p
...I just find this article aptitude versus apt-get , as it said, aptitude will remove dependencies when you remove a package, apt-get not.
...For example I want to start gedit, but i want to check whether it is running already
pidof gedit > /dev/null || gedit &
debian repositories:
deb http://deb.opera.com/opera/ unstable non-free
ubuntu repositories:
deb http://archive.canonical.com/ubuntu dapper-commercial main