Dear all,

The current header is:

HTTP/1.0 200 OK

Date: Thu, 01 Dec 2016 08:33:29 GMT

Server: WSGIServer/0.1 Python/2.7.12

X-Frame-Options: SAMEORIGIN

Content-Type: text/xml

And the process code is :

from django.shortcuts import render

from django.http import HttpResponse

import xml.etree.ElementTree as ET

import re

# Create your views here.

from .forms import AddForm

ns = {'SOAP-ENV':'', \

      'SOAP-ENC':'', \

      'xsi':'', \


def index(request):

    if request.method == 'POST':



        root = ET.fromstring(request.body)


        body = root.find('SOAP-ENV:Body', ns)

        inform = body.find('cwmp:Inform', ns)

        header = root.find('SOAP-ENV:Header', ns)

        idObj = header.find('cwmp:ID', ns)

        #print idObj.text

        #s = request.session()

        #print s

        return render(request, 'tools/cwmpInformResponse.html', {'cwmpID': 


        form = AddForm()

    return render(request, 'tools/index.html', {'form': form})

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 post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

Reply via email to