Charly
I am saying rite it is running
How did you verified?
Maxim
I am saying rite it is running
installed and running is not the same
abhishek
after running the elasticsearch.bat after that in chrome i have given localhost:9200 it given the output of cluster_name,cluster_uuid
abhishek
Then we can confirm rite elasticsearch is running
abhishek
From the starting only i am saying that
Charly
Then we can confirm rite elasticsearch is running
Now, share the connections details from your django settings
abhishek
ok
abhishek
https://linkode.org/#ABJj2n3w2SzW341rjplq56
Charly
https://linkode.org/#ABJj2n3w2SzW341rjplq56
line 78 seems you are trying to connect to another IP
abhishek
I have referred some videos they have guided like xpack.security.enabled: true this to be set to false in elastic.yaml file
Charly
Should I remove that?
Delete? I don't think so I'd say use the right host
abhishek
does this effect anything?
Charly
does this effect anything?
Why do you ignore the last i told you?
abhishek
I have changed that
abhishek
{192.168.1.101:9200} to this
Charly
{192.168.1.101:9200} to this
Why that and not localhost?
abhishek
Because this i have got when i tried to run elasticsearch.bat
abhishek
And also both will be the same rite
abhishek
output
abhishek
Ok i will change to localhost
abhishek
like that output cluster_name and all
Charly
Ok
Charly
Well change it and restart your django server, try againif it doesnt work then show the full error
abhishek
Ok i will
abhishek
Yea now its working fine
abhishek
Thank you
Nityananda
Access to XMLHttpRequest at 'http://127.0.0.1:8000/api/user/doctor-list' from origin 'http://localhost:5173' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Nityananda
though i have already install cors and configured
Nityananda
but i am unable to call it from frontend
Sharma
I am using Django-storages s3 When I upload image form api gives error “upload valid image”
Nityananda
Already done but not working
Nityananda
Riad
Can anyone suggest to me which part of django I should not learn since I use django for api only by django rest framework. It seems to me about 40-50% of django is about template rendering
S
Can anyone plz guide me. How to use loops in djnago apis
S
Plz guide me how to create api post method using loops ? I need employee id's from emp data
LStyle
does anyone know how to use streams in Django
Suren
Hi guys, I have select on my site which I want to use for sorting tours on the page. <div class="custom-select"> <select name="sort"> {% get_sorters as data %} {% for key in data %} <option value="?sort={{ key.sorter }}">{{ key.title }}</option> {% endfor %} </select> </div> The problem is I do not know how to pass a link when choosing key.title. My view looks as below: def get_queryset(self): sort_field = self.request.GET.get('sort') tours = Tours.objects.filter(cat__slug=self.kwargs['cat_slug'], is_published=True).select_related('cat') if sort_field: tours = tours.order_by(sort_field) return tours Everythings works great when I am using <a href ""></a> instead of <select> but the problem is it is required to use select
Hernan
here it's https://linkode.org/#Kd6b8DWNrMMLjjGVSlYVV6
my apologies, by mistake i was banned and i couldn't respond to you, about your problem you need to see the documentation, the field "id" must be excluded on the admin form definition
Mirco
Or use fast API instead? Use right framework for the right job ?
u can use Django just for APIs , is still the right framework
S
Can anyone plz guide me ? How to create dropdown list using class based api in django
Riad
Or use fast API instead? Use right framework for the right job ?
Fast Api is not matured. And now html templating is not a thing in web sector because Web apps become super complex and large. You need a separate frontend framework to handle today's business logic
Mirco
Fast Api is not matured. And now html templating is not a thing in web sector because Web apps become super complex and large. You need a separate frontend framework to handle today's business logic
FastAPI is mature, but it's not Django vs FastAPI they can be used for achieve the same goal but they have huge diffs it's up to the developers to evaluate and choose
S
Can anyone guide me? How to call Api to list all the employee id's
Suren
<select><a></a></select>?
Sorry, do you mean instead of <option></option> I should use <a></a> or use it together?
Suren
yes. <option><a></a><option>
I've done it but nothing happens when I select any option <option value="?sort={{ key.sorter }}"><a href="?sort={{ key.sorter }}">{{ key.title }}</a></option>
zeus
Hey I only need the last or latest registration objects from tables, anyone can help me
Suren
yes. <option><a></a><option>
I found another solution how to make it work, why I was not able to do it, because my CSS hided original SELECT element .custom-select select { display: none; } and it showed another one close to it, so when I click nothing happens(((
Suren
Is there any solution to make it work? keeping css style?
Maxim
in django or flask?
this is the Django group
Ak
this is the Django group
I know but I am just trying to help the person.
cj
I know but I am just trying to help the person.
do you think he will ask a Flask question in a Django group?
Suren
How do I change template_name = 'tours/tour-list.html' to some other layout by clicking on the page link?
.
Hi guys, please someone can help me about how can look database if this user name not exsist save it 🙏🌹
Charly
Hi guys, please someone can help me about how can look database if this user name not exsist save it 🙏🌹
You can use get_or_create() https://docs.djangoproject.com/en/4.1/ref/models/querysets/#get-or-create
Pooya
Hi guys, how can i use rabbitmq and celery to send email? I confused with Google it
Pooya
No these are not for sending emails
How can I send confirmation email?
Charly
How can I send confirmation email?
Using an emails service, like sendgrid for example
Pooya
So do I have to use smtp of sendgrif like for Google email?
Pooya
yes
🙏 thanks
ُSina
Hi, can anyone tell me the differences of geodjango and follium?
abhishek
Hi, Can any one help me with the unit testing like I have used jwt authentication in my views, if I run the test cases it's getting 401! =200 unauthorized access so how to make it authorized