Artificial
@Fedor - Install OpenSSL library
Mihail
Hi Django-lovers 😛 did some one worked with django-cleanup module?
niwla23
anyone knows?
niwla23
or shall i use another framework?
Mahmoud
How can make multiple choice field in a model (check box for somethings) ?
Mahmoud
I have chioces like that Civil , arch , mech , ...etc I want to check more than one of them in a model class
niwla23
Is there any completly Open-Source and Database based chart solution?
niwla23
because chartit is based on Highcharts which is closed and always displays a brand in the corner
Ghorz
How can make multiple choice field in a model (check box for somethings) ?
https://docs.djangoproject.com/en/2.2/ref/models/fields/
cj
Shubham wanted to post this long code: https://hastebin.com/qowofiyiru
Yuri
Hey guys, do you a good content to implement django + drf with google login?
Yuri
I've done some basic implmentation on my API but I'm stuck in basic features like token refresh and validation
Aluisco Miguel
Hello, I need help with something, I have 2 domains because have 2 servers located in different locations and I want to serve to clients based on IP address, why is the best way to do that????
Marcelo
Afternoon guys, I need a help Have APP model "box" in it I have a Professional FK I have another APP model with the "Professional" and in it I have a FK Specialties In my Admin "Box" appears the combobox with the Pros but I don't know how to make the specials combo appear. Note ... this combo with "Professional" specialties has to appear because a Professional can have more than one specialty In short ... when I choose the professional has to appear the combo with his specialties registered in my localhost / admin / ....
Yuri
Yes check github and Google it
I've already checked both extensively. Are you referring to a repository or an article in specific?
Nitesh
I'm trying to develop a dating site and when a user likes someone profile how can I get the user_id which is like by other user
Nitesh
Foreign Key
I did that in models but how in my views file.
Nitesh
https://dpaste.de/2FNz
Nitesh
https://dpaste.de/ygC6
Nitesh
??
Aadhi
Is there any other method we can use if we have multiple views which has same use
Aadhi
Above question I got from an interviewer
Madara uchiha
Hi anyone know how to do check unique email address on update
NR
i want to conver url(r'^referral(?P<ref_id>.*)$', views.share, name="share"), to path url
NR
how it can be done
NR
from url -> path
Mirco
from url -> path
path("referral/<int:ref_id>/, ... ")
NR
i have * in it
Mirco
NR
url(r'^referral(?P<ref_id>.*)$', views.share, name="share"),
NR
yes
Mirco
yes
Strange url , anyway use re_path and don't change anything
NR
there is no way in path i believe
NR
which can replace with *
Mirco
which can replace with *
Give an example of the real expected url
NR
https://consideratecode.com/2018/05/02/django-2-0-url-to-path-cheatsheet/
Mirco
https://consideratecode.com/2018/05/02/django-2-0-url-to-path-cheatsheet/
Again , give an example of your real expected url
NR
https://plus.google.com/share?url=http://mydomain.com/referral?ref=d84258492f
NR
ref= xxx will change with logged in user
NR
every logged in user has uniqef referral id
Mirco
path("referral/<ref_id>/, ... ") So this one should be good 😊
NR
ok
Madara uchiha
Guys
Madara uchiha
Yes
Михаил
If you are using django form, then it suppose to throw ValidationError if it is not unique, Check django docs on form validation
Михаил
You need Form.clean_field method
techy
When I register user I want to make E-mail as a unique . I am using build in method so username is getting unique when I using same name error is user name is already exist. So how I can use email as unique
Madara uchiha
But not for updating
Anonymous
Hi, Myself again got into a prblem.. that is when ever i put any entry in fields from admin page to models that it is comming like object1,2,3 but i want this as names eg- any field name how can i do that please help
Mirco
But not for updating
Use UpdateView and override form_valid
Aboh🍻
Please can anyone help with styling Django forms! Giving a class to the entry fields so it could be styled with css
Mirco
Please can anyone help with styling Django forms! Giving a class to the entry fields so it could be styled with css
You can use widgets when defining form fields and use attr to add your classes
Mirco
If u wanna just use form.as_p for example Otherwise you can render every field and use html classes as always into your tags
Mirco
??
User model has already an id, so when a User clicks on like , get user.pk
Nitesh
check this code https://dpaste.de/ygC6
Nitesh
if i like profile of other user how can i get the userid of that user
Nitesh
So what u wanna know ?
NOT NULL constraint failed: matches_match.created_by_id I get this error
Nitesh
https://dpaste.de/ospC
Mirco
https://dpaste.de/ospC
Ok so, it's not like.user into your view it's like.created_by
Mirco
your foreign key field is called created_by into your Match model
Nitesh
what about like.created_for
Nitesh
NOT NULL constraint failed: matches_match.created_for_id
Mirco
It should be an instance of Profile
Mirco
So like.user.profile if you have one to one User - Profile And if your OneToOne field is called profile
Nitesh
https://dpaste.de/kgBb