[Django] how to debug when I send the data by POST.

2013-03-11 Thread lx
*hi: * * I'm a new one in django, I' using the django recevice the data by POST.* *for examle:* wget -v --post-file=conf.xml http://192.168.23.21:8001/time/ *this way can't show the wrong message, when I write the wrong code like this:* conf_xml = request.body root = ET.fromst

How to get the the filename of WGET?

2013-03-29 Thread lx
hi all: I want to send information to django use this: wget -v --post-file=conf.xml http://192.168.23.73:8001/ipdb_file/ And the Python code is: def receive(request): """ receive all the xml form myCONF. """ if request.method == 'POST': conf

How to change the {{ form.as_table }}

2013-04-07 Thread lx
hi, I'm using the forms,and* the code is:* from django import forms class dcForm(forms.Form): """ """ TOPIC_CHOICES = ( ('cnccdn', 'cnccdn.com'), ('lxcdns', 'lxcdns.com'), ('wscdns', 'wscdns.com'),) dnssystem = forms.ChoiceField(choices=TOPIC_CHOICES) dn = f

What's wrong with the Basic configuration of apache and mod_python?

2013-05-09 Thread lx
hi: the the Basic configuration of apache is: LoadModule python_module /usr/lib64/httpd/modules/mod_python.so SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE mysite.settings PythonOption django.root /mysite

Re: What's wrong with the Basic configuration of apache and mod_python?

2013-05-10 Thread lx
I have choiced to use the wsgi. 2013/5/10 lx > hi: > the the Basic configuration of apache is: > > LoadModule python_module /usr/lib64/httpd/modules/mod_python.so > > SetHandler python-program > PythonHandler django.core.handlers.modpy

hi [django-users] How to do something after "return HttpResponse(html)"?

2013-06-25 Thread lx
hi all: I want to do someing after "return HttpResponse(html)". for example "" from django.http import HttpResponse import datetime def current_datetime(request): now = datetime.datetime.now() html = "It is now %s." % now return HttpResponse(html) """

Re: hi [django-users] How to do something after "return HttpResponse(html)"?

2013-06-25 Thread lx
Thank you. The real demand is: 1. receive the xml file from client. 2. if (the xml format is ERROR) == True: return HttpResponse(ERROR FORMAT") else: return HttpResponse(RIGHT FORMAT") #I must give a response first, And do other thing. Because the spend time of do_something() may be

hi [django-users]How to define the response?

2013-06-25 Thread lx
hi : I'm a new one. I want to fix a question.Like this: from django.http import HttpResponse import datetime def current_datetime(request): now = datetime.datetime.now() if now == 2013: html = "It is now %s."

Re: hi [django-users] How to do something after "return HttpResponse(html)"?

2013-06-25 Thread lx
be called in second plane, and the user > will get an instant response, even if the parsing file process takes half > an hour > > > On Tuesday, June 25, 2013 8:32:59 AM UTC-5, lx wrote: > >> Thank you. >> >> The real demand is: >> >> 1. >> receive t