ֆ33ʏ377
ot add like "appname.apps.appclassname"
Anonymous
Already added
https://newbedev.com/no-installed-app-with-label-admin-running-django-migration-the-app-is-installed-correctly
Alberto
Anonymous
ֆ33ʏ377
𝕯aniel
ֆ33ʏ377
Alberto
Django runs without errors on both Apache and local
Alberto
I can check the encoding config in Apache, I haven't tried that
ֆ33ʏ377
Hikmet
Hi there. I want to store dictionary in django session, and then retrieve it from session variables. But when I try to do this, it throw an error
TypeError: Object of type DataFrame is not JSON serializable
The keys of my dictionary are strings, and values are list of dataframes
Alberto
yeah may be
Fixed, I end writing the environment variables in the celery environment file, otherwise the service starts without them and then the encoding error is raised. Thanks for your help 👌
Anonymous
Egor
Hikmet
ֆ33ʏ377
VISHNU
Can I able to use document in django elastic search
Mo
Hi,when i related a model filed to another model that has multi fileds, my field does not relate correctly to my desired filed. so it shows another filed values. what argument should i add to the model or serializer? (DRF)
```St = models.ForeignKey(to=S, related_name='test_st', on_delete=models.SET_NULL, null=True)```
thanks
Anonymous
Is it necessary to connect the aws postgrees to django website hosted on digital ocean or we can create postgrees in digital ocean by cmd .
And most importantly
Can anyone share me the pricing of
Aws S3 bucket and aws postgrees
In any currency
Mirco
Caesar
how to send image to email with django?
Caesar
Mirco
can you show examples?
https://thecodelearners.com/how-to-send-emails-and-attachments-using-django/amp/#sending-email-using-attachments
Rohini
Hello, I need help in python social auth django, I let Google user to login , and certain domain can only login , and then if login is incorrect,it throws error, I m fine with showing server error ,but the I m trying to figure out how to clear cache, like if ur credintials are wrong, u are given login page again and u can u can enter other credentials, but what happens is I have to forcefully clear cache to get the Google login page , any help will be appreciated.
Caesar
W
W
Check it out
Mirco
Shivam
We are building a CRM kind application,
Should we use Flask for Rest APIs or Django-Rest-Framework as we want to use microservices for the same?
Mirco
Shivam
FastAPI
The situation is we have too much on our plate to learn and we already know flask & DRF, so if we have to choose between Flask for rest APIs and DRF then which one should it be?
Mirco
Mirco
Shivam
Great, Thank you so much
Mirco
Doragonsureiyā
Anonymous
Shivam
try drf
I read, We can't do microservices with DRF, which cause a lot of confusion amongst us
Anonymous
Anyone who has implemented flutterwave using django restframework? I need help
Anonymous
Anonymous
Though they are not great at that
SOSO
guys i need help
i have three table 1)pharmacyResult(where i have number of employee and some date)
2) PharmacyEmployee(where i have employee)
3) Pharmacy employee result(where i need do some logic and paste employee where employee need to work min 3 hours)
pharmacies = PharmacyResult.objects.all()
when i do for loop
for ph in pharmacies:
pharmacy_employees = PharmacyEmployee.objects.all().filter(pharmacy=ph.pharmacy, date=ph.date)
for employee in pharmacy_employees[0, ph.number_of_employees]:
if employee.employee.workinghours <= 3:
pharmacy_employee = PharmacyEmployeeResult.objects.create(date=ph.date,
hour_from=ph.hour_from,
hour_to=ph.hour_to,
employee=employee.employee,
pharmacy=employee.pharmacy
)
pharmacy_employee.save()
employee.employee.workinghours += 1
how can i put one employee third time to the other ph?
Abhinesh
are you using API's like drf??
Abhinesh
Beto
Hi, just a quick question, can I use drf serializer.Serializer to update an not Django class object ??
Beto
Any thoughts on this? Resources?
Abhinesh
class person:
a='abhinesh'
b='sai'
x=person()
print(x)
from rest_framework import serializers
class personser(serializers.Serializer):
a=serializers.CharField(max_length=50)
b=serializers.CharField(max_length=50)
print(personser)
print(personser.data)
y=personser(x).data
print(y)
Abhinesh
<main.person object at 0x0000021089619550>
<class 'main.personser'>
<property object at 0x000002108A945270>
{'a': 'abhinesh', 'b': 'sai'}
Abhinesh
Beto
Well, I'm trying to update, in this case the person object using some JSON, but I want to do it using serializer, is that possible? I'm a little confused 🤔
Beto
I need to pass the person object to the serializer and the JSON, it should return a new update person, o update the person itself
Beto
You got it, you think is this possible? Any example with this approach? Thanks btw
Abhinesh
{'a': 'abhinesh', 'b': 'sai'} as the b value should be updated value ??
Beto
Yea
Beto
Or let's say
Beto
{'a': 'abhinesh', 'b': 'sai'} is current value and should be updated to {'a': 'abhinesh', 'b': 'sou'}
Beto
The last value is the JSON, the first is the class object
Beto
That make sense?
Beto
After the update the second value should be an object not a JSON, idk if I am clear 🤔😂
Abhinesh
class person:
a='abhinesh'
b='sai'
x=person()
print(x)
from rest_framework import serializers
class personser(serializers.Serializer):
a=serializers.CharField(max_length=50)
b=serializers.CharField(max_length=50)
b = serializers.SerializerMethodField()
def get_b(self,obj):
return "sou"
print(personser)
print(personser.data)
y=personser(x).data
print(y)
Abhinesh
<main.person object at 0x000001FE63B09550>
<class 'main.personser'>
<property object at 0x000001FE64E35180>
{'a': 'abhinesh', 'b': 'sou'}
Riswandi
is that just like ptb then
Abhinesh
Beto
Thanks, I think this enough information to try to accomplish what I need
Abhinesh
Damilola
Jasur
Hi everyone. I wanna redirect one part of html page (not the whole page from the beginning) after some operations are done, is there any way to do it ? Thanks!
Champak Lal
Swap sorting 🤣
Amr Elwekeel
I need best book for django
Bobosher
Bubble sort
Sagar
How to read external csv file in django?
Sagar
That csv file contains our office data, so i need use that file as a data storage and have to build one web application, that can read anyone our office personnel