Mirco
nope, you used a get() that returned MultipleObjects
Krishna Praneeth
okkk I got it. Yeah i tried this ,"queryset=get_object_or_404(Tweet,user_id=1)"
Mirco
ook , so think about it much more in your opinion, that query can work properly ?
Krishna Praneeth
Yeah what i am trying to do is i want to implement my UpdateView using class based view and i want to query all the objects.
Krishna Praneeth
did you get my point
Mirco
I understand what you're trying to do, but you need to understand what you do not just copy/paste or writing down
Mirco
okkk I got it. Yeah i tried this ,"queryset=get_object_or_404(Tweet,user_id=1)"
this query will work if your user can write just 1 tweet
Krishna Praneeth
okk
Mirco
as your user has more tweets, Django tells you that your user has written 29 tweets
Krishna Praneeth
Yeah ! you are write
Krishna Praneeth
i also want all those tweets of that particular user
Mirco
i also want all those tweets of that particular user
you just need to select a specific tweet using its pk and with its user foreign key equal to your logged user
Mirco
study better how databases and getting data from those work
Mirco
you are trying to do trial and error
Krishna Praneeth
Thanks You
Mirco
yw :)
Francis
Hey ppl, how to I make the user identifier to be the email instead of username..... AM using from django.contrib.auth.models import User
Francis
When you go to admin page Users, the users are listed by Username. I would like to change that to email
Mirco
When you go to admin page Users, the users are listed by Username. I would like to change that to email
Create a custom user from default one and return its email as __str__
Francis
Thank you
Mirco
Yw 😁
Ghorz
Has anyone worked with sparql in django
Manish
hello everyone
Manish
'advise add': 'Use *add N* to add a track', 'advise add_': (c.g, c.w),
Manish
can anyone tell me what it means
Manish
and where c is a function like this def c(colour, text): """ Return coloured text. """ colours = {'r': r, 'g': g, 'y': y, 'b':b, 'p':p} return colours[colour] + text + w
Manish
can any one please make me understand.
Code9
Then it produces it in html format
007
How to install django Oscar
007
On Windows
Manish
Looks like you’re passing a color object and a string
but you can see above i am not passing any parameter to c but yet it is giving me colored string
cj
How to install django Oscar
Kaushal. Here you have a useful link: https://duckduckgo.com/?q=How+to+install+django+Oscar
007
Ok... Thanks
Mayank
Hi
Mayank
how to make a button with dynamic url
Mayank
in admin model listing
Mirco
Ghorz
Nope , never
Okay, building a data miming product using django but stuck at a particular Sparql query. I manage to achieve first stage. Check it out here ghorz.com/miner/twitter
Anonymous
Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. Segmentation fault (core dumped)
Anonymous
what is thi
Anonymous
this
Anonymous
the server top when this appears
Anonymous
stop*
Miguel
Hey guys, can someone help me with a little problem in DRF, in serializers?
Anonymous
What do u need?
diproger
Hello everybody, I have a new_product field in my table of database but there is no field in my model. what can i do to show this field in admin page so that i can modify or create new one?? thanks in advance
Hesen Nivas
Anyone integrated ckeditor with the template... I have used the RichTextUploadingField and the problem am facing is i cannot upload images through the templates..
Francis
Hello people, My authenticate returns None.... even with correct dredentials, what might be the issue... save a brother
Sergey K
Hello people, My authenticate returns None.... even with correct dredentials, what might be the issue... save a brother
It's difficult to say how to save brother because he doesn't provide any detailed info
Francis
It's difficult to say how to save brother because he doesn't provide any detailed info
I am trying to get this user: user = authenticate(request, email=email, password=password)
Francis
using : from django.contrib.auth import authenticate
Francis
The credentials are okay, I use then for the superuser
Sergey K
Try pass username and password
Francis
Okay, what happened is, It was working before... then I tried to make a customUser, which I ddnt manage. So after removing the customUser, the authentication stopped working...
Francis
Even username doesn't work....
Francis
Email worked too
Mirco
anyway None from authenticate() is returned when credentials are wrong or you don't have the right permissions
Francis
For that view I am using: permissions.AllowAny
Mirco
share your code, it's easier ( use pastebin or similar pls )
diproger
I have a problem, anyone could help? So the error is that when i add new field to my model and type "python manage.py makamigration", In my migrations folder 002_migration.. is appaired , then i type 'python manage.py migrate ', but THe Field which i added is not going to be in my table of database.? So What can i do?
Anders (izzno / gooood) 🇳🇴
share your code, it's easier ( use pastebin or similar pls )
Apearantly this cannot be said enough... 😁 👆
Anonymous
anyone using tornado?
Ani
I have a problem, anyone could help? So the error is that when i add new field to my model and type "python manage.py makamigration", In my migrations folder 002_migration.. is appaired , then i type 'python manage.py migrate ', but THe Field which i added is not going to be in my table of database.? So What can i do?
At the end of both commands use the name of the app to which you want to apply those migrations. For eg if the app's name is my_app then use 1. python manage.py makemigrations my_app 2. python manage.py migrate my_app
Francis
Let me check the permissions
The proble was the is_active was set to False.... Thank you for your responces... Yoou really help some of use
Anonymous
Love this channel
Anonymous
Haha