MeaCulpa
发表于 2012-03-26 14:21
skywalk163 发表于 2012-03-24 22:48 static/image/common/back.gif
hehe ,小的用webpy,大的用pylons
这个世界就ok了
善! 不知道现在Pyramid怎样了. 这个[小]和[大]的意义非凡!
dooros
发表于 2012-03-30 00:38
投了 django 和 web.py ,django可以说比较臃肿了,其实flask真心不错。
追忆的风筝
发表于 2012-04-01 16:15
大家有关于Web框架的资料文档或是开源项目代码吗?欢迎分享!;P
ygl23
发表于 2012-05-02 16:24
回复 3# zyd320
哪里的python社区比较火啊,帮忙推荐几个。
ygl23
发表于 2012-05-02 16:26
本帖最后由 ygl23 于 2012-05-02 16:29 编辑
有没有用过 Nginx + UWSGI + Django 搭建python高性能WEB服务器环境
1、平台环境说明
1.1、项目位置:/opt/www/Purgesys
创建项目方法:
cd /opt/www
django-admin.py startproject Purgesys
1.2、查看项目(出现以下文件结构说明项目已创建成功)
#tree Purgesys
Purgesys
|-- __init__.py
|-- manage.py
|-- settings.py
`-- urls.py
2、 启动应用
python manage.py runserver
正常访问 http://127.0.0.1:8000/
http://cupic.img168.net/bbsfile/forum/201205/02/122331i44h228iad24g8ga.jpg
3、创建应用模块
cd /opt/www/Purgesys
vi django.py
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'Purgesys.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
uwsgi 启动应用
uwsgi -s : 9000 -w django.py
错误信息:
*** Starting uWSGI 1.2-rc3 (64bit) on ***
compiled with version: 4.1.2 20080704 (Red Hat 4.1.2-48) on 01 May 2012 14:16:56
detected number of CPU cores: 2
current working directory: /opt/osqa/Purgesys
detected binary path: /usr/sbin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** WARNING: you are running uWSGI without its master process manager ***
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
uwsgi socket 0 bound to TCP address :36530 (port auto-assigned) fd 3
Python version: 2.5.1 (r251:54863, May1 2012, 14:14:04)
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x798fa80
your server socket listen backlog is limited to 100 connections
*** Operational MODE: single process ***
File "./django.py", line 2
os.environ['DJANGO_SETTINGS_MODULE'] = 'Purgesys.settings'
^
IndentationError: unexpected indent
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 29694, cores: 1)
向各位大虾请教,这是什么原因,如何解决?
lcmust
发表于 2012-05-03 11:02
回复 15# ygl23
uwsgi 启动应用
uwsgi -s : 9000 -w django.py
改下启动的参数,试试:
uwsgi -s :9000--wsgi-file django.py
xxw19840406
发表于 2012-05-10 10:28
正打算学习看看结果
shaneqi
发表于 2012-05-17 22:01
大家看怎么样 我认为很好.
ccne
发表于 2012-05-22 13:34
Tornado:victory:
ulovko
发表于 2012-06-15 17:51
Django :emn31: @_@