Anonymous
What is the problem?
chicoMTZ
Hi everyone, has somebody used drf with Django-sites?
chicoMTZ
I am trying to filter my data with the domain of my client, in this case the client is a vue app
Zhumakhan
define get_queryset in view
Zhumakhan
just a suggestion
Anonymous
I made a custom model name Topic and t is a object of Topic. When I type t.save() in shell it shows AttributeError 'Topic' has no attribute '_state'.
Phani
I've been trying on :
When a mail is sent through django, an alert should pop up that, mail has been sent successfully.
Please help me on it
Mirco
Phani
Yeah, I've got that,...
But I've been trying on something like a javascript alert.
snc
Phani
Phani
Oooo... Thank you I'll try on it.
Phani
Phani
isa
Sorry for the wrong posted message.
Shivank
Hi , i am having problem in getting in select value, so that i will use it in form action to call a specific view.
< Form action="{%url 'send_msg' friend.from_person friend.to_person%}" method="post">
<Select value="{{friend.to_person}}">{{friend.to_person}}<\select>
Then submit field.
In error, its saying reverse for 'send_msg' with argument '('','')' not found.
Anonymous
How to make static this link. . /assets/js/js.js
Anonymous
. /assets/js/js.js
Mirco
Anonymous
I try to make it static line this . /static/assets/js/js.js but this is nit work
Mirco
because you need to use the static template tag
Study the official doc otherwise you won't understand
AK
I need to constantly check the database for condition to be true and then must alert the user by django channels, how to do it?
Sparsh
I developed attendance management system in django with multiple user role .Employee,manager and admin there three different panel
h
what basics needed to start learning django
Mirco
coderss
h
is oops reuried
h
requried?
coderss
Yup
Bunty chhatri wala..
George
Any Django expert here who can help me in my live project
George
Please ping me
Sparsh
Presence
Hey guys...
What should I use ? Dj-rest-auth or django-allauth or djoser?
Sh
did u use celery?
Naveen
Guys I am scratching my head for last 6 hours to get this thing done :- plz help me out :- book availability is still True when I print the all books availability . Pastebin link https://pastebin.com/ZC1P7TgS
Sh
Naveen
Naveen
Sh
sen me the code of that
Sh
i think at the end u have missed to call super ()
Naveen
https://pastebin.com/LKE9Cx5P
Sh
if self.id == None:
self.id = random_six_digit(6)
super(BookModel, self).save(*args, **kwargs)
Shreehari
Hey guys,
is it possible to host a django package on pip for my personal use only?
Private repo kind of thing.
Sh
super method should be outside
Sh
when u r doing book.save() self.id has a value hence super method is not called
Sh
@Magicalman78 I hope u got it
Sh
def save(self, force_insert=False, force_update=False, using=None, update_fields=None, *args, **kwargs):
if self.id == None:
self.id = random_six_digit(6)
super(BookModel, self).save(*args, **kwargs)
Sh
notice super has to be outside.
Sh
no. it will just save..
Sh
it will not call ur self.id = random_six
Sh
save is not heppening..
Sh
Book is getting saved only at first time..
Sh
from next time id is not None..
Sh
so save is not doing anything
Naveen
no. it will just save..
man u r awesome.. my problem is solved. Really appreciate your help. Really really thankyou :)
Sh
Mirco
Mirco
python 2 is dead 😊
Naveen
django*
Sh
but ppl using python 2 needs to use class names right?
Mirco
django*
you can use Telegram edit message feature
Sh
😀
Naveen
Sh
Mirco
Sh
ya dude ..but ppl using Python 2 from 5 yrs..
Sh
will they be able switch it in single day?
Mirco
obvs not but do you know how much time is passed since Python core devs published the Python 2 EOL ?
People needed to start months and months ago to upgrade it
Sh
🙏
Roman
Hi guys, I am a bit lost I think someone who knows DRF can help me , so please do. Basically I have 2 ModelSerializers, I need to wrap arrays of them into 1 serializer .
Roman
def get_queryset(self):
categories = Category.objects.all()
sub_categories = Category.objects.all()
serializer = self.serializer_class(categories=categories,subcategories =sub_categories)
return Response(serializer.data)
Roman
but no luck and I am not sure how to google it
Joel
hello guys, how can i pass a return value from another function? i have doing like this https://stackoverflow.com/questions/41204649/how-i-can-use-variable-of-one-function-to-another-function-in-django but still redline at the passing variable