Krunal
How to add extra field in default user model in Django?
Ahmed
How to add extra field in default user model in Django?
https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html
Krishna Praneeth
https://pastebin.com/11MtBKRi
Krishna Praneeth
it's here👆
Mirco
Into reverse_lazy you need to pass 'create_view' not hardocoded url
Krishna Praneeth
okk .i will try it
Krishna Praneeth
Thank you
Mirco
😁😁
Mirco
Yw
Krishna Praneeth
😊😊
Vladyslav 🇺🇦🇪🇺
Tryout django-js-reverse package
thx allready done it )
Adonis
Has it fix you problem ?
Krunal
I have render database object in HTML and display it in table with one drop down column. I want to update table with selected drop down value for particular row. Please help me in this case.
amit
anyone have experience building recommendation engine #ML or could any1 redirect to machine learning group ?
Alex
Hi guys! I am the Rails developer learning Django. Could you please tell me is there any Business Logic framework in Django world like Trailblazer in Rails world?
Carl
I'm trying to pass extra data to context of a RegistrationView, I'm using the same code as for other views but can't succeed to get the added data. Had a look at https://github.com/macropin/django-registration/issues/91 and it seems pretty straightforward but I'm stuck
Carl
Share ur code
https://framabin.org/p/?1df9a1673f239ee9#rkhtAky8CMNnRgAdEKypClRGW68XayM6XkjbNb/w9hM=
Carl
https://framabin.org/p/?1df9a1673f239ee9#rkhtAky8CMNnRgAdEKypClRGW68XayM6XkjbNb/w9hM=
reply to myself, the issue was in the urls.py, I was not importing correctly my custom RegistrationView
Krishna Praneeth
can anyone helpme .
Krishna Praneeth
I am unable to query in updateview of my project
Krishna Praneeth
https://pastebin.com/54bvrukV
Krishna Praneeth
This is my views.py
Krishna Praneeth
hey guys is anyone available
Anonymous
guys, I have a question about the django environment variables, such as secret key. How do you charge the production? add in a file and export pro anbiente? the maximum I know is to retrieve the variables with django-environ, but I do not know how to load them manually.
inchidi
you can load env vars simply with os.environ (its dict)
Miguel
HJey guys, good day
Miguel
Can u help me with a little problem with LOGIN_REDIRECT_URL, I want to pase the *username* as a parameter in the URL, but in settings I can't pass that, so I was create a view for redirect the LOGIN_REDIRECT_URL to the profile with the username param.
Miguel
But not works
Rohan
then I get them in my project with os.environ.get('<var_name>')
Rohan
How to Export?
export MY_VAR=my_value
Rohan
You write these in your .env file
Rohan
And you run that env file to set these vars
Luke
https://drive.google.com/file/d/1jMFFlwyLxtcx_FaNba1R8UHGV03zQJC-/view?usp=sharing
Krishna Praneeth
Can anyone help me
Krishna Praneeth
Krishna Praneeth Kambhampati: I am unable to query in updateview of my project https://pastebin.com/54bvrukV This is my views.py hey guys is anyone available
inchidi
https://dpaste.de/WJQL
hows your users.models looks like?
Luke
Krishna Praneeth
In my updateview I am querying to get all objects but it's showing that there is no queryset matched
Krishna Praneeth
https://pastebin.com/54bvrukV
You can see my views.py here👆👆
inchidi
https://dpaste.de/UGap
try import https://dpaste.de/UGap#L6 locally, put inside class which require that class
inchidi
In my updateview I am querying to get all objects but it's showing that there is no queryset matched
first() doesnt return queryset but object, try put it on get_object() instead
Krishna Praneeth
first() doesnt return queryset but object, try put it on get_object() instead
No I have you used queryset=Tweet.objects.all() In my updateview
Krishna Praneeth
Yeahh
Krishna Praneeth
Kk
Krishna Praneeth
share the error then
how can i share the error
Krishna Praneeth
https://pastebin.com/MNnR5eBc
Krishna Praneeth
okk here is my error👆👆
Mirco
okk here is my error👆👆
Do you have a tweet with pk 1 ? Have you checked in a django shell or do you have some unit tests ?
Krishna Praneeth
yeah i have with user krishna
Mirco
yeah i have with user krishna
did you get errors when you wrote in get_object get_object_or_404 ?
Krishna Praneeth
Krishna Praneeth
weets.models.MultipleObjectsReturned: get() returned more than one Tweet -- it returned 29!
Mirco
so you have a problem. because you have 29 tweets with the same pk and it's wrong
Krishna Praneeth
ohh !!
Krishna Praneeth
Then how to overcome it
Mirco
I think you should make a step backward open a django shell try to make a filter() query with that pk
Krishna Praneeth
is this the one you are asking me to do "Tweet.objects.filter(user_id=1)"
Mirco
nope, pass inside filter pk=1
Krishna Praneeth
okkk.I will try it
Mirco
okkk.I will try it
👍🏻👍🏻
Krishna Praneeth
Krishna Praneeth
yeah i tried it
i am getting emptyset
Mirco
i am getting emptyset
which query did you make when Django told you 29 ... returned ... ?
Krishna Praneeth
This one '' "Tweet.objects.filter(user_id=1)""