Ankit
Hello everyone I am trying to iterate the fields of table CustomUser but I am getting error that customUser is not iterable
Ankit
View.py code or Template code
Alex
Ok, let's try another way
Alex
View.py code or Template code
Show me the traceback
Ankit
Traceback?
Alex
Traceback?
Yes. The traceback you are getting
Ankit
Ok
Ankit
'CustomUser' is not iterable
Alex
🤦‍♂️🤦‍♂️🤦‍♂️
Ankit
return render(request,'user/profile.html',{'pr':pro})
Ankit
how can i show traceback ? text is so long to swnd
Ankit
send
Alex
how can i show traceback ? text is so long to swnd
use pastebin services. Like dpaste, wich is mentioned in the rules.
Anonymous
how can i show traceback ? text is so long to swnd
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Eugene
When should i ask for accepting cookies ???/
Ankit
https://dpaste.org/3rnV#L70
Ankit
alex above link is of my traceback
Eugene
Because in my app i use special id for users to track their views on my posts. Should i use alert in that case ?
Its me pistaboy
How to clear crispy error
Eugene
Hey,does anybody know analog of stripe.com
Дмитрий
Hello everyone. How can I transfer a form from one url to another. Is it possible?
Дмитрий
i want put form in modal window.
Дмитрий
but form what i need have other url
Firdavs
hi how can send image url to the media or static folder via ajax
Kishor
how to use ajax in django
Kishor
i want to add data without moving to next page i want to add edit and delete in the same page how to do
Kishor
using dialog box
Elmir
Hello, how can I add data to many to many field without django forms
Elmir
I wanna manage manytomany field with checkbox
Elmir
How I can it?
Sherlock
in vs code if i install django plugins which work great for jinja tags but support for html got down.. any idea ? thank u!
Zhiger
https://dpaste.org/B8JQ
Vinay
I have django createView class with bootstrap custom made form, and I want to retain the form filled value after html form submission in case of form validation failed. In case of any error occurred I use message method to display error message and return super().form_invalid(form, *args, **kwargs) Where form = self.get_form() How to automatically filled the value in the form or any alternative. I know using javascript but it requires lots of changes, so looking for alternative.
Zhiger
https://dpaste.org/0USa
Zhiger
https://dpaste.org/gT47
Zhiger
guys tell me the solution, I want to display these two models on one page, the first is the main post, the second is a list of posts, I thought to do it in the view through class inheritance, but no, how to be for 3 days I can't solve
Zhiger
people help, in google did not find an answer
Bwaks
Hey am using django forms i have a required field i need it to have this (*) but in color red ----> labels = { 'artist_name': 'Artists Name *', 'event_name':'Event',<----------- thats my label now do i make it to have a red in color **
DamnSon
i currently have a custom /logout view and url for logging out my user is there a way to logout without actually using a custom url?
DamnSon
😢
Mirco
i currently have a custom /logout view and url for logging out my user is there a way to logout without actually using a custom url?
You can use the default Django's logout view inside auth URLs without the need of custom one
DamnSon
uhmm first of thank you for responding
DamnSon
secondly how do i invoke it inside the html?
DamnSon
so my current html code involves <a href="logout">click here to logout</a> and this redirects it to mydomain.com/logout in order to logout the user
DamnSon
upon logout i want to redirect user to mydomain.com/ and log them out but if the user just wants to go home ie mydomain.com/ i want to keep them logged in
Mirco
secondly how do i invoke it inside the html?
https://learndjango.com/tutorials/django-login-and-logout-tutorial Study this one and see how you can use Django's default auth views inside contrib package
DamnSon
i am already using the login and logout function tho
DamnSon
i just want to trigger logout(request, user) upon clicking a button without adding another url
Mirco
i just want to trigger logout(request, user) upon clicking a button without adding another url
You don't have to add another url For example if you wanna only the logout you can get the view from Django default Auth and attach to your /logout URL
DamnSon
ok
Mirco
If you don't include Django default auth URLs, you cannot call /logout
DamnSon
yup thats my situation
DamnSon
i believe u were referring to{% url "logout" %}
DamnSon
so even if i manage to do that
DamnSon
the trouble im still left with is what if i need to invoke a python script that doesnt involve a prebuilt django method
DamnSon
lets when a click a button on my html i want to invoke my python function def randomfunc(): s="hey" return s
Вин Король Саксов
lets when a click a button on my html i want to invoke my python function def randomfunc(): s="hey" return s
Python is on your server, if you want to invoke function in real time without refreshing, use JavaScript
DamnSon
yeah i read some similar suggestions online too
Athar
Does anyone know how to create Udemy business like auth system
Athar
Separate auth for each co-operate
Azizbek Xushnazarov
Does anyone know how to create Udemy business like auth system
do you have an idea about what are you talking? or my bad. I dont understand this question
Athar
Different auth group for different co-operate in same app
Athar
Just like Udemy business
Dev
Hi Guys, is this a good practice, i am transferring funds between two account so i wanted to place a lock on both receiver and sender and running the code in a transaction
Dev
sender = Profile.objects.select_for_update().filter(bitcoin_address=self.context['sender_address']) receiver = Profile.objects.select_for_update().filter(bitcoin_address=self.context['receiver_address'])
Dev
is something like this ok?
Sanjarbek
Hi. How to delete gunicorn.socked file
DamnSon
uhmmmm cud u explain a bit further?
Maxim
uhmmmm cud u explain a bit further?
disconnect is not the same as log out
DamnSon
disconnect is not the same as log out
ill get back once i read up on it
Mayu
disconnect means server to contect cut.
Rishav
Hi guys I am learning django in order to switch my job . Any idea on what kind of projects should I work on to boost up my resume?
Sanjarbek
"curl --unix-socket /run/gunicorn.sock localhost" curl: (7) Couldn't connect to server #help
Vinay
I have django createView class with bootstrap custom made form, and I want to retain the form filled value after html form submission in case of form validation failed. In case of any error occurred I use message method to display error message and return super().form_invalid(form, *args, **kwargs) Where form = self.get_form() How to automatically filled the value in the form or any alternative. I know using javascript but it requires lots of changes, so looking for alternative.