Rangarajan
Hi, Is it possible to host React app with Django Rest Framework as a backend on CPanel? I know how to host Django and React on cpanel separately but I don't know how to deploy a django + react app on Cpanel
Morteza
Ali
Hi
Is there any tutorial for how can we make our app to support many servers?
Ali Hasan
Ali
Dostow
HI everyone, does someone knows how to put a select populated with countries (django-countries) in a django form using django-filters? https://ibb.co/TgQwmR7
Dostow
thanks
David
Hi all!
In Django, the add button is hidden on mobile, do you know what CSS property I should add/change so that it is not hidden on mobile?
David
The add button located next to the related model inputs
Snsn
HI. Does anyone know how to hide html from the DOM but still show it. So you have a div and that div is empty but in there is somehow the HTML dynamically allocated. So it prevent people from copying your website.
Юлиан🦉
hello every one, who knows what is the thing about 2 different packages 'django-rest-framework' and 'djangorestframework' ? Isnt 1st one malicious , suppoly chain attack?
j4n
What's the best way in Django ORM to call SELECT COUNT(id) FROM table where table.created > CURRENT_DATE LIMIT 1 in order to compare it to 0
j4n
something like if Product.objects.first().count() > 0
Muhaimin
Is there any good video for beginner, intermediate and advance to learn Django? And I have problem when Debug = False.
Muhaimin
Kamlesh
Any one know how to add Bcc in emailmultialternative django
Maxim
Kamlesh
Yes
Abdullaev
Guys how to use django-sendfile with nginx. In nginx config when i put "internal" into location of private media, i get 404.
I don't know what to do
NITIN
Anybody here who has worked on generics api view ?
Vaibhav
Doragonsureiyā
Anybody here who has worked on generics api view ?
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
👑 Dharmzeey
Please which is better,
1. Extending the AbstractUser class to include other fields I want
Or
2. To create another Class model which will point to the User class with a ForeignKey and then adding other fields to that new model
William
Sayidbek
Hello friends, I want my model show how many time ago question is asked, as YouTube shows in its comments,
but what's wrong with it?
class Question(models.Model):
title = models.CharField(max_length=100)
created_date = models.DateTimeField(default=datetime.now())
updated_date = models.DateTimeField(auto_now=True)
asked_at = models.CharField(default=created_date - datetime.now())
Ali Hasan
Ali Hasan
Sayidbek
Ali Hasan
I didn’t link a telegram account I used a python decorator 😑
Ali Hasan
Sayidbek
Ali Hasan
Format like this
2022-05-14 16:18:00
I didn’t mean that , I meant how do you think it references each created date when you used:
asked_at=…(created_date - datetime.now())
Do you think it will update the record in DB every single second ?
This should be a dynamically calculated field , use the property decorator to define a method that will return what you need
Sayidbek
Ali Hasan
So basically
PROPERTY DECORATOR
def asked_at(self):
return self.created_date - datetime.now()
And btw this equation is not true. You want to subtract the current time from the created time.
Ali Hasan
Ok, thanks
. Hope this gives you the place to look for your solution
Sayidbek
Нефор
Hi
Нефор
advise courses on Django
Rohan
Anonymous
hi, I'm creating post by createAPIView in drf . After creating this thi fields reamining as I type. When I refresh the page it is creating the post again. What I have to do?
hydrozzen
Hey, sending media is not allowed in this group but I want to ask something via a screenshot actually it's 2 screenshot of a same page in browser
One when I just double click on the page contactus.html
And one when
I give command python manage.py runserver
hydrozzen
The whole ui changes
hydrozzen
I want to know when i would deploy that page which UI will I get ,this time it's a fully working one that means it whenever someone press the submit button the information comes to me
Alek
Hi,
could you please take a look at my question: https://stackoverflow.com/questions/72235840/how-can-i-add-ordering-for-manytomany-field
How can I add ordering for ManyToMany field?
Ali Hasan
May I ask why my messages were deleted ?
WHOIS
Please help me if I add the insertion is done in the costumUser table and not in the customer table please help me it's urgent
Ali Hasan
Ali Hasan
I did not understand my friend be much more explicit please
Your question is why it is creating a CostumUser instead of a customer , I said because you are creating it using CostumUser model in your line of code :
CostumUser.objects.create…
Look at your code or perhaps you’re asking a different question maybe ?
WHOIS
WHOIS
no look user.client.sexe=sexe.........
WHOIS
it's two insertion
ClassLamp
WHOIS
Ali Hasan
Well you need to create the client object first and then give the client property as the client you create in your CostumUser object, i.e:
x= Client.objects.create(….)
then:
user = CostumUser.objects.create(…., client=x)
Ali Hasan
Ali Hasan
Look, if you want to insert in two different models then create each one separately
ClassLamp
ClassLamp
WHOIS
ClassLamp
hydrozzen
Роман
hello everyone. how do I add my page to the django admin panel?
Роман
OceanMan
Роман
OceanMan
Welcome
Sunnat
the best resources and books were needed to study the django framework
Anonymous
Hi, I wanna learn Django. Can I start with the book "Django 3 by example" by Antonio Mele? Or it is not recommended for beginners?
Mirco