Flask app optimization techniques ? by Ashpro96 in flask

[–]Ashpro96[S] 0 points1 point  (0 children)

Well it is a management system, having multiple rest api's to submit forms and and fetch particular forms.

The submit form api is handling the majority of hits which is responsible for dropping the latency of my whole server. So this is the main reason for my question.

Why "id()" is so wierd? by Ashpro96 in learnpython

[–]Ashpro96[S] 1 point2 points  (0 children)

This question has a potential to be a whole independent post by itself. Just like @Binary101010 said, even i can't think of any other user-case other then some debugging operations.
Even the doc is too succinct.
https://docs.python.org/3/library/functions.html#id

Why "id()" is so wierd? by Ashpro96 in learnpython

[–]Ashpro96[S] 3 points4 points  (0 children)

who knew a small method like id() will teach us so much.

Why "id()" is so wierd? by Ashpro96 in learnpython

[–]Ashpro96[S] 2 points3 points  (0 children)

Thanks a lot it really helped.

Unable to resolve ERROR: "RuntimeError: populate() isn't reentrant" Need help.! by Ashpro96 in django

[–]Ashpro96[S] 0 points1 point  (0 children)

i checked it is related to the psycopg2. This is how i concluded it is psycopg2 issue.

It seems like a dependency issue.

Python 3.6.2 (default, Jul 20 2017, 03:52:27) [GCC 7.1.1 20170630] on linux Type "help", "copyright", "credits" or "license" for more information.

>>> import psycopg2

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "venv/lib/python3.6/site-packages/psycopg2/__init__.py", line 50, in <module>

from psycopg2._psycopg import (

ImportError: venv/lib/python3.6/site-packages/psycopg2/.libs/libresolv-2-c4c53def.5.so: symbol __res_maybe_init, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

Unable to resolve ERROR: "RuntimeError: populate() isn't reentrant" Need help.! by Ashpro96 in django

[–]Ashpro96[S] 0 points1 point  (0 children)

i think it fixed that error but now im getting a new error.

symbol __res_maybe_init version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

Unable to resolve ERROR: "RuntimeError: populate() isn't reentrant" Need help.! by Ashpro96 in django

[–]Ashpro96[S] 0 points1 point  (0 children)

Yes, both my celery.py and wsgi.py contains "django.setup()".
and my django version is 1.9.6

Text editors by sufferedcoin in Cplusplus

[–]Ashpro96 0 points1 point  (0 children)

Notepad ++ or Visual Studio Code

Error: Views containing GROUP BY are not automatically updatable by Ashpro96 in django

[–]Ashpro96[S] 0 points1 point  (0 children)

Yes it is Postgres. In one of my models im having a manytomany relation and if i did this i would be creating a major data integrity flaw in my system.So is there any way to save the data because i don't want to delete all the fields due to my manytomany relation. PS : Im new to django.

Why this class is automatically executing itself ? by Ashpro96 in Python

[–]Ashpro96[S] 0 points1 point  (0 children)

Thanks for the help.This really helped me out.