*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
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
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
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
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 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)
"""
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 :
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."
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
9 matches
Mail list logo