Soap web services with Soaplib in Django

2012-04-25 Thread Meenakshi Ithape
I used the Soap web services with Soaplib in Django, for that i take
the help from below link
http://djangosnippets.org/snippets/979/
When i run this code  through command prompt it runs properly, but
when i run it on browser it shows nothing,
Can anybody please help me, what should i done wrong?

Thanks for any suggestions

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Soap web services with Soaplib in Django

2012-04-26 Thread Meenakshi Ithape
Thanks for the reply,
I am new in django, Can you suggest me, how should i display the result 
which is getting from web service display it on web-browser?
I am waiting for the reply.

On Thursday, 26 April 2012 11:36:19 UTC+5:30, somecallitblues wrote:
>
> It's probably a problem with what you're passing to the template or what 
> you have in your template. You should supply some actual code from your 
> view and your template.
>
> -m
>
> On 25 April 2012 15:01, Meenakshi Ithape wrote:
>
>> I used the Soap web services with Soaplib in Django, for that i take
>> the help from below link
>> http://djangosnippets.org/snippets/979/
>> When i run this code  through command prompt it runs properly, but
>> when i run it on browser it shows nothing,
>> Can anybody please help me, what should i done wrong?
>>
>> Thanks for any suggestions
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/cFhWHJUG2rsJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: serving SOAP service with soaplib, consuming with suds

2012-04-26 Thread Meenakshi Ithape
I done this & successfully run the code.
I want to ask that, can it possible to create client through view instead 
of command prompt? 

On Sunday, 24 October 2010 07:54:15 UTC+5:30, Scott Hebert wrote:
>
> Ricko - 
>
> You may have already gotten your answer. I believe your problem is 
> related to Django's CSRF protection. If that's the case, you'll want 
> to import csrf_exempt from django.views.decorators.csrf into your 
> views and then wrap the call to MySOAPService in it. 
>
> For example: 
>
> # views.py 
> from django.views.decorators.csrf import csrf_exempt 
>
>  
>
> my_soap_service = csrf_exempt(MySOAPService([DjangoSoapService], 
> DjangoSoapService.__tns__)) 
>
> In my testing that seemed to work: 
>
> $ python2.5 
> Python 2.5.5 (r255:77872, Sep  7 2010, 10:18:54) 
> [GCC 4.0.1 (Apple Inc. build 5490)] on darwin 
> Type "help", "copyright", "credits" or "license" for more information. 
> >>> from suds.client import Client 
>
> >>> client = Client("http://127.0.0.1:8000/hello_world/service.wsdl";, 
> cache=None, faults=False) 
> >>> response = client.service.hello_world(hello_string="hi") 
> >>> print response 
> (200, hi) 
>
> Let us know if that works for you. 
>
> -- 
> Scott Hebert 
> http://slaptijack.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/SCZExelxyEoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Soap webservice with soaplib & suds

2012-04-26 Thread Meenakshi Ithape
I use soap webservices with soaplib & create client from command prompt 
using suds,
This working properly.
Can anybody tell me how to create client through view instead of command 
prompt?
How to pass oject to @rpc() or @soap() method of soaplib?
How to display webservice response in template or browser?


Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/obRNc13X5YgJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Soap webservice with soaplib & suds

2012-04-26 Thread Meenakshi Ithape
Thanks for the reply, i already done this, & my problem is solved.
But now i have another issue, 
how to send the object to the web_service method or how to check the 
methods parameters type using suds?

On Thursday, 26 April 2012 21:48:51 UTC+5:30, ovnicraft wrote:
>
>
>
> On Thu, Apr 26, 2012 at 8:02 AM, Meenakshi Ithape <
> meenakshi.ith...@gmail.com> wrote:
>
>> I use soap webservices with soaplib & create client from command prompt 
>> using suds,
>> This working properly.
>> Can anybody tell me how to create client through view instead of command 
>> prompt?
>> How to pass oject to @rpc() or @soap() method of soaplib?
>> How to display webservice response in template or browser?
>>
>
>
> I suggest you put your code 'client' from command prompt in a view method 
> so there you can call data and render it in templates.
>
> If you put the logic in the right place then you can show data to users.
>
> Regards, 
>
>
>>
>> Thanks in advance
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/django-users/-/obRNc13X5YgJ.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> -- 
> Cristian Salamea
> @ovnicraft
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/fDwDbKaicYIJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Soap webservice with soaplib & suds

2012-04-27 Thread Meenakshi Ithape
Thanks for the reply, i already done this, & my problem is solved.
But now i have another issue, 
how to send the object to the web_service method or how to check the 
methods parameters type using suds?

On Thursday, 26 April 2012 21:48:51 UTC+5:30, ovnicraft wrote:
>
>
>
> On Thu, Apr 26, 2012 at 8:02 AM, Meenakshi Ithape wrote:
>
>> I use soap webservices with soaplib & create client from command prompt 
>> using suds,
>> This working properly.
>> Can anybody tell me how to create client through view instead of command 
>> prompt?
>> How to pass oject to @rpc() or @soap() method of soaplib?
>> How to display webservice response in template or browser?
>>
>
>
> I suggest you put your code 'client' from command prompt in a view method 
> so there you can call data and render it in templates.
>
> If you put the logic in the right place then you can show data to users.
>
> Regards, 
>
>
>>
>> Thanks in advance
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/django-users/-/obRNc13X5YgJ.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> -- 
> Cristian Salamea
> @ovnicraft
>  

On Thursday, 26 April 2012 21:48:51 UTC+5:30, ovnicraft wrote:
>
>
>
> On Thu, Apr 26, 2012 at 8:02 AM, Meenakshi Ithape wrote:
>
>> I use soap webservices with soaplib & create client from command prompt 
>> using suds,
>> This working properly.
>> Can anybody tell me how to create client through view instead of command 
>> prompt?
>> How to pass oject to @rpc() or @soap() method of soaplib?
>> How to display webservice response in template or browser?
>>
>
>
> I suggest you put your code 'client' from command prompt in a view method 
> so there you can call data and render it in templates.
>
> If you put the logic in the right place then you can show data to users.
>
> Regards, 
>
>
>>
>> Thanks in advance
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/django-users/-/obRNc13X5YgJ.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> -- 
> Cristian Salamea
> @ovnicraft
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/AkYCO7H33jIJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Soap web services with Soaplib in Django

2012-04-27 Thread Meenakshi Ithape
Thanks for the reply, 
I already done this & i create client using suds,& also create the view for 
that client, display message on the browser.
But now i have another issue, 
I create the client, who access the web services from another url, but i 
didn't know
how to send the object to the web_service method or how to check the 
methods parameters type using suds?
If know this ,plz let me know.


On Thursday, 26 April 2012 19:34:06 UTC+5:30, somecallitblues wrote:
>
> Never used that soap client, but from looking at the example on the right 
> you'd do something like this:
>
> def your_view(request):
> from soaplib.client import make_service_client
> from foo.views import HelloWorldService
>  client = make_service_client('http://localhost:8000/hello_world/', 
> HelloWorldService())
>  result = client.say_hello('John', 2)
> d = {'result': result}
> return render_to_response('frontend/paypal.html', d)
>
> But, you probably want to do something with the result of your call before 
> passing it to the template. I can't tell what your web service will return 
> so I can't advise you on that.
>
> Also, there is another great SOAP client for python you may want to look 
> at https://fedorahosted.org/suds/ if you're having issues with this one.
>
> Cheers,
>
> -m
>
> On 26 April 2012 19:26, Meenakshi Ithape wrote:
>
>> Thanks for the reply,
>> I am new in django, Can you suggest me, how should i display the result 
>> which is getting from web service display it on web-browser?
>> I am waiting for the reply.
>>
>> On Thursday, 26 April 2012 11:36:19 UTC+5:30, somecallitblues wrote:
>>>
>>> It's probably a problem with what you're passing to the template or what 
>>> you have in your template. You should supply some actual code from your 
>>> view and your template.
>>>  
>>> -m
>>>
>>> On 25 April 2012 15:01, Meenakshi Ithape wrote:
>>>
>>>> I used the Soap web services with Soaplib in Django, for that i take
>>>> the help from below link
>>>> http://djangosnippets.org/**snippets/979/<http://djangosnippets.org/snippets/979/>
>>>> When i run this code  through command prompt it runs properly, but
>>>> when i run it on browser it shows nothing,
>>>> Can anybody please help me, what should i done wrong?
>>>>
>>>> Thanks for any suggestions
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Django users" group.
>>>> To post to this group, send email to django-users@googlegroups.com.
>>>> To unsubscribe from this group, send email to django-users+unsubscribe@
>>>> **googlegroups.com .
>>>> For more options, visit this group at http://groups.google.com/**
>>>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>>>> .
>>>>
>>>>
>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/django-users/-/cFhWHJUG2rsJ.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/TVxPLjUfbaoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Soap webservice with soaplib & suds

2012-04-27 Thread Meenakshi Ithape
I done this, thanks for the reply

On Friday, 27 April 2012 12:31:50 UTC+5:30, Meenakshi Ithape wrote:
>
> Thanks for the reply, i already done this, & my problem is solved.
> But now i have another issue, 
> how to send the object to the web_service method or how to check the 
> methods parameters type using suds?
>
> On Thursday, 26 April 2012 21:48:51 UTC+5:30, ovnicraft wrote:
>>
>>
>>
>> On Thu, Apr 26, 2012 at 8:02 AM, Meenakshi Ithape wrote:
>>
>>> I use soap webservices with soaplib & create client from command prompt 
>>> using suds,
>>> This working properly.
>>> Can anybody tell me how to create client through view instead of command 
>>> prompt?
>>> How to pass oject to @rpc() or @soap() method of soaplib?
>>> How to display webservice response in template or browser?
>>>
>>
>>
>> I suggest you put your code 'client' from command prompt in a view method 
>> so there you can call data and render it in templates.
>>
>> If you put the logic in the right place then you can show data to users.
>>
>> Regards, 
>>
>>
>>>
>>> Thanks in advance
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msg/django-users/-/obRNc13X5YgJ.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>
>>
>> -- 
>> Cristian Salamea
>> @ovnicraft
>>  
>
> On Thursday, 26 April 2012 21:48:51 UTC+5:30, ovnicraft wrote:
>>
>>
>>
>> On Thu, Apr 26, 2012 at 8:02 AM, Meenakshi Ithape wrote:
>>
>>> I use soap webservices with soaplib & create client from command prompt 
>>> using suds,
>>> This working properly.
>>> Can anybody tell me how to create client through view instead of command 
>>> prompt?
>>> How to pass oject to @rpc() or @soap() method of soaplib?
>>> How to display webservice response in template or browser?
>>>
>>
>>
>> I suggest you put your code 'client' from command prompt in a view method 
>> so there you can call data and render it in templates.
>>
>> If you put the logic in the right place then you can show data to users.
>>
>> Regards, 
>>
>>
>>>
>>> Thanks in advance
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msg/django-users/-/obRNc13X5YgJ.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>
>>
>> -- 
>> Cristian Salamea
>> @ovnicraft
>>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/3vHqRoc8h0AJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Soap web services with Soaplib in Django

2012-04-27 Thread Meenakshi Ithape
I solve this issue

On Friday, 27 April 2012 12:39:59 UTC+5:30, Meenakshi Ithape wrote:
>
> Thanks for the reply, 
> I already done this & i create client using suds,& also create the view 
> for that client, display message on the browser.
> But now i have another issue, 
> I create the client, who access the web services from another url, but i 
> didn't know
> how to send the object to the web_service method or how to check the 
> methods parameters type using suds?
> If know this ,plz let me know.
>
>
> On Thursday, 26 April 2012 19:34:06 UTC+5:30, somecallitblues wrote:
>>
>> Never used that soap client, but from looking at the example on the right 
>> you'd do something like this:
>>
>> def your_view(request):
>> from soaplib.client import make_service_client
>> from foo.views import HelloWorldService
>>  client = make_service_client('http://localhost:8000/hello_world/', 
>> HelloWorldService())
>>  result = client.say_hello('John', 2)
>> d = {'result': result}
>> return render_to_response('frontend/paypal.html', d)
>>
>> But, you probably want to do something with the result of your call 
>> before passing it to the template. I can't tell what your web service will 
>> return so I can't advise you on that.
>>
>> Also, there is another great SOAP client for python you may want to look 
>> at https://fedorahosted.org/suds/ if you're having issues with this one.
>>
>> Cheers,
>>
>> -m
>>
>> On 26 April 2012 19:26, Meenakshi Ithape wrote:
>>
>>> Thanks for the reply,
>>> I am new in django, Can you suggest me, how should i display the result 
>>> which is getting from web service display it on web-browser?
>>> I am waiting for the reply.
>>>
>>> On Thursday, 26 April 2012 11:36:19 UTC+5:30, somecallitblues wrote:
>>>>
>>>> It's probably a problem with what you're passing to the template or 
>>>> what you have in your template. You should supply some actual code from 
>>>> your view and your template.
>>>>  
>>>> -m
>>>>
>>>> On 25 April 2012 15:01, Meenakshi Ithape wrote:
>>>>
>>>>> I used the Soap web services with Soaplib in Django, for that i take
>>>>> the help from below link
>>>>> http://djangosnippets.org/**snippets/979/<http://djangosnippets.org/snippets/979/>
>>>>> When i run this code  through command prompt it runs properly, but
>>>>> when i run it on browser it shows nothing,
>>>>> Can anybody please help me, what should i done wrong?
>>>>>
>>>>> Thanks for any suggestions
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "Django users" group.
>>>>> To post to this group, send email to django-users@googlegroups.com.
>>>>> To unsubscribe from this group, send email to 
>>>>> django-users+unsubscribe@**googlegroups.com
>>>>> .
>>>>> For more options, visit this group at http://groups.google.com/**
>>>>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>>>>> .
>>>>>
>>>>>
>>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msg/django-users/-/cFhWHJUG2rsJ.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/yDxbL_EYf5sJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Import csv file in admin

2012-10-23 Thread Meenakshi Ithape
On Wednesday, 3 November 2010 09:34:38 UTC+5:30, Jorge wrote:
>
> Jirka & Everybody 
>
> Back to basics is always a good advice. With your help and this guy: 
> http://www.beardygeek.com/2010/03/adding-views-to-the-django-admin/ 
> I can create a form to upload csv files and input their records into 
> the database. 
>
> Short history: 
>
> Forms.py: 
> class DataInput(forms.Form): 
> file = forms.FileField() 
> place = forms.ModelChoiceField(queryset=Place.objects.all()) 
>
> def save(self): 
> records = csv.reader(self.cleaned_data["file"]) 
> for line in records: 
> input_data = Data() 
> input_data.place = self.cleaned_data["place"] 
> input_data.time = datetime.strptime(line[1], "%m/%d/%y %H: 
> %M:%S") 
> input_data.data_1 = line[2] 
> input_data.data_2 = line[3] 
> input_data.data_3 = line[4] 
>
> This form was imported in a view: 
>
> @staff_member_required 
> def import(request): 
> if request.method == "POST": 
> form = DataInput(request.POST, request.FILES) 
> if form.is_valid(): 
> form.save() 
> success = True 
> context = {"form": form, "success": success} 
> return render_to_response("imported.html", context, 
> context_instance=RequestContext(request)) 
> else: 
> form = DataInput() 
> contexto = {"form": form} 
> return render_to_response("imported.html", context, 
> context_instance=RequestContext(request)) 
>
> And add  the url pattern & some little changes to the admin index 
> template, and everything works the way i want. 
>
> Thanks guys! 
>
 
Hi! 
I am using this code but gives errror as " 'DataInput' object has no 
attribute 'cleaned_data'
Can you please suggest me why this occurs? And the form.is_valid() is not 
working it always return false. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/toQMoqwWeBQJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Import data from csv file to database from django admin

2012-10-23 Thread Meenakshi Ithape
Hi!
I tried to import the data from csv file to database.
I refer below link
https://groups.google.com/forum/#!msg/django-users/usjC-X9-p5E/94bf4tw3Ni8J

I have create the models and view same like above link. 
I have create the "import" buttom on admin side by changing  
"app/change_list" html. On the "import" onclick method i call the my import 
view. But it gives me error as 
'DataInput' object has no attribute 'cleaned_data' And form.is_valid() 
always return false.

Thanks,
Meenakshi

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/1xOECDxAZMUJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.