Elie
It is enabled, i can access https://mywebsite but i need to redirect all url to https, hosting my django website on bluehost, apache server
sinyor
hello guys, i am using ModelSerializer for my Rest API CRUD operations, but it is very slow for get or post datas…. do you have better suggestion for speed up?
Veeru
❔
Elie
Ok thank you
Javlonbek Torajonov
Good evening
Almaz
Ok , Is this is working now After changing template_name
Yes, it's working, thank you. But I would like to follow tutorial
Javlonbek Torajonov
How to get islamic hijrin years in beautifulsoup on django
Javlonbek Torajonov
please help me ?
Shahed Khan
django-notifications-hq
dคv¡d
Need help: i want to use query in admin or model or where to get the results Ex: models = customer, room For role: many customers can join only 1 room but can't 2 room received 1 custom in this period. Pls help.. 🫂🫂🫂
Anonymous
Hello, I want to add social auth to my Django app. What is the best library or plugin for that? I've heard about Allauth, but..Can I set some settings like: "When the user is register add his profile picture from Google" or something like this?
dคv¡d
Oh, well, I don't know if my opinion can help you, but maybe you could look with Relations OneToOne in your app.
But some field i already use many2many in my case... I never try one2one. Let me try it... Thank you so much
dคv¡d
Use OneTOne ofcourse
Thank you so much... I'll try it
Anonymous
Okay! Hope you get it!
H
jh
James
Hellow. Any one who can help a query used in django to total daily sales and display it according to the day. If the day ended. Then the value of total sales is replaced with the next current.
James
How should i display the sum of sales only for the current day in django??
Mirco
How should i display the sum of sales only for the current day in django??
Filter by current day and use aggregate and Sum function
Mirco
James
Show the model before
Class Sales(models.Model): amount = models.CharField() date = models.DateField(now=True)
Mirco
Class Sales(models.Model): amount = models.CharField() date = models.DateField(now=True)
First of all change that amount, it's a DecimalField not a CharField
Mirco
Ok then after?
Then you can do something like Sales.objects.filter(date=date time.now().date()).aggregate(total_amount=Sum('amount')) Where Sum is a db function you need to import
Doragonsureiyā
Oky thanks bro
You're welcome! 😊
Sherlock
is creating api , api gateway is tough, i'm a beginner🙏🙏
منتظر
I want to build a Habit Tracker With Django 😓 Is there any good idea 🙏
S
is creating api , api gateway is tough, i'm a beginner🙏🙏
Try creating atleast 10 APIs initially, you will get to know
Deleted
https://stackoverflow.com/questions/68561646/3-table-join-in-django pls help, guys, Django join select 3 tables
pollo
Hey guys, i need help to connect Django with Angular
R.
How can i deploy my static files in heroku for free when i deploy my project The static fikes not working, if i off debug to true its working
Riswandi
there are no events at all.
Anonymous
helllo
Anonymous
i'm problem yes
Doragonsureiyā
helllo
Please move your "Hello" and other social talk to @PythonOfftopic.
Doragonsureiyā
i'm problem yes
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
coder
hello i am using model serializer many to many for do update error occur please def update(self, instance, validated_data): instance.name = validated_data['name'] instance.ac_no = validated_data['ac_no']instance.save() return instance Got error "user with this ac no already exists." ;
dคv¡d
how to related 3 table together by use unique or another way to do it. Ex: i have 3 table A, B, C. at the first i already have records in table A, So i just only can add record to B or C by what i had in table A. but what i need it if i already add record from table A to table B so i can't add the same record from table A to table C (NOTE: can it Many2Many?)
منتظر
Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/account/activate/Ng/aqjjy6-9028f67ffb995b58240864ab8b6c3c82 Using the URLconf defined in core.urls, Django tried these URL patterns, in this order: . . . account/ activate/<str:uidb64>/<str:token>)/ [name='activate'] . . . The current path, account/activate/Ng/aqjjy6-9028f67ffb995b58240864ab8b6c3c82, didn't match any of these. any idea 🙋🏻!!? why I am getting this error when I requesting the email Activation link 🙁
coder
do you have simple?
refer this got idea of it; https://www.django-rest-framework.org/api-guide/validators/
dคv¡d
i never try it.. but what is it.. ? do you have simple ?
Mirco
What if i want to filter by month??
The same Just study on Django docs what lookups are and how you can use them with a DateField
rtg
Question: I haver a installation list proyect. In installation detailView there is a add imagen button. This open form, but the user must select de installation again (he was in DetailView, why select again de installation?). How can a pass the installation id to not select de installation? Code: https://pastebin.com/v066M8bM
rtg
Thanks!
Sherlock
in django i don't know when a parameter is passed as string(with quotes) and when not as string if you can plz tell... thanks in advance 🙏
Arezoo
Why sometimes create ànd update method write in serializer not in views.py?
Rachit
Can we showcase our projects here?
Arezoo
serializer give validated data
Is it possible check validate in views?
Optimus
Is it possible check validate in views?
yes possible but , correct way is to handle create update in serializer only
Arezoo
I founded the package with this name:cerberus. It can validate input
Arezoo
Which method must written in serializer?just update and create?
Optimus
I founded the package with this name:cerberus. It can validate input
if u already have bulitin method in serializer then why external pckg
AMiR!
Why sometimes create ànd update method write in serializer not in views.py?
You define these methods in serializer and check if new object or updated object is validate or not and make views for them to make new object
Arezoo
if u already have bulitin method in serializer then why external pckg
I have nested Json and array and in other post method I forced to use this package to validate input, is there any way?these post methods are not create or update
Arezoo
What is dm?
Mohammad
Arezoo
🙏
Sherlock
nginx /apache used to build api gateway , right ? So we basically build api with rest framework and API gateway with nginx/apache ? I'm missing anything ? Your suggestions 🙏
Sherlock
r u using linux or windows
it's windows, Anand Bhai
Optimus
pythonanywhere
Anand
heroku , pythonanywhere , vercel
Anand
go with heroku , it is better
Root
Divio