Mirco
not that smart to do it
Bad for you then 😎
T2ABIZZ
Btw did you understand what you copy and pasted at least ? We know it works, but you get why it works now ?
Yeah In the first time i copied in models.py :v Then i realised that its in serializers not models and forget to delete it I was shocked of the error so i went to google and copied it then i realised that i foget to delete it from models
T2ABIZZ
Silly problem 😂
Matuo
I already read that
Matuo
But bro i not understand this docs so good
Matuo
Its so powerful but really strange ,but i go to try agin, i try my best
Anonymous
Cai I work with APIs fully in django like other frontend apps
Anonymous
Cai I work with APIs fully in django like other frontend apps
I mean adding something to database or login logout
jaxx
Hai Am new to django. I'm just confused between redirect and render in django. I don't know which one to use correctly. Can anyone help me by giving examples. It would be very helpful
cj
Like when to use redirect and when to use render
you never mentioned render before... but, now that things are clearer, what are your REAL doubts? what do you REALLY want to do? how come are you confused between those 2 functions? explain things to get help, people don't read minds here
Haripraveen
Hello iam working on django project In that I have user login ,register and employee login ,register and iam using online templates for that pages how to create diffrent tables among them?
Haripraveen
Hello iam working on django project In that I have user login ,register and employee login ,register and iam using online templates for that pages how to create diffrent tables among them?
For db iam using postgresql for users datas are stored in auth_user table if I try to same this to employe login those data also saved in same table
Partha
Hi all, Can we able to execute bat file using flask or DRF?
Partha
If so any example or link to read please provide me. TIA
Roberto
What is the simplest way to deploy a Django webapp on the internet?
🅓🅡🅔🅐🅜🅒🅗🅐🅢🅔🅡會(Inactive)
Roberto
Thanks
Charly
Anyone?
redirect is to redirect to other url, render is for render a template
jaxx
redirect is to redirect to other url, render is for render a template
I mean.. I'm still confused to use which one at right time When logging out should i use redirect or render like that . It will be very helpful if you explain with an example. :)
cj
redirect is to redirect to other url, render is for render a template
he never explained what his "confusion" was
Nanddu
Helloo... I'm preparing for an interview based on django...They will be giving a task to create a django web application..In the first round they were asked to create a home page which consist of form inputs.. after submiting form details,details in the database must be shown in another template
Nanddu
there is no problem passing data from input text field to database...im having trouble in passing data from multiple check boxes to data base along with this form
Nanddu
They said that i can use only Mysql queryies, not the ORM concep.. but i can't pass data to same database using mysql quey for checkbox details
Nanddu
I used jquery for passsing datas of checkboxes...it worked...but i can pass jquery ouutput along with other input fields..
Nanddu
can anyone help me out..?
mourya
Can any help me how to write APIs for search bar in django
Hasan
hi everyone I using drf and react js I should store jwt tokens through Reactjs in the cookie or through backEnd? when I send a request from Reactjs to backEnd doesn't store tokens in the cookie and I have to store handly
Anonymous
I have model where user is foreignkey . I wanna know how many time each user created order . I used following quirset but get user id instead of user name . Order.objects.values('user').annotate(Count('agent')) Help me to get name of each agent with total no of order created by them .
Phansivang
hello how to make one user with one database ? I want to create user with separate models data
Bhawna
Can someone help me with the code I want to get data from 1st model and choose relivent data by filter and want to save it in my 2nd model in views
HamidReza Fekri
Hello I'm creating question form for ex poll form but logic of calculating result for each one(instance) is different how to implement this
Bhawna
Use foreign key
I used it but I am new in python so cannot getting the logic
MoonZack
Please anyone can help me with cybertalent challenges?
MoonZack
Your flag is in the /tmp/test1 directory
MoonZack
I have CD into it and cat but couldn't get it
Doragonsureiyā
Please anyone can help me with cybertalent challenges?
We know the rules are quite long, but read them, because on average, hundreds of users are banned from this network every week. Reading the rules will help in avoiding this pitiful fate.
T2ABIZZ
Is anyone familiar with djoser? in /user/ it returns users list but only data I get is id and email and username I want to get the other fields like first_name and last_name how can I do that?
T2ABIZZ
user.first_name ??
what do u mean?
T2ABIZZ
https://paste.ofcode.org/6rMwqtQ9WkG5iBBPf6k9xA
T2ABIZZ
i got data like this
T2ABIZZ
i want to get the first_name and the last name too
T2ABIZZ
when i access /users/me i get all the data I want https://paste.ofcode.org/FhGPxAsxv6sM9dhs2cyBzy but no In the /user
Mirco
the solution is add new serializers with all the fields u want then add it in djoser in the settings.py
It's explained in their doc, when you wanna customize the serializer you need to refer your custom one in djoser settings
Ruslan
Hello. How to make 2 classes process one template
Ruslan
I want see form for sent new post at the board with post
Artyom
https://docs.djangoproject.com/en/3.2/topics/class-based-views/generic-display/
T2ABIZZ
in Djoser in /users/ the admin can see all the users but the current user can only see his user so i want any user to see all the users i override the permissions in the settings like this but still only get the data of the current user here is my settings https://pastebin.com/6LDR6fmL
Anonymous
Use user__username
I got first name of user I want last name too.
Anonymous
?
I have model where user is foreignkey . I wanna know how many time each user created order . I used following quirset but get user id instead of user name . Order.objects.values('user').annotate(Count('agent')) Help me to get first and last name of each agent with total no of order created by them .
Anonymous
So what's the issue in getting names
User__username returning only first name not last name I need both
Anonymous
I was looking for user first and last name but user name will also work I made changes in username
Vikash
User__username returning only first name not last name I need both
user object also give first name and last name like user.frist_name
Vikash
Also you can try get_full_name()
Vaibhav
I was looking for user first and last name but user name will also work I made changes in username
You have to read a little bit about how to access foreign key fields... Generally you use __ over any relationship field to access that model field
Vaibhav
Django docs are more than enough
Anonymous
Django docs are more than enough
I will read it tonight if I will stuck will get back to you
EdisonMolina
How do I import xls files, if I get this error: