Chocolate_girl
i want data to filter data matching with role is admin
First make it as a dictionary then put it in your filter
Anuj
can u give me example
Chocolate_girl
g = [{'name': 'xyz', 'role': 'admin'}] TeamManagement.objects.create(data=g)
g = [{'name': 'xyz', 'role': 'admin'}] TeamManagement.objects.create(data=g) a = g[0] b = g[1] filtered_data = {a, b} keep double star before a and b as it's not printing here
Baba
Trying to send password reset to my email. But it shows this. Reverse for 'password_reset_confirm' with keyword arguments '{'uidb64': 'Mg', 'token': 'b9leoj-03f62f5192c15eeeb9e56b966346386a'}' not found. 1 pattern(s) tried: ['password_complete\\Z']
Chocolate_girl
Not giving for index, giving only for about
run those two queries in manage.py shell then check
Yazan
I need one who worked on django push notification to a mobile front end
Tура
Hello!, While pushing my app to the heroku I am getting H10 errors
Tура
Could you help me please
Tура
Who had a problem like mine, and what was the solutions
B
Hi guys , need your help i got an error cannot import name “routers” from “django.db” anyone had the same problem? If you did how you solve it ?
B
Thank you but I already solve it by my self
B
In urls.py i just removed one “s” and it’s worked
B
How did you do that?!
Anyway thanks for your feedback
Dark T
You’re welcome
Sultan
Hello, i have this error "'InMemoryUploadedFile' object has no attribute 'get'"
Charly
Tell me some free course available man
That one is the best resource available
Purushotham
Purushotham
Videos
Doragonsureiyā
Some other like tutorials
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Purushotham
I am student
Charly
Videos
You can find them on youtube then
Divyrajsinh
Thank you brother
I think 'Code with Harry' and 'Dennis Ivy' is good resource on YouTube
Jay
While customized reset password i got error of missing 1 positional argument 'user'
Jay
Please help
Ali
Hi How can we remove object from many to many field?
AℤℐℤℬℰᏦ ☝️
Hi there -> I wrote wrong name of field in Model, after changing and migrations there is a problem OperationalError (no such column: women_women.is_published)
AℤℐℤℬℰᏦ ☝️
Use makemigrations
i used both make and migrate
Brutus
run those two queries in manage.py shell then check
Django shell ?? It's giving output there
AℤℐℤℬℰᏦ ☝️
now, it is working
Nyambura
I'm experiencing a ValueError at /api/signup/ The view api.views.signup didn't return an HttpResponse object. It returned None instead. This is my view function:
Nyambura
@csrf_exempt def signup(request): if request.method == 'POST': try: data = JSONParser().parse(request) # returning a dictionary of data user = User.objects.create_user( username=data['username'], password=data['password']) user.save() token = Token.objects.create(user=user) return JsonResponse({'token':str(token)},status=201) except IntegrityError: return JsonResponse( {'error':'username exists. choose another username'}, status=400)
Daksh
Daksh
Hard Refresh(Shift+F5) or remove cache from app folder,delete migration folder. If above not work, then delete Database file. And create again.
Chocolate_girl
Brutus
What output you got?
No output, but issue is solved Thanks for your time btw
Rakesh
Hello friends I am new in this community
Rakesh
I have created 3 models (t1, t2, t3) Task 1 - in t2 exclude ('bank', 'credit card’) Task 2 - after exclude in t2, compare t1. column1 = t2. column1 and the similar data in both the columns will be the output in t3.
Rakesh
Need query set for this. Please help
Morteza
Hi How can we remove object from many to many field?
instance.manytomany_field.remove(manytomanyobject)
Morteza
signals
S
Hello There, I am a reactJS developer and python was my first choice. Now I wanna learn python because it has larger career opportunities. Should I start with django?. Please suggest a roadmap. Appreciated. Should I consider learning python DSA?
S
Python django restapi
Should I consider learning python DSA?
Snk
Yes very important dsa
S
Yes very important dsa
Thank you. Are you working in python.?
Snk
Yes
Stealth
How to count the number of requests to the database when executing a script in BaseCommand? Django Debug Toolbar counts requests from http only ((
Kavipriya
Hey anyone can explain what is the use of render
Charly
Hey anyone can explain what is the use of render
Have checked the documentation? it renders a template
Kavipriya
It means - redirecting the path to template?
∆$¶u
It means - redirecting the path to template?
If you are using html in your django project then you have to use return render
Rk
It means - redirecting the path to template?
It means if you contacted with that view...return that template for the enduser
Nyambura
Have you printed the token? Was value getting stored in the token? You can print and check value of token
I'm trying to return a string JsonResponse token. I'm getting the None value error.
Jay
I am using login required decorator but I am using email as login then it says that view has no attribute user Please help
trix
Please any good YouTube channel or book for dgango for begginers
Muhammad Saad
Hello, I want to add an import button on admin panel. Any idea how can I add a custom button to admin panel? Any code snippet would be very helpful
Divyrajsinh
Please any good YouTube channel or book for dgango for begginers
'Code with Harry' & 'Dennis Ivy' is better YouTube channel for every django begginer
Muhammad Saad
You mean you want to import from Excel file? If yes than you can use django-import-export
Yeah man I'm trying to import from Excel. But I'm trying to add a 'Import' button on admin panel.
Ajith k menon
How we can hide the form field position by select the verification choice's "verification " Please help
Doragonsureiyā
How we can hide the form field position by select the verification choice's "verification " Please help
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Jay
{% csrf_token %} {% csrf_token %} {% for message in messages %} <div class="alert alert-error"> <a class="close" href="#" data-dismiss="alert">×</a> {{ message }} </div>
Jay
My already message is not printing
∆$¶u
My already message is not printing
What error are you getting?