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
Zey
Will I have to create admin panel for client admin ?
Why you want to create a admin panel for client admin
Shanks
Why you want to create a admin panel for client admin
Because he needs dashboard total orders, payment etc.
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
def str(): return self.name What's the use of this function in models?
It will return the name in admin panel instead of object 1 and 2
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
Shanks
What's use of Django admin? If want admin panel dashboard shall I create new one or Modify this?
Tukhtamurod
What's use of Django admin? If want admin panel dashboard shall I create new one or Modify this?
What is the use of Django admin you ask😅, thing about the case, what would you do when there is no admin panel?
Shanks
What is the use of Django admin you ask😅, thing about the case, what would you do when there is no admin panel?
I'm mean ,for the client as it's bit complicated to understand And I also want add orders dashboard then who's going to use that default django admin panel
Tukhtamurod
I'm mean ,for the client as it's bit complicated to understand And I also want add orders dashboard then who's going to use that default django admin panel
Thats why it is said that django admin panel is for development use, not production, you benefit,not customers obviously
John
Someone who has a live django blog recommend the best place to host one. Monetized
Anonymous
Anyone successful hosting Django using cpanel
John
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?
[3/26, 4:47 PM] John: Heroku has an “ephemeral” hard drive, this means that you can write files to disk, but those files will not persist after the application is restarted [3/26, 4:47 PM] John: https://devcenter.heroku.com/articles/active-storage-on-heroku [3/26, 4:48 PM] John: that means that any changes to the filesystem whilst the dyno is running only last until that dyno is shut down or restarted. [3/26, 4:48 PM] John: https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted
Anonymous
Hey can you explain to me step by step I'll really appreciate
Ghorz
I may have to create a video tutorial on it
Ghorz
Ghorz.com is django hosted on namecheap.com cpanel
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.
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
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
Hi , which cache framework is better for an ecommerce website for default?
I used it's documentation but I didn't recognize which one is good
Enam_may
Redis
This?
Enam_may
Redis
Is this my answer?
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
Well... if your only question is “which cache framework is better for an ecommerce website” without any further information. Then yes
Oh thank u so much, I'm a beginner to this , will I use different caches along with it for a web site?
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?
John
But i wanted to login to admin page and i used username password from settings of heroku
Have you tried creating a superuser for heroku using heroku run python manage.py createsuperuser ?
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
How i get the last LTS version of django without know the last version number?
use pip install django or pip install django==version
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???
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?