Khumoyun
Hello, project: Django==3.1
I am using UpdateView from django.views.generic.edit
also I am using render_to_response method in UpdateView class
QUESTION: self.request.method == "POST" condition is not handling POST request in render_to_response method. I don't know why?
Any ideas?
Shanks
I'm making an e-commerce project how can a default django admin can help me ?
Shanks
Will I have to create admin panel for client admin ?
Shanks
Or use Django admin
Anonymous
Shanks
Then
Shanks
?
Prince
can anyone help me with this?
https://stackoverflow.com/questions/66815748/django-m2m-changed-signal-post-add-is-called-automatically-after-post-remove
Enigma
each time i make a change in my app and i push it on git and heroku after that my product images dosent load anymore and i had to upload thier images again , can anyone help me with that?
Shanks
def str():
return self.name
What's the use of this function in models?
Anonymous
lol, official tg docs have typo
Zey
Tukhtamurod
def str():
return self.name
What's the use of this function in models?
In django admin panel for example you go into section Users, see list of users, first usernames in bold dark blue color, that is in class User, the str defined as return self.username, whatever you return will be visible for you to distinguish that object FOR YOU NOT DB, if you returned self.first_name you would see only first names in that format
Marcos
Shanks
What's use of Django admin?
If want admin panel dashboard shall I create new one or Modify this?
Tukhtamurod
John
Someone who has a live django blog recommend the best place to host one. Monetized
Anonymous
Anyone successful hosting Django using cpanel
Ghorz
Anonymous
Hey can you explain to me step by step I'll really appreciate
Ghorz
Ghorz
I may have to create a video tutorial on it
Ghorz
Ghorz.com is django hosted on namecheap.com cpanel
John
Ghorz
Vps?
https://www.namecheap.com/hosting/shared/
Anonymous
This is indeed very great. I had been worried alot
Anonymous
@Ghorz how long will you take
Anonymous
Do you use cloudlinux in cpanel?
Anonymous
Hi need some help with django rest framework
Anonymous
As I am new to rest api and python
Anonymous
I have created a python class to do some work ...what I want to do is create a rest api that interacts with my python program and returns response in Jason format
Anonymous
Is it possible ?
Anonymous
Or any study material that can help me
Damron
Hi!
I want to annotate each Student with AcademicGroup id, but this code not works, I even don't know is it possible to write such code, so is there any solution?
queryset = AcademicGroup.objects.select_related(
'tariff',
'tariff__tariff_type',
).all()
serializer_class = JournalSerializer
filter_class = JournalFilterSet
def get_queryset(self):
qs = super().get_queryset().prefetch_related(
Prefetch(
'students',
queryset=Student.objects.annotate(
ii=Subquery(AcademicGroup.objects.filter(id=OuterRef('pk')).values('id')[:1])
).prefetch_related(
'homeworks__homework',
).all()
),
)
return qs
Anonymous
Hello Guys, i am working on a project in django which is about to get completed and i really need a helping hand for some ending changes, anybody who can work with me for some time, i will really appreciate his/her help.
ford
Enigma
Anonymous
@Ghorz what is take
Anonymous
Your about the hosting
The Guy
https://stackoverflow.com/questions/66821944/how-to-perform-outer-joins-using-django-orm
Gürol
ConnectionResetError: [Errno 54] Connection reset by peer
hi guys ı have this problem anyone know that is ?
Anonymous
How can i add a phone number field in my project
Enigma
Anonymous
mujokhiddin
Mrutyunjaya
Can anyone suggest me the best VS code extensions to work with django ?
please
Place
Hello guys, sorry to ask again but nobody had any idea on how to fix my problem so i am asking again if someone have any idea please!
Well while registering my manytomany fields with django-admin, i don't have any primary key so i would like to do some post_save to add a field on the joint table created by django (for example event_notification) and add a field as a primarykey, did someone have any idea please? (with save_related or signals or whatever you want) thank you so much for your help!
John
so there is no solotion?
The solution is to use third-party storage. Heroku filesystem is ephemeral because service static files/media isn't their core business. Aws is the way to go IMO
Enam_may
Hi , which cache framework is better for an ecommerce website for default?
Koen de
Redis
Enam_may
Enam_may
Koen de
Well... if your only question is “which cache framework is better for an ecommerce website” without any further information. Then yes
Riswandi
events.CallbackQuery
Enam_may
Koen de
Different caches? Just try Redis, for sure it will help
Koen de
It will take a lot of care fort thou 😉
Enam_may
Ah thanks btw😇
Koen de
You are very welcome
Богдан
How to return default Django code errors (such as code: invalid, required etc) in Django Rest Framework?
I override DRF exception handler
def custom_exception_handler(exc, context):
response = exception_handler(exc, context)
if response is not None:
response.data['status_code'] = response.status_code
for data in response.data.items():
print(data)
return response
print(data) - returned
(’ids', [ErrorDetail(string=u'Id does not exists 123432421352', code=u'invalid')])
('sync_time', [ErrorDetail(string=u'Datetime has wrong format. Use one of these formats instead: DD.MM.YYYY hh:mm:ss.', code=u'invalid')])
but in response i got error messages without codes, how to fix it?
HL
Hi there
HL
How i get the last LTS version of django without know the last version number?
HL
There is something like that: pip install django-lts?
Shyamkumar
Axror
Good morning every developers:) I have a #question. Advise me Which payment system is the best for django and how do I use this method???
Axror
Prateek
Axror
Bekhruz
Enigma
Christof
you're doing asking wrongly
Christof
what's the error ?
yeus
I'm trying to make a amazon price tracker. I have made a system in which it will scrape the price of it and if i reload the page it will again scrape and update it's price. I want to add a feature in which it'll automatically give notifications if price is changed without going on website or updating it. Can anyone tell how to do it?