Anonymous
Anonymous
Hi everyone, please im having a headache over an error how can u define a onetoone relationship from your models in views.py
Rushabh
Rushabh
It will send your current time but make sure in your settings.py file time zone is correct..
Rushabh
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'Asia/Kolkata'
USE_I18N = True
USE_L10N = True
USE_TZ = True
Random
Random
how to include multiple models for single form
Random
?
Michael the wolf 🐺
Hi, I have some doubt in djangorestframework-simplejwt. I have a requirement that in my user table there will be duplicate username and duplicate emails..but there are some other fields, which makes the user unique. I want to create a token for that particular filter combination. How shall I achieve it ?
Sumit
Hi, I wants to implement a model in a way that if someone has deleted any data than it won''t be shown to him, but will present in the database. I want to do this using graphql.
Sumit
How can I do this?
Anonymous
Sumit
Nice
Hi anyone here
Nice
I have a doubt on Django polls app which is on Django website I'm getting errors
Nice
Can anyone help me tests.py file
Nishant
Can anyone tell me
inittakes 1 positional argument but 2 were given ?
Enigma
Zey
I am getting this error :
Zey
ValueError at /vendor/
Cannot assign "1": "Product.seller" must be a "SellerRegister" instance.
Zey
this is my code:
Zey
https://dpaste.org/TBP8
Enigma
Enigma
Also send register seller model
Zey
15
Zey
Enigma
15
Try:
Seller_id=seller.id
Enigma
or if the Seller will call Vendor function(i mean the seller is logged in) and create s , its better to use seller_id=request.user.id
Enigma
https://stackoverflow.com/questions/34775501/how-could-i-check-the-number-of-active-sqlalchemy-connections-in-a-pool-at-any-g
WhiteKing007
Hey can we create django project in d or e disk
Prince
WhiteKing007
Getting error django-admin is not recognized
M
I am getting this error :
Product.objects.create(seller=seller,name=name,category=category,price=price,desc=desc,image=image) pass seller like an object
Djewiet Evrard Armel
Zey
Enigma
Zey
Ok
Anonymous
So fucking stupid questions all you ask
Enigma
Anonymous
Indeed you stupid assholes should go and kill yourselves instead of asking such stupid questions. Which can be googled or easily understood if you read a book or watch a tutorial properly.
Zey
Well guys sorry for my response this is a django group we should write related to that only
Enigma
Does it matter ?
No , i just want to know which contry has this terrible culture
Anonymous
Arslan
Wrong thinking, if he is russian then all russians are bad?
M
How to pass it like object
Quick solution, I guess u are storing the seller id online request session, so import the seller model anda get the object example, from .models import Seller and do something like sl = Seller.objects.get(pk=request.session['seller']
M
Sorry, I Am writing from my phone cuz I Am outside
V
I have a template which am using to send email for payment purposes and have a redirect link in it. Am generating link by calling a method in model which has link and token for verification. But what i dont know is how can i bring details to the redirect page? Am getting id and token from link.. both are in same model. But the other details i need is in another model.
Zey
M
Enigma
Mahdi
Hello 👋
A great article to explain the implementation of social login in Django rast framework
Mahdi
Anonymous
Hi is there any way to clear cookies when I close browser ? I am using sessions
Rushabh
Rushabh
In django settings
Anonymous
I tried that but the cookies are not getting deleted
Rushabh
SESSION_COOKIE_EXPIRY = True
Rushabh
Also try this
Anonymous
Ok
Rushabh
And above To return TRUE OR FALSE
Rushabh
Enigma
منتظر
How to access localhost from another computer connected to the same network?
+ can I accesses it form phone or just computer
AK
AK
Agent Q
And check your firewall on both devices. Make sure port no is not blocked
Richard
Hello guys!
Cant handle a problem with creating a record via REST API.
Everytime getting error 'QuerySet' object has no attribute '_meta'.
HERE MY CODE:
diary = Diary.objects.get(id=diaryID)
queryset = diary.diaryrecord_set.all()
serializer = RecordSerializer(instance=queryset, data=request.data)
if serializer.is_valid():
serializer.save()
return Response(serializer.data)
Can anyone help?
Mirco
N
Iam new to django where I can sample project so that I could get the most of the basic of django
N
Agent Q
Doragonsureiyā