Uday
alright, yeah that makes sense
@l!®€z@
Hello friends how I can return multi serializer by drf
Ashish
You can just define your own custom viewset
Ashish
Hello friends how I can return multi serializer by drf
https://stackoverflow.com/questions/44978045/serialize-multiple-models-and-send-all-in-one-json-response-django-rest-framewor
Shamnad
I can find my staticfiles with //python manage.py find staticfiles// But the problem is with {load} tag. I can't see any color change of load in the IDE.
Shamnad
It's a windows system
Brutus
batch = Batch.objects.get(batch_id=batch_id) if request.method == 'POST': batch.batch_name = request.POST.get("batch_name") batch.save()
Dullah
Hello Guys, How can i upload a user’s profile image using Django CBV. A reference would be much appreciated, thank you.
Rutherford
Hello Guys, How can i upload a user’s profile image using Django CBV. A reference would be much appreciated, thank you.
Use a CreateView pointing to a form with an image field. If the form is valid, save it.
Anurag
Hello guys I am trying to deploy FastAPI on DETA ...but after deployment it is showing Bad Gateway , anyone has any idea what's wrong here ?
Doragonsureiyā
Hello guys I am trying to deploy FastAPI on DETA ...but after deployment it is showing Bad Gateway , anyone has any idea what's wrong here ?
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Arpit
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
maverick
R u getting this error on local machine or server??
Adie
Hi, what can u recommend db for django?
Can use MySQL , postgres , mongoDb and others also. It all depends on our usecase
Adie
I have used MySQL , postgres, mongoDb and redis also with django. It depends on what is your requirement.
GMA
Can use MySQL , postgres , mongoDb and others also. It all depends on our usecase
Thanks mate..do u have tutorials on how to install django in visual studio?
Anonymous
How to set a manage.py command as cronjob with docker compose
Mirco
How to set a manage.py command as cronjob with docker compose
Why when you have solutions like Celery Beat or Django Q for scheduled tasks ?
Anonymous
Django was not configured. For more information run pylint --load-plugins=pylint_django --help-msg=django-not-configured (django-not-configured)
Anonymous
Using cron command of linux?
Yes, I found crontab package and configured
Anonymous
Vaibhav
running pylint
On django project?
Anonymous
yes
Vaibhav
yes
If the error is coming in vs code then you might have to add a few things in settings.json in vs code
Anonymous
I want dockrize and deploy my django project for first time, so Im confused. In my project some data should be initial at first(I set a custom mange command for it), and some action should be execute periodically (crontab). I dont know how to set above items with docker and deploy it.
Vaibhav
https://stackoverflow.com/questions/65761250/pylint-django-raising-error-about-django-not-being-configured-when-thats-not-th
Не выходи из комнаты.
Hi. How can fix N+1 in the SerializerMethodField? https://gist.github.com/dima-dmytruk23/0183014d76ad25f4e2a0ca87ec225a10
Aref
Dominic
I want to reduce my api loading time can someone help??
Hasan
hi when i want to edit or delete is_active field in custome user model with AbstractUser i getting this error : django.urls.exceptions.NoReverseMatch: Reverse for 'account_inactive' not found. 'account_inactive' is not a valid view function or pattern name what's problem? how can i solve it?
~
Hey who can help with props in django rest api I need to make it so that when adding a new record to the database, it would be desirable.
Exclusive
How to Json load api in django serilizer?
Gleb
Hey who who can help with logging in django? outputs to the console, but not to the file.why?
Gleb
LOGGING = { ... 'handlers': { 'console':{ 'class':'logging.StreamHandler', 'formatter': 'simple' }, 'file': { 'class':'logging.FileHandler', 'formatter': 'verbose', 'filename': 'information.log' }, } }
Amnas
What is mean by user =form. cleaned _data. get('username')
Isha
I want to write a python code that traverses through a zip folder and generates a .CSV file also found in that folder
Anton
Hello. Please help. In ModelAdmin I have a "question" field which contains text with html tags. How can I display (in fields_set) value with using tags, not displaying them
Dominic
Ya sure, but how ?
the api that i have takes a lot of time to fetch data
Doragonsureiyā
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Harshal
Any Kind of referral books available for Django in free please revert back. Need to learn about Django and MS-SQL based projects
Seun
I created the news letter form with models. But because it is only visible in admin site I tried to bring it to my base template using the model form. So my other templates can inherit it. It's neither displaying in base nor other templates, only the submit button displayed. Yet no errors. Can someone help me out please 🥺🥺🙏
Adam
Hi all, I use allauth for authorization through social networks. The problem is the following, when I register or login via Facebook for example, in the database a user is created with the mail from the Facebook account. When I try to login to the account via discord or other social network which has the SAME MAIL as Facebook. It redirects me to the registration page, even if I confirm the registration it says that the user already exists. How can I authorize through different social networks, even if the mail on these accounts is the same and remove the registration page?
Maxim
you failed to ask your question https://t.me/django/213626
karakurt
Why are my queries duplicated when I use django-mptt and pass the whole tree via context processor like Category.objects.all() and rendering it in template with the code from docs
Maxim
Did you use django-mptt?
no, but that doesn't make me wrong
karakurt
no, but that doesn't make me wrong
I think people who used it would understand
karakurt
Ok, I'll try to keep it short: I have a model class Category(MPTTModel): name = models.CharField(max_length=50) parent = TreeForeignKey("self", on_delete=models.CASCADE, null=True, blank=True, related_name="children") In context processor I have: def categories(request): return { "categories": Category.objects.all(), } When I render THE WHOLE tree with the code from docs 2 times it queries the tree 2 times. So I have these 7 queries: 1 for getting all categories (in context processor) 3 for getting the tree for the first time 3 for getting the tree for the second time
sunshine
Is there a way to implement dynamic columns of a model, exemple: I wanna manage the columns of specific model in admin panel (creating and deleting columns)
karakurt
the django-mptt documentation does not mention objects.all() anywhere apparently this is not the right way to get anything out of django-mptt models
You're wrong. They use .objects.all() in documentation and pass it to template: https://django-mptt.readthedocs.io/en/latest/tutorial.html#make-a-view
Евгений
Hi everyone! How django resolve which migration to apply and which not? For example, if just repeat the DJANGO_MIGRATIONS and CONTENTTYPES tables in another databases, it still tries to apply all migrations.
i
Hi, guys! Can i ask u? I’m noob in django. And I have one problem, when I try to runserver, i see the problem: “ No module named…” How can i solve it?
rxmt
Hey if i want make tables like here and want query after Categories by user category What the right way save the user category ? users table username- pass-category dani-aaaa- food bani-bbbb-food/basketball store table name-category kfc-food zara-fashion Lakers-basketball Barcelona -football
salar
Hi, guys! Can i ask u? I’m noob in django. And I have one problem, when I try to runserver, i see the problem: “ No module named…” How can i solve it?
pip install (your project dependencies) It's better to activate virtual environment before installing modules in order to keep your project environment isolated from your system
Exclusive
What is Django restframwork in Token refresh Default expiration time ?
Mark
Hi, guys! Can i ask u? I’m noob in django. And I have one problem, when I try to runserver, i see the problem: “ No module named…” How can i solve it?
Perhaps you are trying to run server from directory without manage.py You should switch to directory with this file and then run server.
Annony-mouse 🐭
How to solve this? In my store page all products of a main category is shown And from side bar there is filter option by sub category wise so when i click on of the subs i like to shoe the products belonging to that sub only on the same page.