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
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
.
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
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 ?
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
Arpit
maverick
R u getting this error on local machine or server??
Brutus
maverick
Adie
I have used MySQL , postgres, mongoDb and redis also with django. It depends on what is your requirement.
GMA
Adie
Anonymous
How to set a manage.py command as cronjob with docker compose
Anonymous
Django was not configured. For more information run pylint --load-plugins=pylint_django --help-msg=django-not-configured (django-not-configured)
Vaibhav
Vaibhav
Anonymous
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
Vaibhav
Не выходи из комнаты.
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
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')
Gleb
Isha
I want to write a python code that traverses through a zip folder and generates a .CSV file also found in that folder
Rohan
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
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
Maxim
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?
Marcos
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
karakurt
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)
Maxim
karakurt
Doragonsureiyā
Maxim
Евгений
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
William
Exclusive
What is Django restframwork in Token refresh Default expiration time ?
Mark
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.
Kenechi
Annony-mouse 🐭