在项目中用到验证码,懒得去找,自己随便写了一个: views.py: def get_check_code_image(request,image='media/images/checkcode.gif'): import Image, ImageDraw, ImageFont, random im = Image.open(image) draw = ImageDraw.Draw(im) mp = md5.new() mp_src = mp.update(str(datetime.now())) mp_src = mp.hexdigest() rand_str = mp_src[0:4] draw.text...
by hkebao - Python文档中心 - 2009-08-14 16:47:44 阅读(2375) 回复(0)
大家好,小弟初用django,想用它来完成一个GUI界面,里面的功能也很简单,就是把后台需要配置的文件展现在GUI界面里,直接通过界面配置,并保存生效。在网上查了半天没有类似的例子,网上看到的多半是投票或者blog系统。请教大家有谁做过类似的东东,有没有可参考的资料,多谢!!!
观影感:Powerful force leads to justice 对待那些喷我的喷子,要让这种狗学会尊重人,就得给它来些实实在在的让它拒绝不了的! :em17:
看django的教程书,介绍的都是如何用好django自带的form模块。 很少介绍使用html的form,我的问题是需要尽可能的去用django自带的form模块吗? 唉 复杂的form页面,用django的form很烦呀。
This post has been written using CentOS 5.2, but these instructions may also work for other versions. Just let us know if they don’t. Install EPEL Extra Packages for Enterprise Linux (EPEL) is “a repository of high-quality add-on packages that complement the Fedora-based Red Hat Enterprise Linux [...] and its compatible spinoffs such as CentOS or Scientific Linux.” You need this repository ...
django is opensource Web framework written in Python. django loosely follows MVC design pattern. django being written in Python you should have some knowledge of Python. You can download django from http://www.djangoproject.com/download . I have been using django since its 0.96 release. Today I decided to write a small application using it. As django follows design pattern similar to MVC lets fi...
这几天在学习django,现在我把碰到的一些问题和解决方法,记录下来。环境是windows xp。 1.安装python2.5. 2.安装mysql5.0,和mysql-python,也就是MySQLdb这个包。注意在安装mysql时候,需要将所用的字符集设置成utf8,如果没有设置,则在建立数据的时候一定做设置成utf8,否则在利用django admin site的时候会出现错误。 3.安装django0.96或者django 1.0。这两个版本有一些不一样,其中一个问题是在models.py这个文件中, django...
使用心得:nginx处理大并发比较稳定,特别省 内存 ,配置简单. 1.安装pythoncd /usr/ports/lang/python make install clean 2.安装flup cd /usr/ports/www/py-flup make install clean 3.安装 django 1) cd /usr/ports/www/py-django make install clean 4.安装 nginx cd /usr/ports/www/nginx make install clean 5.启动和管理flup的脚本 参考 http://www.djangoproject.com/documentation/fastcgi/ #!/bin/sh # Replace these thr...
django on Nginx 建议:FreeBSD RELENG_6 使用心得:nginx处理大并发比较稳定,特别省内存,配置简单. 1.安装python cd /usr/ports/lang/python make install clean 2.安装flup cd /usr/ports/www/py-flup make install clean 3.安装django 1) cd /usr/ports/www/py-django make install clean 4.安装nginx cd /usr/ports/www/nginx make install clean 5.启动和管理flup的脚本 参考 http://www.djangoproject.co...
安装python: http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi 安装wxPython: http://nchc.dl.sourceforge.net/sourceforge/wxpython/wxPython2.6-win32-ansi-2.6.4.0-py25.exe 安装SPE: http://nchc.dl.sourceforge.net/sourceforge/spe/SPE-0.8.2.a-wx2.6.1.0-py24.exe 安装django: svn co http://code.djangoproject.com/svn/django/trunk/ ...