Re: Putting Limits on Memory and CPU Usage in python ?

2015-04-21 Thread SHINTO PETER
Hi ,
Erik Cederstrand , i just want to limit the memory (maximum heap size for
your process) with in the python application/Service ie in it client Socket
Program.

I found a solution like below

import resource
rsrc = resource.RLIMIT_DATA
soft, hard = resource.getrlimit(rsrc)
resource.setrlimit(rsrc, (1024, hard))
Link :
http://stackoverflow.com/questions/2308091/how-to-limit-python-heap-size

On Tue, Apr 21, 2015 at 1:18 PM, Erik Cederstrand <erik+li...@cederstrand.dk
> wrote:

>
> > Den 21/04/2015 kl. 09.20 skrev SHINTO PETER <shinto@gmail.com>:
> >
> > Hi
> > François Schiettecatte , limit memory and CPU usage for python socket
> client service
>
> Really, if you want qualified help, you need to be more verbose.
>
> Do you want to kill a process violating your limits? Or can the process be
> expected to cooperate, so you can communicate to a process that it needs to
> cut down on memory usage / CPU? Are these hard limits, or can the process
> use available resources if they are available? Do you want to build some
> sort of accounting, like AWS pay-per-use?
>
> Anyway, this is not really a Django or Python problem. It's a hard problem
> to solve in most operating systems, so you may have better luck asking this
> in a forum related to your operating system.
>
> Erik
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/LE6J4sRujbQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@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/63B8E65D-E694-4F22-AA89-4732430FD840%40cederstrand.dk
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
SHINTO PETER
NIRAPPIL
09591040010

-- 
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+unsubscr...@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/CAKggVnBz7uSVyxvtuj%2BRDhVU_zm_OsjB2o3-BoYVSGd2dt5j-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Putting Limits on Memory and CPU Usage in python ?

2015-04-21 Thread SHINTO PETER
Hi
François Schiettecatte , limit memory and CPU usage for python socket
client service
<https://plus.google.com/u/2/112547382500960508378?prsrc=4>

On Mon, Apr 20, 2015 at 11:24 PM, François Schiettecatte <
fschietteca...@gmail.com> wrote:

> Bummer, shows how long it has been since I have used that.
>
> Peter, why do you want to limit memory and CPU usage? To prevent someone
> from killing the machine ?
>
> F.
>
> > On Apr 20, 2015, at 1:47 PM, Tim Chase <django.us...@tim.thechases.com>
> wrote:
> >
> > On 2015-04-20 13:13, François Schiettecatte wrote:
> >> You don't say what platform you are running on, but on linux/unix
> >> you can use ulimit, see http://ss64.com/bash/ulimit.html
> >
> > I've wanted this occasionally, but "ulimit -m" doesn't appear to work
> > on most modern Linux installations.  See
> >
> >
> http://unix.stackexchange.com/questions/129587/does-ulimit-m-not-work-on-modern-linux
> >
> > for more info.
> >
> > I'm not sure *why* it was removed, as there have been times I wanted
> > this functionality (I'm looking at you, Firefox, and your
> > memory-gorging habits) so it would be awfully helpful to have
> > around.  I also just tested "ulimit -m" on OpenBSD and it too seems
> > to let the RSS of the process grow beyond the specified limit.  I've
> > got a FreeBSD laptop around here that I could test as well if I can
> > find the power adaptor.
> >
> > -tkc
> >
> >
> >
> > --
> > 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+unsubscr...@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/20150420124711.0f49d04d%40bigbox.christie.dr
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/LE6J4sRujbQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@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/E8425E9D-C9B9-4474-B6BC-3B719C599D23%40gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
SHINTO PETER
NIRAPPIL
09591040010

-- 
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+unsubscr...@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/CAKggVnC%3DJGo%2BKxfE21%3DGAJY%2BTS%3DhTCJ8Ba1ZAVupLAHFanA1Yw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Putting Limits on Memory and CPU Usage in python ?

2015-04-20 Thread SHINTO PETER
Working with linux/unix

On Monday, 20 April 2015 22:44:17 UTC+5:30, François Schiettecatte wrote:
>
> You don’t say what platform you are running on, but on linux/unix you can 
> use ulimit, see http://ss64.com/bash/ulimit.html 
>
> François 
>
> > On Apr 20, 2015, at 1:09 PM, SHINTO PETER <shint...@gmail.com 
> > wrote: 
> > 
> > how to limit memory utilization for a particular python script ? 
> > 
> > -- 
> > 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...@googlegroups.com . 
> > To post to this group, send email to django...@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/8bed3762-1dde-45e2-8573-4be58ab4d090%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>

-- 
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+unsubscr...@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/9e12b909-40e2-48c5-9c7e-58918a4d7b2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Putting Limits on Memory and CPU Usage in python ?

2015-04-20 Thread SHINTO PETER
how to limit memory utilization for a particular python script ?

-- 
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+unsubscr...@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/8bed3762-1dde-45e2-8573-4be58ab4d090%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error : socket.gaierror: [Errno -5] No address associated with hostname

2015-04-17 Thread SHINTO PETER
Thank you François. i got it. i will give gethostbyaddr() or gethostbyname()

On Fri, Apr 17, 2015 at 6:15 PM, François Schiettecatte <
fschietteca...@gmail.com> wrote:

> I know what socket.gethostname() does, we still dont know what it returns
> on your setup. And the exception you get is about the host name. Note that
> a host can have multiple host names and socket.gethostname() only returns
> one, which may not be the one you want to use. By default a machine will
> have the host name 'localhost' which is a loopback, but it may have others
> if it is part of a network.
>
> F.
>
> > On Apr 17, 2015, at 8:05 AM, SHINTO PETER <shinto@gmail.com> wrote:
> >
> > socket.gethostname()
> > Return a string containing the hostname of the machine where the Python
> interpreter is currently executing ie in python documentation
> >
> > so ie used gethostname()
> >
> >
> > On Friday, 17 April 2015 17:31:11 UTC+5:30, François Schiettecatte wrote:
> > Well then why do you get it from socket.gethostname() ? Just set it to
> 'localhost'.
> >
> > F.
> >
> > > On Apr 17, 2015, at 7:56 AM, SHINTO PETER <shint...@gmail.com> wrote:
> > >
> > > i just want to give host as localhost / 127.0.0.1
> > >
> > > On Friday, 17 April 2015 17:15:05 UTC+5:30, François Schiettecatte
> wrote:
> > > What is the value of host?
> > >
> > > François
> > >
> > > > On Apr 17, 2015, at 7:38 AM, SHINTO PETER <shint...@gmail.com>
> wrote:
> > > >
> > > > socket.gaierror: [Errno -5] No address associated with hostname
> > > >
> > > > # server.py
> > > > import socket
> > > > import time
> > > > # create a socket object
> > > > serversocket = socket.socket( socket.AF_INET, socket.SOCK_STREAM)
> > > > # get local machine name
> > > > host = socket.gethostname()
> > > > port = 
> > > > # bind to the port
> > > > serversocket.bind((host, port))
> > > > # queue up to 5 requests
> > > > serversocket.listen(5)
> > > > while True:
> > > > # establish a connection
> > > > clientsocket,addr = serversocket.accept()
> > > > print("Got a connection from %s" % str(addr))
> > > > currentTime = time.ctime(time.time()) + "\r\n"
> > > > clientsocket.send(currentTime.encode('ascii'))
> > > > clientsocket.close()
> > > >
> > > > --
> > > > 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...@googlegroups.com.
> > > > To post to this group, send email to django...@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/81750d83-aae9-4382-bdee-8860671b6682%40googlegroups.com
> .
> > > > For more options, visit https://groups.google.com/d/optout.
> > >
> > >
> > > --
> > > 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...@googlegroups.com.
> > > To post to this group, send email to django...@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/fb79843b-5888-42c1-b8eb-ec59aca7f9f9%40googlegroups.com
> .
> > > For more options, visit https://groups.google.com/d/optout.
> >
> >
> > --
> > 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+unsubscr...@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/c7579f3d-4eb3-44ee-9d1a-1ec608a7123a%40googlegroups.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups &qu

Re: Error : socket.gaierror: [Errno -5] No address associated with hostname

2015-04-17 Thread SHINTO PETER
 socket.gethostname()

Return a string containing the hostname of the machine where the Python 
interpreter is currently executing ie in python documentation
so ie used gethostname()

On Friday, 17 April 2015 17:31:11 UTC+5:30, François Schiettecatte wrote:
>
> Well then why do you get it from socket.gethostname() ? Just set it to 
> ‘localhost’. 
>
> F. 
>
> > On Apr 17, 2015, at 7:56 AM, SHINTO PETER <shint...@gmail.com 
> > wrote: 
> > 
> > i just want to give host as localhost / 127.0.0.1 
> > 
> > On Friday, 17 April 2015 17:15:05 UTC+5:30, François Schiettecatte 
> wrote: 
> > What is the value of host? 
> > 
> > François 
> > 
> > > On Apr 17, 2015, at 7:38 AM, SHINTO PETER <shint...@gmail.com> wrote: 
> > > 
> > > socket.gaierror: [Errno -5] No address associated with hostname 
> > > 
> > > # server.py 
> > > import socket 
> > > import time 
> > > # create a socket object 
> > > serversocket = socket.socket( socket.AF_INET, socket.SOCK_STREAM) 
> > > # get local machine name 
> > > host = socket.gethostname() 
> > > port =  
> > > # bind to the port 
> > > serversocket.bind((host, port)) 
> > > # queue up to 5 requests 
> > > serversocket.listen(5) 
> > > while True: 
> > > # establish a connection 
> > > clientsocket,addr = serversocket.accept() 
> > > print("Got a connection from %s" % str(addr)) 
> > > currentTime = time.ctime(time.time()) + "\r\n" 
> > > clientsocket.send(currentTime.encode('ascii')) 
> > > clientsocket.close() 
> > > 
> > > -- 
> > > 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...@googlegroups.com. 
> > > To post to this group, send email to django...@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/81750d83-aae9-4382-bdee-8860671b6682%40googlegroups.com.
>  
>
> > > For more options, visit https://groups.google.com/d/optout. 
> > 
> > 
> > -- 
> > 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...@googlegroups.com . 
> > To post to this group, send email to django...@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/fb79843b-5888-42c1-b8eb-ec59aca7f9f9%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>

-- 
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+unsubscr...@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/c7579f3d-4eb3-44ee-9d1a-1ec608a7123a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error : socket.gaierror: [Errno -5] No address associated with hostname

2015-04-17 Thread SHINTO PETER
i just want to give host as localhost / 127.0.0.1

On Friday, 17 April 2015 17:15:05 UTC+5:30, François Schiettecatte wrote:
>
> What is the value of host? 
>
> François 
>
> > On Apr 17, 2015, at 7:38 AM, SHINTO PETER <shint...@gmail.com 
> > wrote: 
> > 
> > socket.gaierror: [Errno -5] No address associated with hostname 
> > 
> > # server.py 
> > import socket 
> > import time 
> > # create a socket object 
> > serversocket = socket.socket( socket.AF_INET, socket.SOCK_STREAM) 
> > # get local machine name 
> > host = socket.gethostname() 
> > port =  
> > # bind to the port 
> > serversocket.bind((host, port)) 
> > # queue up to 5 requests 
> > serversocket.listen(5) 
> > while True: 
> > # establish a connection 
> > clientsocket,addr = serversocket.accept() 
> > print("Got a connection from %s" % str(addr)) 
> > currentTime = time.ctime(time.time()) + "\r\n" 
> > clientsocket.send(currentTime.encode('ascii')) 
> > clientsocket.close() 
> > 
> > -- 
> > 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...@googlegroups.com . 
> > To post to this group, send email to django...@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/81750d83-aae9-4382-bdee-8860671b6682%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>

-- 
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+unsubscr...@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/fb79843b-5888-42c1-b8eb-ec59aca7f9f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Error : socket.gaierror: [Errno -5] No address associated with hostname

2015-04-17 Thread SHINTO PETER
socket.gaierror: [Errno -5] No address associated with hostname

# server.py 
import socket 
import time 
# create a socket object 
serversocket = socket.socket( socket.AF_INET, socket.SOCK_STREAM) 
# get local machine name 
host = socket.gethostname() 
port =  
# bind to the port 
serversocket.bind((host, port)) 
# queue up to 5 requests 
serversocket.listen(5) 
while True: 
# establish a connection 
clientsocket,addr = serversocket.accept() 
print("Got a connection from %s" % str(addr))
currentTime = time.ctime(time.time()) + "\r\n"
clientsocket.send(currentTime.encode('ascii'))
clientsocket.close()

-- 
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+unsubscr...@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/81750d83-aae9-4382-bdee-8860671b6682%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to filter model with sum of fields and which is group_by with few fields?

2015-04-09 Thread SHINTO PETER
 Model
class fcc_summary(models.Model):
OCN_Id = models.AutoField( primary_key=True)
OCN_Date = models.CharField(max_length = 20, blank = True, null = True)
OCN_OCN_Id = models.CharField(max_length = 25, blank = True, null = 
True)
OCN_StateCode = models.CharField(max_length = 5, blank = True, null = 
True)
OCN_CallsAttempted = models.BigIntegerField(max_
length = 20, blank = True, null = True)
OCN_Answered =   models.BigIntegerField(max_length = 20, blank = True, 
null = True)
OCN_Busy = models.BigIntegerField(max_length = 20, blank = True, null = 
True)
OCN_RingNoAnswer = models.BigIntegerField(max_length = 20, blank = 
True, null = True)
OCN_UnassignedNo = models.BigIntegerField(max_length = 20, blank = 
True, null = True)
OCN_CallType = models.IntegerField(max_length = 11, blank = True, null 
= True)
OCN_IsRural = models.IntegerField(max_length = 11, blank = True, null = 
True)


to convert this queries into django using above models
1)
SELECT `OCN_OCN_Id`,`OCN_StateCode`,SUM(`OCN_CallsAttempted`) AS 
OCN_CallsAttempted,
SUM(`OCN_Answered`) AS OCN_Answered,SUM(`OCN_Busy`) AS OCN_Busy,
SUM(`OCN_RingNoAnswer`) AS OCN_RingNoAnswer,SUM(`OCN_UnassignedNo`) AS 
`OCN_UnassignedNo`,`OCN_CallType`,`OCN_IsRural`
FROM `fcc_report_fcc_summary` 
WHERE SUBSTRING(`OCN_Date`,1,7) = vReportDate AND `OCN_IsRural`=1 GROUP 
BY OCN_OCN_Id ,OCN_CallType ,OCN_StateCode

2)
SELECT 'All','All' ,SUM(`OCN_CallsAttempted`) AS 
OCN_CallsAttempted,SUM(`OCN_Answered`) AS OCN_Answered,
SUM(`OCN_Busy`) AS OCN_Busy,SUM(`OCN_RingNoAnswer`) AS 
OCN_RingNoAnswer,SUM(`OCN_UnassignedNo`) AS `OCN_UnassignedNo`,
`OCN_CallType`,`OCN_IsRural`
FROM `fcc_report_fcc_summary`  WHERE SUBSTRING(`OCN_Date`,1,7) = 
vReportDate AND `OCN_IsRural`=0
GROUP BY OCN_OCN_Id ,OCN_CallType ,OCN_StateCode ORDER BY OCN_OCN_Id

-- 
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+unsubscr...@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/b5afdfcd-81bf-4f4f-b7be-ebf1406a2814%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to filter model with count of fields and which is group_by with few fields?

2015-04-09 Thread SHINTO PETER
Model
class fcc_summary(models.Model):
OCN_Id = models.AutoField( primary_key=True)
OCN_Date = models.CharField(max_length = 20, blank = True, null = True)
OCN_OCN_Id = models.CharField(max_length = 25, blank = True, null = 
True)
OCN_StateCode = models.CharField(max_length = 5, blank = True, null = 
True)
OCN_CallsAttempted = models.BigIntegerField(max_length = 20, blank = 
True, null = True)
OCN_Answered =   models.BigIntegerField(max_length = 20, blank = True, 
null = True)
OCN_Busy = models.BigIntegerField(max_length = 20, blank = True, null = 
True)
OCN_RingNoAnswer = models.BigIntegerField(max_length = 20, blank = 
True, null = True)
OCN_UnassignedNo = models.BigIntegerField(max_length = 20, blank = 
True, null = True)
OCN_CallType = models.IntegerField(max_length = 11, blank = True, null 
= True)
OCN_IsRural = models.IntegerField(max_length = 11, blank = True, null = 
True)


to convert this queries into django using above models
1)
SELECT `OCN_OCN_Id`,`OCN_StateCode`,SUM(`OCN_CallsAttempted`) AS 
OCN_CallsAttempted,
SUM(`OCN_Answered`) AS OCN_Answered,SUM(`OCN_Busy`) AS OCN_Busy,
SUM(`OCN_RingNoAnswer`) AS OCN_RingNoAnswer,SUM(`OCN_UnassignedNo`) AS 
`OCN_UnassignedNo`,`OCN_CallType`,`OCN_IsRural`
FROM `fcc_report_fcc_summary` 
WHERE SUBSTRING(`OCN_Date`,1,7) = vReportDate AND `OCN_IsRural`=1 GROUP 
BY OCN_OCN_Id ,OCN_CallType ,OCN_StateCode

2)
SELECT 'All','All' ,SUM(`OCN_CallsAttempted`) AS 
OCN_CallsAttempted,SUM(`OCN_Answered`) AS OCN_Answered,
SUM(`OCN_Busy`) AS OCN_Busy,SUM(`OCN_RingNoAnswer`) AS 
OCN_RingNoAnswer,SUM(`OCN_UnassignedNo`) AS `OCN_UnassignedNo`,
`OCN_CallType`,`OCN_IsRural`
FROM `fcc_report_fcc_summary`  WHERE SUBSTRING(`OCN_Date`,1,7) = 
vReportDate AND `OCN_IsRural`=0
GROUP BY OCN_OCN_Id ,OCN_CallType ,OCN_StateCode ORDER BY OCN_OCN_Id


-- 
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+unsubscr...@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/68df78eb-f620-41b9-8313-7d1129402ecf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how to filter in django ie group_by and count

2015-04-09 Thread SHINTO PETER
how to filter in django ie group_by and count

-- 
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+unsubscr...@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/47d3f47a-9205-44e1-b00e-974e11592935%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


In Django , How to move data from one model to another model in same database & same schema ?

2015-04-06 Thread SHINTO PETER
In Django , How to move data from one model to another model in same 
database & same schema ?

-- 
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+unsubscr...@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/c711a5e1-a2eb-4aec-bcc2-c9f038f747b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to make request ie GET/POST to soap (windows web service ) in Django?

2015-03-19 Thread SHINTO PETER
Thank you James Schneider & Andrew Farrell

On Wednesday, 18 March 2015 21:46:33 UTC+5:30, SHINTO PETER wrote:
>
> How to make request ie GET/POST  to soap (windows web service ) in Django?
>

-- 
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+unsubscr...@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/2632a791-21bf-4bf9-98cb-03250bb7bca2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Import error - No module named http

2015-03-18 Thread SHINTO PETER
iam to getting same error 



Traceback (most recent call last):
  File "test_soap.py", line 4, in 
http.request("POST", "/path/to/my/webservice", body=xml, headers = {
NameError: name 'http' is not defined

---

On Wednesday, 18 March 2015 21:54:40 UTC+5:30, Nivin Paul wrote:
>
> I need to call a web service that written using SOAP from a django 
> application , to do that i used the following code but i got error as in 
> the attached screenshot. Please help
>
>
> import httplib
> from xml.dom import minidom
>
> http.request("POST", "/path/to/my/webservice", body=xml, headers = {
> "Host": "myservername",
> "Content-Type": "text/xml; charset=UTF-8",
> "Content-Length": len(xml)
> })
>
> print minidom.parseString(http.getresponse().read())
>

-- 
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+unsubscr...@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/ceeb7793-d801-4022-8b9a-8bf60616248f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to make request ie GET/POST to soap (windows web service ) in Django?

2015-03-18 Thread SHINTO PETER
How to make request ie GET/POST  to soap (windows web service ) in Django?

-- 
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+unsubscr...@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/6174dbf9-8a58-4aff-b1bd-5a11e2c8e7b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how pass get parameter django bootstrap pagination

2015-03-05 Thread SHINTO PETER
 {% load bootstrap_pagination %}
  {% bootstrap_paginate object_list range=10 %}

-- 
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+unsubscr...@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/b14a8f31-785b-429b-bd4a-e7518a7b851a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how to return a form in ajax call from template?

2015-02-25 Thread SHINTO PETER
how to return a form in ajax call from template?

-- 
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+unsubscr...@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/58c0fa83-b914-4fcf-a02b-feebf47d7b2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How load a form in popup div through ajax and submit the data in django?

2015-02-25 Thread SHINTO PETER
How load a form in popup div through ajax and submit the data in django?

-- 
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+unsubscr...@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/c843d065-8ea2-4400-9abe-07203b559069%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to filter by Group_BY ?

2015-02-20 Thread SHINTO PETER
How to filter by Group_BY ?

-- 
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+unsubscr...@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/3b251918-cc2c-4602-b810-a24485f05a78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to filter by Group_BY ?

2015-02-20 Thread SHINTO PETER
How to filter by Group_BY ?

-- 
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+unsubscr...@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/260e065a-fcae-433c-a0fe-6df25a8718b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to host django application in redhat using virtual environment?

2015-02-19 Thread SHINTO PETER
How to host django application in redhat using virtual environment?

-- 
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+unsubscr...@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/9116a3f5-4397-48b2-85eb-53d5145f302f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to install django in redhat where i have python 2.6 and 2.7 and i need to install django in python 2.7

2015-02-19 Thread SHINTO PETER
How to install django in redhat where i have python 2.6 and 2.7 and i need 
to install django in python 2.7  

-- 
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+unsubscr...@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/8feed982-d4e5-41a4-a1f5-463589711961%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.