Darth✧
Rohan
Rohan
You have dataframe
Rohan
You can do a bulk push in some nosql db
Darth✧
So for first step I m using the data which is given by me or user directly from db
For second step ...I want that processed data ...but I can't figure out how will I do that
Rohan
Rohan
It's processed data
Darth✧
Yes
Rohan
Which is less robust than a dataframe in all aspects
Rohan
And you said you have 100k rows in csv
A
Rohan
So saving json is not a very good idea either
Darth✧
Ok
Darth✧
Leave
Rohan
You can have json fields in database.
Rohan
You need to reconsider your design. If you actually gonna have 100k rows
Darth✧
Yeah I got u
Darth✧
Thnks 😊
Tridip
cj
Ashwani
Can we create two child model class with single parent class connection with foreign key
Anonymous
Alex
Generalmax
Jack
Can we trigger a post or get request of a form after selecting a value from drop down list from from the templates file?
Андрей
Hi guys, where can I find the static files for the book "Django 2 by Example" ?
cj
because I'm sure you bought the book and it's not pirated... right?
Anonymous
How i check if username already exists in database ?
Dhruv
How to upload photo and get in templates
Doragonsureiyā
How to upload photo and get in templates
Step 1: Open a browser
Step 2: Write down https://google.com or https://duck.com and press Enter
Step 3: In the search box, write down the same words you asked here
Step 4: Read the first results
Doragonsureiyā
How i check if username already exists in database ?
Step 1: Open a browser
Step 2: Write down https://google.com or https://duck.com and press Enter
Step 3: In the search box, write down the same words you asked here
Step 4: Read the first results
cj
M
Bunty chhatri wala..
Ashwani
Class one (parent class)
Some fields
Class two (child class)
Link - foreignkey(one)
Some other fields
Class three (another child class)
Link - foreignkey (one)
Some other fields
Can we create 2 child class for one parent class by using foreign key method
Pankaj
Guys i why this error occur
name 'request' is not defined
Help me...!
Pankaj
Okay
Ashwani
Ashwani
Searched it, but got only single child class.
Nioosha
Hello some parts of my project don't work on the server and it shows internal error. However it works appropriately on localhost. Is there any solution to find out what the problem is?
Anonymous
Anyone Please help!!
How can I create user using is_superuser and is _staff field that can view other user registered in the system and they can approve and deny using Django rest Framework?
I am creating Medical Report Management System where user is created using is_staff and is _super user .Is _staff users can view all the hospitals registered in the system and can allow and deny them.
Mirco
Marco
Hello everyone. I have a problem with a formset.
forms.models.inlineformset_factory(Covata, Bird, fields=('rna_ucc', 'sesso', 'nascita', 'anella', 'razza', 'mutazione', 'portatore',), can_delete=True, extra=1)
I want to initialize two fields of the model "Bird" to values taken from the form of the model "Covata".
Anyone knows how to do it?
Pankaj
how can i serve front end code with nginx and gunicorn server of django?
Anonymous
AttributeError at /
'str' object has no attribute '_default_manager'
Ravi
Has anyone used client SSL certificates with requests library ? Need some help
Gyalzen
Is it good to disable admin panel while production for security reasons?
Mirco
Mirco
The best practice is just to change the url
Gyalzen
Thank you for the answer.🙂
Doragonsureiyā
Anonymous
Hi, I've created an API with drf that uses session authentication.
API returns a session cookie on a successful login.
Anonymous
i get the cookies as secure and samesite none in the response
Anonymous
but on request the session cookie is not getting sent
Anonymous
the samesite is set to lax on request and not secure.
Tommaso
Which sw stack would you use to host a django application on a raspberry pi?
Would this one be good?
Raspbian + nginx + postgresql + django
Shubham
is there anyone who know how to deploy django on heroku?
Shubham
https://simpleisbetterthancomplex.com/tutorial/2016/08/09/how-to-deploy-django-applications-on-heroku.html
Shubham
I have followed this
Shubham
while heroku run python manage.py migrate
i got an error
Shubham
ValueError: Dependency on app with no migrations: accounts
Shubham
I tried makemigrations
Shubham
but same
Anonymous
pythonista
I tried makemigrations
python manage.py makemigrations appname.
Dont forgot to add the appname. Sometimes its does not work without appname in my experience.
Bunty chhatri wala..
Anonymous
what is the best way to count the query set after it fetched ?
since queryset.count() hit database how to prevent it ?
is python len is faster in this case or hitting db is efficient ?
Mirco
Anonymous
don't try to use magic, use ORM's count()
hahahaha i get ur point but let me tell u my sinacrio
first i do
SELECT ••• FROM "models_app_unitmodel" INNER JOIN "models_app_subjectmodel" ON ("models_app_unitmodel"."subject_id" = "models_app_subjectmodel"."subjectId") INNER JOIN "models_app_primarylanguagemodel" ON ("models_app_subjectmodel"."language_id" = "models_app_primarylanguagemodel"."id") INNER JOIN "models_app_regionmodel" ON ("models_app_primarylanguagemodel"."region_id" = "models_app_regionmodel"."id")
this get me the by
units = UnitModel.objects.all().select_related('subject', 'subject__language', 'subject__language__region')
and this means i have what i wants from the db but when i do
lesson_count = units.filter(subject__grade=grade).count()
it hits db using
SELECT COUNT(*) AS "__count"
FROM "models_app_unitmodel"
INNER JOIN "models_app_subjectmodel"
ON ("models_app_unitmodel"."subject_id" = "models_app_subjectmodel"."subjectId")
WHERE "models_app_subjectmodel"."grade" = 5
my problem is now when the i loop over grades finding
lesson_count = units.filter(subject__grade=grade).count()
it hits db everytime but infact i have all the data in the first query
Anonymous
u get my point @pyflare