An invalid expression as parameter

2010-06-28 Thread Li Hui
When write >>>i for i in range(16) I get "SyntaxError: invalid syntax" but When I use it like this: >>>def f(x):\ ... pass >>>f(i for i in range(16)) all is right I think it maybe f((i for i in range(16))) -- Li Hui http://www.lihui.org -- http://mail.python.org/mailman/listinfo/python-list

django csrf

2010-06-25 Thread Li Hui
When I add enctype="text/plain" to a post form like , there is a "CSRF verification failed." error. But when I remove it, all is right. Who can tell me why? -- Li Hui http://www.lihui.org -- http://mail.python.org/mailman/listinfo/python-list