My enviorent is :ubuntu 12.04, django 1.6.1 python 3.3.4 nginx 1.4.7 and uwsgi 2.0.2 The problem came when I registered a new user,Exception location is where the code is "if form.is_valid()".
Exception value:[Errno 5] Input/output error
I just test it with the django's development server, NO ERROR!
SO I think the problem lies somewhere with uwsgi or Nginx?
my code dealing with the registration is :
def register(request): form = UserCreationForm() action = "注册" template_name='accounts/auth_form.html' if request.is_ajax() else 'accounts/auth.html' if request.method == "POST": form = UserCreationForm(data=request.POST) ***if form.is_valid():#Exception here*** form.save(request=request) username=request.POST.get('username') email_domain=request.POST.get('email').split('@')[1] if request.is_ajax(): return TemplateResponse(request,"accounts/register_feedback.html",locals()) else: return TemplateResponse(request,"accounts/register_feedback.html",locals()) return TemplateResponse(request,template_name,locals())
Then my uwsgi configuration is just like what the django document provides:
[uwsgi] socket = 127.0.0.1:3031 chdir = /home/fox/KuaiPan/fox/ pythonpath = .. env = DJANGO_SETTINGS_MODULE=myauth.settings module = django.core.handlers.wsgi:WSGIHandler() processes = 4 threads = 2 stats = 127.0.0.1:9191
This problelm is really annoying,how to fix it? THX in advance!
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/84c75d4d-665b-4c2c-bd38-40d5969a30a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment