Anonymous
Ok... I drop it then
George
Kushal
How to import A app's model in B app model?
Rohan
Kushal
Thanks sir
Manish
How can I apply sms API in my project
Anonymous
Hi, could you watch my gist:
https://gist.github.com/navifundendi/8ef9075c99a55fb732745164464d1509
if q = car, red I get a post with tags car, red. It's good. But when q = red, car I get a post with the tags car, red and post with the tags airplane, red, instead of a post with the tags car, red. It is not right. I am trying to do an exact search. Could you share your experience and tell me what the error is. (A similar search model logic at pornhub and rule34).
Anonymous
I expect to get the result sql analog:
select p.* from Post p where exists ( select * from PostTags pt
join Tag t on pt.tag_id = t.tag_id
where pt.post_id = p.post_id
and t.name in q
);
Anonymous
By the way, this works correctly in django admin. Is it possible to copy the search method?
Sarang
Hi,
please give me some tutorial or link
1) how to create api to login apis to api ( in django)
2) get server list
Mirco
Dambe
Sarang
localhost:port is also api or it only django web server ?
Mirco
Sarang
api and rest api is same or different ...
Sarang
because questions is create api server to login apis to api
Mirco
api and rest api is same or different ...
How can you create a login APIs if you don't have an minimum idea of what API is ?
I strongly suggest you to study what's an API, what are the different types etc. etc.
before creating something you have no idea what it is
ᐯᑌᏞᏦᗩᑎ📈
What to write for EMAIL_HOST_USER and EMAIL_HOST_PASSWORD?
ᐯᑌᏞᏦᗩᑎ📈
Registered user's email and password?
Mirco
v
Xeyyam
i am getting "'Response' object is not subscriptable"
Xeyyam
city_weather = {
'city': city,
'temprature': r['main']['temp'],
'description': r['weather'][0]['description'],
'icon': r['weather'][0]['icon'],
}
Xeyyam
in this code
Xeyyam
can anybody help?
✙Yaroslav
Gil
Mirco
Anonymous
How to use multiple models in search??
✙Yaroslav
Mirco
I know
So you have the answer for your question
✙Yaroslav
Templates is the presentation layer
I paraphrase. How do I change my mail not in code, but to make it available for editing from a template? how to realize it? I understand what it is in the views.py file to do, how?
Mirco
Moe (محمد)
Hello, im retrieving information from an API and i want to save it in a model, but i dont want to call the api everytime the page reload since the information doesnt change that often. What is the best way to do it?
Mirco
✙Yaroslav
And my question, How to change this data from a template?
✙Yaroslav
Or this impossible?
Mirco
Ok so you said that is a "const" , constant means that it's something that doesn't change
You can use django-constance to create some configurable settings by Django admin panel
Mirco
But this is not the scenario, EMAIL_HOST_USER usually is configured by using environment variables
✙Yaroslav
is analogy absent?
ᐯᑌᏞᏦᗩᑎ📈
Guys i am doing password reset and it was almost successful I am not getting any error but email doesn't pop in in my inbox
Mirco
is analogy absent?
Why would you let a user change a configuration of your infrastructure ?
It doesn't make sense
Mirco
Mirco
https://docs.djangoproject.com/en/3.0/topics/email/#send-mail
Mirco
The from_email param
Mirco
You can change it into a view and "raise" the change from a template
✙Yaroslav
Mirco
✙Yaroslav
Ada
Hello guys,
Anyone has any idea on how to come up with a biometric authentication system (system) using Django?
Main issue being the code that reads, saves to db and does real time matching of the fingerprints.
✙Yaroslav
For example:
user_email = User.objects.get(email_admin)
user_password = User.objects.get(password_admin)
EMAIL_HOST_USER = 'email_admin' EMAIL_HOST_PASSWORD = 'password_admin'
✙Yaroslav
✙Yaroslav
Mirco
!yw
Doragonsureiyā
You're welcome! 😊
✙Yaroslav
✙Yaroslav
!yw
Maybe are you have a example?
Mirco
But... How?
Please go into django official docs, you will find everything
✙Yaroslav
Anonymous
"GET /static/js/main.js HTTP/1.1" 404 1656
Anonymous
help me plis
Anonymous
guys
Anonymous
my app web, don't found file static
Anonymous
😂
Anonymous
sorry
Anonymous
i have this configuration in the setting.py STATIC_URL = '/static/'
STATICFILES_DIR =(
os.path.join(BASE_DIR,'static'),
Muflone
that's pretty pointless, django doesn't serve static files apart in the development mode
Muflone
you have to set your web server to handle /static and avoiding to ask your web app to serve them (and your app won't serve them, if you misconfigured your web server)