PostgreSQL Django Query

2021-01-07 Thread Sachin Kumar
I am using Python Django and PostgreSQL to build our report app.

I am using below mention query to find some details. the query mention 
below is running fine in PostgreSQL command line and giving result in 2 sc 
for 2 million cards but when i i am try the same in Django application it 
is taking too much of time and the web page is expired while running this 
query.

can anyone help how to make query faster in Django 

rows = M_Assign.objects.raw(''' select C.id 
,M."merchant_name",C."MERCHANT_ID",S."store_id" 
Owning_Store_ID ,S."store_name" Owning_Store_Name,F."franchisee_name" 
Owning_Group,C."ACCOUNT_NUMBER",C."STORE_ID",C."GIFT_LIST_REF" FROM 
vdaccount_card_assign C INNER JOIN vd_merchant_master M ON 
C."MERCHANT_ID"=M."merchant_id" AND C."MERCHANT_ID"='003561002966107' INNER 
JOIN vd_store_master S ON S."store_id"=C."GIFT_LIST_REF" OR 
C."GIFT_LIST_REF"='' INNER JOIN vd_franchisee F ON 
S."franchisee_id"=F."franchisee_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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4a0669b5-5417-484d-b66d-c25dd83d2ebfn%40googlegroups.com.


Memory Leak and Solution for Django and PostgreSQL Application

2021-01-18 Thread Sachin Kumar
Hi Experts,

Please help me out with a solution in finding Memory leak from a Django and 
PostgreSQL App. which is the best way to find Memory leak and what would be 
the solution?

How to built Memory Profiler for a Django Applications? if anyone has ever 
created a Django Memory Profiler, pls pls let me know the process. I had 
created a memory profiler for Python single file but not able to use that 
same in Django Application.

Regards
Sachin

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/aced18b4-b000-4ca7-83d9-1f7582693e2en%40googlegroups.com.


SonarQube and Python/Django Code Analysis

2021-01-21 Thread Sachin Kumar
Hi Experts,

I am trying to do code analysis through Sonarqube. Please if anything 
better that SonarQube to Analysis Python/Django  Code. Please advise. 


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b3c8b778-3ab7-4454-87ae-3eb486b4ca68n%40googlegroups.com.


Bind device with login id and password

2021-03-04 Thread Sachin Kumar
Hi Experts,

Is there any way or logic in Django where we can bind user login id and 
password with first device login id.
for example:- 
If a user first time login into a PC A, he can't login into PC B using same 
login id. He can only login into PC A with his login id. if he changes the 
PC then from backend we can remove his old registration and he can login 
into New PC.

Please help me with the logic or any tutorial on this.


Regards
Sachin 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/85c94977-67b8-4e4f-8b50-c12a5a992aecn%40googlegroups.com.


Re: Bind device with login id and password

2021-03-05 Thread Sachin Kumar
HI Mike,

Thanks a lot for the reply I can capture the hostname of the localhost i 
also want to capture mac address of the local host. is there any way we can 
capture the Mac Address of the client?

On Friday, 5 March 2021 at 12:21:31 UTC+5:30 Mike Dewhirst wrote:

> On 5/03/2021 4:52 pm, Sachin Kumar wrote:
> > Hi Experts,
> >
> > Is there any way or logic in Django where we can bind user login id 
> > and password with first device login id.
> > for example:-
> > If a user first time login into a PC A, he can't login into PC B using 
> > same login id. He can only login into PC A with his login id. if he 
> > changes the PC then from backend we can remove his old registration
>
> Removing an old registration ... ie., a login, is likely to be 
> problematic with cascading deletion needing careful attention. It feels 
> like a sledghammer to crack a nut.
>
> Without knowing why it is difficult to suggest a reasonable approach.
>
> In any case, if you need a device ID you might look at ...
>
> from socket import gethostname
> device_id = gethostname()
>
>
> > and he can login into New PC.
> >
> > Please help me with the logic or any tutorial on this.
> >
> >
> > Regards
> > Sachin
> > -- 
> > 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 
> > <mailto:django-users...@googlegroups.com>.
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/django-users/85c94977-67b8-4e4f-8b50-c12a5a992aecn%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/django-users/85c94977-67b8-4e4f-8b50-c12a5a992aecn%40googlegroups.com?utm_medium=email&utm_source=footer
> >.
>
>
> -- 
> Signed email is an absolute defence against phishing. This email has
> been signed with my private key. If you import my public key you can
> automatically decrypt my signature and be sure it came from me. Just
> ask and I'll send it to you. Your email software can handle signing.
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ff10cdb3-b68b-41f7-88f6-922498ebb6b4n%40googlegroups.com.


Django dependent select without Ajax

2021-03-30 Thread Sachin Kumar
Hi Experts,

Does anyone knows Drop down list in Django without Ajax which is faster 
enough to fetch data from Big DataBase.

Please guide me on this.

Regards
Sachin

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b39e941f-2e9a-470e-a213-2170d6f6d935n%40googlegroups.com.


Best way in Django to use single API 50000 times in one go

2021-04-23 Thread Sachin Kumar
Hi Experts,

Please help me out to use Single API, 5 times to complete the request.

for ex:- the request is of Enquiry of 5 cards. i just have a single API 
of Enquiry to fulfil this requirement.

Steps1:- I kept these 5 request in a table.
Step 3:- trigger an alert that request received and then 
Step2:- Pick cards 1 by 1 and trigger enquiry API and save the response in 
the table and make the details available in excel to download.  
Step4: alert that request has been completed.
Step 5:- stop all the operation running.

What would be the best way to achieve it ?

There shouldn't be any load on  application or server and request is 
completed.

Thanks in Advance
Sachin
 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6875e926-21a0-4edf-b2f9-410bc64a69fan%40googlegroups.com.


500 - Internal server error

2021-06-18 Thread Sachin Kumar
Hi Django Experts,
I am trying to download a report from the client's PC using the domain name 
(http://xyz.com/reports/report/?merchant 
)
 
I am getting the response of 500 - Internal server error. when the timing 
to generate the report is less than 60 Sec it works but when the report is 
bigger and it takes more time to generate it gives 500 - Internal server 
error.
But the same report when I am trying from the server using IP address (
http://127.0.0.1/reports/report/?merchant 
)
 
it completes successfully whatever time it takes it never gives 500 - 
Internal server error.
I am using Windows 2016 Server and IIS Web Server. The development platform 
is Python 3.8, Django and PostgreSQL.
Please Help me fix this issue

Regards
Sachin

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3d12a411-f8c1-43af-b186-9d0bd78d91d5n%40googlegroups.com.


Re: 500 - Internal server error

2021-06-19 Thread Sachin Kumar
Thanks, Kayode for the reply,

it's already enabled but still can't see any details. I am really trying to
fix it for the last month but not able to any help or
suggestion will be highly appreciated.

Please help me out.

Sachin


On Fri, Jun 18, 2021 at 6:32 PM Kayode Oladipo 
wrote:

> Set DEBUG=True temporarily and see what's causing the error, or check your
> error logs.
>
> On Fri, Jun 18, 2021, 1:40 PM Sachin Kumar 
> wrote:
>
>> Hi Django Experts,
>> I am trying to download a report from the client's PC using the domain
>> name (http://xyz.com/reports/report/?merchant
>> <https://l.facebook.com/l.php?u=http%3A%2F%2Fxyz.com%2Freports%2Freport%2F%3Fmerchant%26fbclid%3DIwAR1t_xUIdDXAyIfi9oPEd8wfhtCNsorTGcLLLGd9ITLN3fFjwZFVWYfJ7jg&h=AT3y4OGg_c31Dnzsr4DTCP9IJUQoOWe9ZTfg72zyW_C0LodanQjHdIVGjm9tGLonzivylLCbl52BIcROWRQdUmcV6BkazVZlEB0JRwkBTqjxXuhrFc5obCiQW6htdkPZqQ&__tn__=-UK-R&c[0]=AT0gLKeLIkpBVaNWFWGINpFX_R_q8wHoEwUGLWoHGyogiA3OSIUc5ZUYft5LqxA7DsHXQn0v2vjI1JfDS-sByKoJxbXQbyTp1JMNaD6j8qv3WMYSWk60rF4ShRsXZbGWlrj-IAslRx9_XsmGNMATTvX8l7DXsBH5NLM>)
>> I am getting the response of 500 - Internal server error. when the timing
>> to generate the report is less than 60 Sec it works but when the report is
>> bigger and it takes more time to generate it gives 500 - Internal server
>> error.
>> But the same report when I am trying from the server using IP address (
>> http://127.0.0.1/reports/report/?merchant
>> <https://l.facebook.com/l.php?u=https%3A%2F%2F127.0.0.1%2Freports%2Freport%2F%3Fmerchant%26fbclid%3DIwAR19adIyj39XGp4MkmmzLT0SuEFAD8vBzeq4scgVW6PmIhddOQVr2lrwHtk&h=AT1soFO6ol8hw-buyCBZ4XS1fROP-8GEbCw2evvii9aJuTM_lz1VHAvfb1ABA4WGh5wMhyIALAaQONBPz6vf4COds5fJBGKbz5Wx7EniB3pEaAubYs3L7h0adqKa_OZw_uw&__tn__=-UK-R&c[0]=AT0gLKeLIkpBVaNWFWGINpFX_R_q8wHoEwUGLWoHGyogiA3OSIUc5ZUYft5LqxA7DsHXQn0v2vjI1JfDS-sByKoJxbXQbyTp1JMNaD6j8qv3WMYSWk60rF4ShRsXZbGWlrj-IAslRx9_XsmGNMATTvX8l7DXsBH5NLM>)
>> it completes successfully whatever time it takes it never gives 500 -
>> Internal server error.
>> I am using Windows 2016 Server and IIS Web Server. The development
>> platform is Python 3.8, Django and PostgreSQL.
>> Please Help me fix this issue
>>
>> Regards
>> Sachin
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/3d12a411-f8c1-43af-b186-9d0bd78d91d5n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/3d12a411-f8c1-43af-b186-9d0bd78d91d5n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BARzD_X7s4GW5Vo6yGj6%2BhVooMMAqpLVzmRtMStrPodm%2Bg1%3DQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2BARzD_X7s4GW5Vo6yGj6%2BhVooMMAqpLVzmRtMStrPodm%2Bg1%3DQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 

Best Regards,
Sachin Kumar

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALg-PKCfh8pjHkx2jpxR1%2Bv3MB_G2Ai8sTKTSfcthwXbhiEN9w%40mail.gmail.com.


Re: 500 - Internal server error

2021-06-19 Thread Sachin Kumar
thanks all for the help, I found the solution it was related to Web Server
IIS configuration.

On Sat, Jun 19, 2021 at 4:11 PM Kasper Laudrup 
wrote:

> On 19/06/2021 10.59, Sachin Kumar wrote:
> > Thanks, Kayode for the reply,
> >
> > it's already enabled but still can't see any details. I am really trying
> > to fix it for the last month but not able to any help or
> > suggestion will be highly appreciated.
> >
>
> As Kayode already mentioned, you need to check the logs on your server.
> Have you figured out how to access those?
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/95f0190f-f439-ea65-5799-822628f2c130%40stacktrace.dk
> .
>


-- 

Best Regards,
Sachin Kumar

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALg-PKC45E7j%2BpuJ4NZ0drY9HLrHKHWQ%3DF9eNCNLxbOQeD9D2g%40mail.gmail.com.


Encrypt A Table using Django Model

2021-08-12 Thread Sachin Kumar
Hi Experts,

If anyone has done encryption of table using Django. please let us know the 
process or any article which helps in the encryption of table data using 
Model and when required it decrypt the table data.

Please help and Guide for a Solution.

Regards
Sachin

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/de2075bf-be25-4c3b-b7fa-605b1fac2981n%40googlegroups.com.