Re: Simple Ajax Search

2023-11-25 Thread Mithilesh Rawani
Mithilesh rawani software developer deoghar Jharkhand +91 9572990020 On Sun, 26 Nov 2023, 6:58 am Kwarteng, wrote: > you can try typeahead.js > > https://twitter.github.io/typeahead.js/ > > On Thursday, 23 November 2023 at 15:10:24 UTC raghav bajaj wrote: > >> You can

Re: Simple Ajax Search

2023-11-25 Thread Kwarteng
you can try typeahead.js https://twitter.github.io/typeahead.js/ On Thursday, 23 November 2023 at 15:10:24 UTC raghav bajaj wrote: > You can make an AJAX call using the oninput event of the search input > field. Use a GET method to fetch the results from the DB in the AJAX call. >

Re: Simple Ajax Search

2023-11-23 Thread raghav bajaj
You can make an AJAX call using the oninput event of the search input field. Use a GET method to fetch the results from the DB in the AJAX call. On Thu, Nov 23, 2023 at 6:06 PM lone...@gmail.com wrote: > Hello all, > >I am looking for a simple how-to on creating an interactive se

Re: Simple Ajax Search

2023-11-23 Thread lone...@gmail.com
A stipulation that I forgot to mention is that the desired drop down selections will be coming from an external API. I did not see the package calling out to an external API, will this still work? On Thursday, November 23, 2023 at 9:09:11 AM UTC-5 Thomas Couch wrote: > I think Select2 is a well

Re: Simple Ajax Search

2023-11-23 Thread Thomas Couch
I think Select2 is a well trodden path for this sort of thing (unless I'm mistaken, it's already available in the admin interface). Have a look at the django-select2 package: https://django-select2.readthedocs.io/en/latest/ On Thursday, November 23, 2023 at 12:36:23 PM UTC lone...@gmail.com wrot

Simple Ajax Search

2023-11-23 Thread lone...@gmail.com
Hello all, I am looking for a simple how-to on creating an interactive search on a text field. As the user types the search results change and the user can click on the search result that they want. I have installed jquery3 and bootstrap5 in my django project. Thank you. -- You received

Re: 0 i am trying to upload a file to django server backend.i added a progress bar by using javascript,xhr and ajax method also i added a cancel button to cancel the upload the progress bar is working

2023-11-08 Thread 2JR19CS041_Danish
gt; > Document > https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"; > integrity= > "sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" > crossorigin="anonymous"> > > > https://ajax.googleapis.co

0 i am trying to upload a file to django server backend.i added a progress bar by using javascript,xhr and ajax method also i added a cancel button to cancel the upload the progress bar is working pr

2023-10-30 Thread Gokul G.M
Document https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"; integrity= "sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous"> https://ajax.googleapis.com/ajax/lib

Re: Django forms data save using ajax

2023-04-15 Thread 'Kasper Laudrup' via Django users
On 15/04/2023 12.31, Prashanth Patelc wrote: Hi all, How to save employees information using ajax with django form , id should automatic generation ? Try this helpful link: https://googlethatforyou.com?q=django%20ajax%20form Kind regards, Kasper Laudrup -- You received this message

Django forms data save using ajax

2023-04-15 Thread Prashanth Patelc
Hi all, How to save employees information using ajax with django form , id should automatic generation ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email

Re: Ajax call not working with X-editable

2022-02-14 Thread Sujata Aghor
> > You must send in all post and ajax post everytime CSRF Token. Please try > it. > Yes ..Yes .. I am sending a csrf token. > When you send it which response you get from django? ajax call is not getting called only. The same ajax call is working for other use cases, but not

Re: Ajax call not working with X-editable

2022-02-14 Thread Sebastian Jung
Hello, You must send in all post and ajax post everytime CSRF Token. Please try it. When you send it which response you get from django? Regards Sujata Aghor schrieb am Mo., 14. Feb. 2022, 07:03: > Hello Django lovers, > > I am trying to use inline edit using X-editable

Ajax call not working with X-editable

2022-02-13 Thread Sujata Aghor
Hello Django lovers, I am trying to use inline edit using X-editable <https://vitalets.github.io/x-editable/docs.html> Here I am trying to fill 'source' value with an ajax call, which will fill a dropdown on every click. But it's not working. If anyone tried this earlier ple

Re: request.POST.getlist('xxx') only has one value in ajax request for many2many

2022-01-17 Thread Julio Cojom
s for a different form > elsewhere, it would iterate through all the identical keys: >print(self.request.__dict__) > for pool in self.request.POST.getlist('pool_list'): > print(f"form pool_list item: {pool}") > > The main difference to

Re: request.POST.getlist('xxx') only has one value in ajax request for many2many

2022-01-17 Thread Campbell McKilligan
) for pool in self.request.POST.getlist('pool_list'): print(f"form pool_list item: {pool}") The main difference to when it works is that this form is submitted via ajax; and uses UpdateView. On Monday, 17 January 2022 at 01:34:18 UTC Jason wrote: > https:/

Re: request.POST.getlist('xxx') only has one value in ajax request for many2many

2022-01-16 Thread Jason
xample: > Lists = request.getlist('item') > For list in Lists: > . > > > On Sun, Jan 16, 2022, 9:30 PM Campbell McKilligan > wrote: > >> Hi, >> >> Using Django 3.2 and Py 3.9 >> >> I have an ajax request which submits multiple values

Re: request.POST.getlist('xxx') only has one value in ajax request for many2many

2022-01-16 Thread Odigiri Richard
You might want to loop through the list Example: Lists = request.getlist('item') For list in Lists: . On Sun, Jan 16, 2022, 9:30 PM Campbell McKilligan wrote: > Hi, > > Using Django 3.2 and Py 3.9 > > I have an ajax request which submits multiple values for a

request.POST.getlist('xxx') only has one value in ajax request for many2many

2022-01-16 Thread Campbell McKilligan
Hi, Using Django 3.2 and Py 3.9 I have an ajax request which submits multiple values for a field to an UpdateView. In the request dict body I see both values (in this case, for the pool_list column): '_body': b"csrfmiddlewaretoken=z...h&...&key=...&expiry_datetim

Re: How to get a variable from an ajax request and use it in another application in Django?

2021-12-04 Thread David Nugent
a shopping cart (plenty >>> of examples only a google search away). >>> Typically you store this information in the user's session in the first >>> view, then retrieve it in the subsequent view(s). >>> >>> Note that `request.is_ajax` is deprecated and doe

Re: How to get a variable from an ajax request and use it in another application in Django?

2021-12-03 Thread kayhan
, then retrieve it in the subsequent view(s). >> >> Note that `request.is_ajax` is deprecated and does not even exist anymore >> in Django 3.x. You can guess that from other info, but you should probably >> use a >> different view for handling the ajax request in any

Re: How to get a variable from an ajax request and use it in another application in Django?

2021-12-01 Thread kayhan
x27;s session in the first > view, then retrieve it in the subsequent view(s). > > Note that `request.is_ajax` is deprecated and does not even exist anymore > in Django 3.x. You can guess that from other info, but you should probably > use a > different view for handling the aja

Re: How to get a variable from an ajax request and use it in another application in Django?

2021-11-30 Thread David Nugent
that `request.is_ajax` is deprecated and does not even exist anymore in Django 3.x. You can guess that from other info, but you should probably use a different view for handling the ajax request in any case, for clarity and maintainability. The response data would usually use a different format (json vs text

Re: How to get a variable from an ajax request and use it in another application in Django?

2021-11-30 Thread kayhan
Sorry I did not ask the question well. Question: How to first send some data with an Ajax request to Django view and then with a post request, send the form information to the same view and use the data sent in the previous request (Ajax request) in the second request ? def planing(request

Re: How to get a variable from an ajax request and use it in another application in Django?

2021-11-29 Thread David Nugent
AM kayhan wrote: > How to get a variable from an ajax request and use it in another > application in Django? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving

How to get a variable from an ajax request and use it in another application in Django?

2021-11-29 Thread kayhan
How to get a variable from an ajax request and use it in another application in Django? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-user

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
t;>> >>>>>>> do a demo, enter the URL on the text area and click on the post >>>>>>> button. >>>>>>> Then send me the logs on the terminal running Django and also open >>>>>>> the console and send the output, &

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
lt; >>>>>> abubakarbr...@gmail.com> wrote: >>>>>> >>>>>>> okay let me explain. >>>>>>> I have trained models which tells us that which website is >>>>>>> legitimate or which website is not legitimate

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread Duncan Santiago
r...@gmail.com> wrote: >>>>> >>>>>> okay let me explain. >>>>>> I have trained models which tells us that which website is legitimate >>>>>> or which website is not legitimate. I have integrated that model with my >>>&

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
gt;>>>> I have trained models which tells us that which website is legitimate >>>>> or which website is not legitimate. I have integrated that model with my >>>>> django web app using rest api. >>>>> I tested the API on postman and working. >>>>

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread Duncan Santiago
> javascript. so how can I achieve it? >>>> >>>> On Tue, Nov 23, 2021 at 10:16 PM Duncan Santiago < >>>> duncansantiag...@gmail.com> wrote: >>>> >>>>> hello, am not sure what the question is. Kindly elaborate. >>&g

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
>>> On Tue, Nov 23, 2021 at 10:16 PM Duncan Santiago < >>> duncansantiag...@gmail.com> wrote: >>> >>>> hello, am not sure what the question is. Kindly elaborate. >>>> >>>> On Tue, 23 Nov 2021 at 09:19, DJANGO DEVELOPER >>&

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread Duncan Santiago
>> >>> hello, am not sure what the question is. Kindly elaborate. >>> >>> On Tue, 23 Nov 2021 at 09:19, DJANGO DEVELOPER >>> wrote: >>> >>>> I am working on a django based project in which I have integrated ML >>>> train

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread Duncan Santiago
on a django based project in which I have integrated ML >>> trained models to check if a https url is legitimate or not. for this I >>> need javascript or ajax to call a rest api for my form in which I want to >>> send a post request so that I can check if a https url is leg

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
I have integrated ML >> trained models to check if a https url is legitimate or not. for this I >> need javascript or ajax to call a rest api for my form in which I want to >> send a post request so that I can check if a https url is legitimate or not. >> *NOTE: My code is runni

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread Duncan Santiago
hello, am not sure what the question is. Kindly elaborate. On Tue, 23 Nov 2021 at 09:19, DJANGO DEVELOPER wrote: > I am working on a django based project in which I have integrated ML > trained models to check if a https url is legitimate or not. for this I > need javascript or ajax

AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
I am working on a django based project in which I have integrated ML trained models to check if a https url is legitimate or not. for this I need javascript or ajax to call a rest api for my form in which I want to send a post request so that I can check if a https url is legitimate or not

Edit data from django-ajax-datatable

2021-10-17 Thread Eugene TUYIZERE
Dear Team, I am using django-ajax-datatable and I have this: [image: image.png] The *Edit *button is added from server side as follow: def customize_row(self, row, obj): row['edit'] = """ Edit """ the table itself is rendered to

Re: Allow field validation in ajax.

2021-06-17 Thread Ayush Bisht
et is your form so you can use that to get data >> as let data = new FormData(event.target) >> }) >> >> On Saturday, 12 June 2021 at 22:09:26 UTC+5:30 eugenet...@gmail.com >> wrote: >> >>> Friends, >>> >>> The ajax codes below successfull

Re: Allow field validation in ajax.

2021-06-17 Thread Eugene TUYIZERE
e page reload. >// here event.target is your form so you can use that to get data > as let data = new FormData(event.target) > }) > > On Saturday, 12 June 2021 at 22:09:26 UTC+5:30 eugenet...@gmail.com wrote: > >> Friends, >> >> The ajax codes below successf

Re: Allow field validation in ajax.

2021-06-12 Thread Nikeet NA
get) }) On Saturday, 12 June 2021 at 22:09:26 UTC+5:30 eugenet...@gmail.com wrote: > Friends, > > The ajax codes below successfully save the records in the database without > page loading. But what I want is to validate the fields first before > saving. The codes do not val

Allow field validation in ajax.

2021-06-12 Thread Eugene TUYIZERE
Friends, The ajax codes below successfully save the records in the database without page loading. But what I want is to validate the fields first before saving. The codes do not validate the empty field. How can I include that validation ? please help $(".submit_btn").click(function()

Re: Django dependent select without Ajax

2021-03-30 Thread RANGA BHARATH JINKA
>> >> Hi Experts, >> >> Does anyone knows Drop down list in Django without Ajax which is faster >> enough to fetch data from Big DataBase. >> >> Please guide me on this. >> >> Regards >> Sachin >> >> -- > You received this message be

Re: Django dependent select without Ajax

2021-03-30 Thread Ryan Nowakowski
About how many elements do you anticipate will be in the drop-down? On March 30, 2021 8:59:19 AM CDT, Sachin Kumar wrote: >Hi Experts, > >Does anyone knows Drop down list in Django without Ajax which is faster > >enough to fetch data from Big DataBase. > >Please guide m

Django dependent select without Ajax

2021-03-30 Thread Sachin Kumar
Hi Experts, Does anyone knows Drop down list in Django without Ajax which is faster enough to fetch data from Big DataBase. Please guide me on this. Regards Sachin -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: hi mates trouble with ajax 500 error server

2021-03-28 Thread frank galan
Thanks a lot, you're right. I solved it. Thanks El dom, 28 mar 2021 a las 0:57, Kasper Laudrup () escribió: > On 27/03/2021 21.41, frank galan wrote: > > thanks, here is the server error response > > > > NameError: name 'JsonResponse' is not defined > > > > That error message should be fairly ob

Re: hi mates trouble with ajax 500 error server

2021-03-27 Thread Kasper Laudrup
On 27/03/2021 21.41, frank galan wrote: > thanks, here is the server error response > > NameError: name 'JsonResponse' is not defined > That error message should be fairly obvious. You haven't defined anything called JsonResponse. You most likely just need to import the correct module. I don't

Re: hi mates trouble with ajax 500 error server

2021-03-27 Thread frank galan
18:48, Kasper Laudrup () escribió: > On 27/03/2021 15.13, frank galan wrote: > > Im receiving a 500 server error, when I trying to obtain data wiith > > ajax from my model. > > You should look at the server logs or the output from the console. That > should hopefully provid

Re: hi mates trouble with ajax 500 error server

2021-03-27 Thread Kasper Laudrup
On 27/03/2021 15.13, frank galan wrote: > Im receiving a 500 server error,  when I trying  to obtain data wiith > ajax from my model.  You should look at the server logs or the output from the console. That should hopefully provide some details on the reason behind the "Internal S

hi mates trouble with ajax 500 error server

2021-03-27 Thread frank galan
Im receiving a 500 server error, when I trying to obtain data wiith ajax from my model. My details are as follows: *Model:* class Item(models.Model): """Items Product model""" operation = models.ForeignKey(Operation, on_delete=models.CASCADE) b

Re: Django and Ajax

2021-01-17 Thread carlos
this is a example Django and Ajax maybe help you https://simpleisbetterthancomplex.com/tutorial/2016/08/29/how-to-work-with-ajax-request-with-django.html On Sun, Jan 17, 2021 at 5:18 PM www.forum-gh.com wrote: > Hello, > Please I need your help on this, I am an absolute beginne

Django and Ajax

2021-01-17 Thread www.forum-gh.com
Hello, Please I need your help on this, I am an absolute beginner, how can I create a filter using ajax for example when the user selects Ghana from a dropdown then data related to this country will show without refreshing the page. Thanks -- You received this message because you are

How can i send formdata and other data in ajax post

2020-11-10 Thread Rajshree Some
I have a Ajax post method where I am sending mutiple data but now I want to add formdata and capture it in post method as object.Can I do that? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Error at the return of an AJAX POST in DJANGO

2020-10-26 Thread Nikitha Bangalore Escorts
hmm On Monday, October 26, 2020 at 2:35:28 AM UTC+5:30 wwran...@gmail.com wrote: > Hi buddies, I have a POST request from ajax. At the backend some records > are updated in the django view, this is done fine but an error comes up and > the page isnt reloaded. > > ***Th

Re: Error at the return of an AJAX POST in DJANGO

2020-10-25 Thread Walter Randazzo
> >> I tried with no luck. When i remove it it brings an error. >> >> El domingo, 25 de octubre de 2020 a la(s) 19:19:29 UTC-3, trebor escribió: >> >>> Walter, >>> >>> >>> >>> If your copy and paste is accurate yo

Re: Error at the return of an AJAX POST in DJANGO

2020-10-25 Thread leon.vaks
Sent from my Samsung Galaxy smartphone. Original message From: Walter Randazzo Date: 10/25/20 6:10 PM (GMT-05:00) To: django-users@googlegroups.com Subject: Re: Error at the return of an AJAX POST in DJANGO hi there, As far as I check its OK.Thanks for replay.El dom., 25

Re: Error at the return of an AJAX POST in DJANGO

2020-10-25 Thread leon.vaks
  t.f  Sent from my Samsung Galaxy smartphone. Original message From: Walter Randazzo Date: 10/25/20 6:10 PM (GMT-05:00) To: django-users@googlegroups.com Subject: Re: Error at the return of an AJAX POST in DJANGO hi there, As far as I check its OK.Thanks for replay.El dom

Re: Error at the return of an AJAX POST in DJANGO

2020-10-25 Thread Malcolm MacKinnon
luck. When i remove it it brings an error. > > El domingo, 25 de octubre de 2020 a la(s) 19:19:29 UTC-3, trebor escribió: > >> Walter, >> >> >> >> If your copy and paste is accurate you have too many closing brackets in >> the ajax section. &g

Re: Error at the return of an AJAX POST in DJANGO

2020-10-25 Thread Walter Randazzo
I tried with no luck. When i remove it it brings an error. El domingo, 25 de octubre de 2020 a la(s) 19:19:29 UTC-3, trebor escribió: > Walter, > > > > If your copy and paste is accurate you have too many closing brackets in > the ajax section. > > > > Try

RE: Error at the return of an AJAX POST in DJANGO

2020-10-25 Thread 'Trevor Woolley' via Django users
Walter, If your copy and paste is accurate you have too many closing brackets in the ajax section. Try removing one of these from the end of the ajax section: }); From: django-users@googlegroups.com On Behalf Of Walter Randazzo Sent: Monday, 26 October 2020 9:09 AM To: django-users

Re: Error at the return of an AJAX POST in DJANGO

2020-10-25 Thread Walter Randazzo
hi there, As far as I check its OK. Thanks for replay. El dom., 25 oct. 2020 a las 18:43, rbar...@xcaretresearch.com (< rbarh...@xcaretresearch.com>) escribió: > Not sure, but looks like an extra closing bracket in line 9 of the ajax > code > > On Sunday, October 25, 2020 a

Re: Error at the return of an AJAX POST in DJANGO

2020-10-25 Thread Walter Randazzo
function defined properly? > if(e="OK") vs. if(e=="OK") > > On Sun, Oct 25, 2020 at 2:06 PM Walter Randazzo > wrote: > > > > Hi buddies, I have a POST request from ajax. At the backend some records > are updated in the django view, this is done

Re: Error at the return of an AJAX POST in DJANGO

2020-10-25 Thread Malcolm MacKinnon
I'm not a JS expert, but is your success function defined properly? if(e="OK") vs. if(e=="OK") On Sun, Oct 25, 2020 at 2:06 PM Walter Randazzo wrote: > > Hi buddies, I have a POST request from ajax. At the backend some records are > updated in the django vi

Re: Error at the return of an AJAX POST in DJANGO

2020-10-25 Thread rbar...@xcaretresearch.com
Not sure, but looks like an extra closing bracket in line 9 of the ajax code On Sunday, October 25, 2020 at 2:05:28 PM UTC-7 wwran...@gmail.com wrote: > Hi buddies, I have a POST request from ajax. At the backend some records > are updated in the django view, this is done fine but an

Error at the return of an AJAX POST in DJANGO

2020-10-25 Thread Walter Randazzo
Hi buddies, I have a POST request from ajax. At the backend some records are updated in the django view, this is done fine but an error comes up and the page isnt reloaded. ***This is the error:*** > SyntaxError: Unexpected token O in JSON at position 0 ***This is the ajax:*** $.a

Re: Ajax, jQuery and Django

2020-10-11 Thread Dvs Khamele
Hi do you hire contract based python/django freelancer? We can help you in this and related tasks at fair prices. Reply or send email to divy...@pythonmate.com Best Regards, Divyesh Khamele, Pythonmate On Mon, 5 Oct 2020, 1:33 pm Salima Begum, wrote: > Hi all, > I have database of zip code for

Re: Ajax, jQuery and Django

2020-10-11 Thread Dvs Khamele
Hi do you hire contract based python/django freelancer? We can help you in this and related tasks at fair prices. Reply or send email to divy...@pythonmate.com Best Regards, Divyesh Khamele, Pythonmate On Mon, 5 Oct 2020, 1:35 pm Salima Begum, wrote: > Hi all, > I have database of zip code for

Re: Ajax, jQuery and Django

2020-10-05 Thread Eugene TUYIZERE
est > > > https://www.youtube.com/results?search_query=django+dependent+drop+down+list+from+database > > On Mon, Oct 5, 2020 at 1:56 PM Kunal Solanke > wrote: > >> Rather than sending ajax every time handle it on frontend in javascript >> >> On Mon, Oct 5, 2020, 13:35 Salima

Re: Ajax, jQuery and Django

2020-10-05 Thread RANGA BHARATH JINKA
Hi, Check this. This may be useful for you. All the best https://www.youtube.com/results?search_query=django+dependent+drop+down+list+from+database On Mon, Oct 5, 2020 at 1:56 PM Kunal Solanke wrote: > Rather than sending ajax every time handle it on frontend in javascript > > On M

Re: Ajax, jQuery and Django

2020-10-05 Thread Kunal Solanke
Rather than sending ajax every time handle it on frontend in javascript On Mon, Oct 5, 2020, 13:35 Salima Begum wrote: > Hi all, > I have database of zip code for example, > INSERT INTO pages_zip_code (id, zip, city, st) VALUES > (1, '00501', 'Holtsville', &

Ajax, jQuery and Django

2020-10-05 Thread Salima Begum
Hi all, I have database of zip code for example, INSERT INTO pages_zip_code (id, zip, city, st) VALUES (1, '00501', 'Holtsville', 'NY'), (2, '00544', 'Holtsville', 'NY'), (3, '00601', 'Adjuntas', 'PR'), (4, '00602', 'Aguada', 'PR'), (5, '00603', 'Aguadilla', 'PR'), (6, '00604', 'Aguadilla', 'PR'),

Ajax, jQuery and Django

2020-10-05 Thread Salima Begum
Hi all, I have database of zip code for example, INSERT INTO pages_zip_code (id, zip, city, st) VALUES (1, '00501', 'Holtsville', 'NY'), (2, '00544', 'Holtsville', 'NY'), (3, '00601', 'Adjuntas', 'PR'), (4, '00602', 'Aguada', 'PR'), (5, '00603', 'Aguadilla', 'PR'), (6, '00604', 'Aguadilla', 'PR'),

Re: Django +Ajax + jQuery problem

2020-07-03 Thread Andréas Kühne
Hi, The reason for this is that you are replacing the buttons when you update the answer. The event listener that you attached is on the first one and not the second one. You can solve this in 2 ways: 1. Reregister the event listener when you have loaded the answer again. 2. Use a different way t

Django +Ajax + jQuery problem

2020-07-02 Thread Jan Gregorczyk
My problem is that site registers only the first click on .upvote or .downvote element and ignores next ones. {% extends 'base.html' %} {% load votes_exists %} {% block title %}{{question.title|truncatechars:52}}{% endblock %} {% block content %} {{question.title}} {{question.content}} {% for answe

Re: Django CSRF protection and AJAX calls

2020-06-10 Thread Kevin
a mix of both. On Wednesday, June 10, 2020 at 11:57:52 AM UTC-4, Boris Pérez wrote: > > My way, i use the csrf_token tag on template, an pass it to the view in > the ajax call, using > > $.ajax({ > url : url, > type : "POST", // http method >

Re: Django CSRF protection and AJAX calls

2020-06-10 Thread Boris Pérez
My way, i use the csrf_token tag on template, an pass it to the view in the ajax call, using $.ajax({ url : url, type : "POST", // http method data : {'csrfmiddlewaretoken': $('input[name="csrfmiddlewaretoken"]').val(), 'v1'

Re: Django CSRF protection and AJAX calls

2020-06-09 Thread Allan Rafael
ken'); E no template html, você deve inserir beforeSend assim: $.ajax({ url: url, type: 'POST', data: {'data1': data1}, dataType: 'json', beforeSend: function(xhr, se

Re: Ajax and Django and jQuery - .attr()

2020-05-31 Thread meli...@melindaminch.com
id:answerid}); > }); > > But also, it's bad bad form to define your own attribute names on HTML. Use > the "data-answer-id" attribute name to do this, and in your code access it > with $(this).data("answer-id"). > > On Sun, May 31, 2020 at 2:19 PM Jan

Re: Ajax and Django and jQuery - .attr()

2020-05-31 Thread Stephen J. Butler
$.post("{% url 'upvote' %}", {answer_id:answerid}); }); But also, it's bad bad form to define your own attribute names on HTML. Use the "data-answer-id" attribute name to do this, and in your code access it with $(this).data("answer-id").

Ajax and Django and jQuery - .attr()

2020-05-31 Thread Jan Gregorczyk
I have a problem with Ajax and Django templates. I'm new to Ajax and jquery. Console log at the end of the script prints undefined. I don't know why let answerid = $(this).attr("answer-id"); doesn't extract attribute from this line: ↑ I also want to know if using te

Django CSRF protection and AJAX calls

2020-05-26 Thread Kevin
Hi, I'm not able to POST to django without having a csrf_token cookie sent with the request, though the documentation says you can set an X-CSRFToken header - it appears to be entirely ignored. The behaviour has been pointed out a couple of times before: https://code.djangoproject.com/ticket/2

Re: Can't Fix the No Reverse Error in Ajax

2020-05-20 Thread Hella Nick
是的,正确的写法为 Like Motaz Hejaze 于2020年5月20日周三 下午2:06写道: > Change your ajax method from "post" to "get" , you are not submitting any > data to use post . > > Also change the method in your form too , and share the error message > please. > > On Wed, 20

Re: Can't Fix the No Reverse Error in Ajax

2020-05-19 Thread Motaz Hejaze
Change your ajax method from "post" to "get" , you are not submitting any data to use post . Also change the method in your form too , and share the error message please. On Wed, 20 May 2020, 6:18 am Ahmed Khairy, wrote: > Do you mean that this

Re: Can't Fix the No Reverse Error in Ajax

2020-05-19 Thread Ahmed Khairy
Do you mean that this line should be changed? No ! Don't Print it On Tuesday, May 19, 2020 at 11:11:12 PM UTC-4, Hella Nick wrote: > > button标签中的type属性设置为button, > > Ahmed Khairy > 于2020年5月20日周三 上午1:54写道: > >

Re: Can't Fix the No Reverse Error in Ajax

2020-05-19 Thread Hella Nick
Django中的表单提交按钮不要使用submit属性,否则会触发get请求,或者发生错误。 Hella Nick 于2020年5月20日周三 上午11:09写道: > button标签中的type属性设置为button, > > Ahmed Khairy 于2020年5月20日周三 上午1:54写道: > >> I am trying to use Ajax to submit a like button, I believe everything is >> in

Re: Can't Fix the No Reverse Error in Ajax

2020-05-19 Thread Hella Nick
button标签中的type属性设置为button, Ahmed Khairy 于2020年5月20日周三 上午1:54写道: > I am trying to use Ajax to submit a like button, I believe everything is > in order but I keep getting django.urls.exceptions.NoReverseMatch: Reverse > for 'like_post' with arguments '(''

Can't Fix the No Reverse Error in Ajax

2020-05-19 Thread Ahmed Khairy
I am trying to use Ajax to submit a like button, I believe everything is in order but I keep getting django.urls.exceptions.NoReverseMatch: Reverse for 'like_post' with arguments '('',)' not found. 1 pattern(s) tried: ['score/like/(?P[0-9]+)$'] I am n

Re: how to write Ajax for a Like button in Django

2020-05-18 Thread Ahmed Khairy
form in your templates , >>> try this : >>> >>> >>> >>> i don't think you need ajax for this , but if you still need it let us know >>> >>> >>> On Mon, 18 May 2020, 2:26 am Gabriel Araya Garcia, < >>> gabri

RE: Re: how to write Ajax for a Like button in Django

2020-05-18 Thread Vishesh Mangla
Why don’t you use fetch api? Its simple. Once you get the response from the server, you can use InsertAdjacentHtml.  Sent from Mail for Windows 10 From: Motaz HejazeSent: 18 May 2020 07:34To: Django usersSubject: Re: how to write Ajax for a Like button in Django The button is submitted but without

Re: how to write Ajax for a Like button in Django

2020-05-17 Thread Motaz Hejaze
;> In your like button form in your templates , >> try this : >> >> >> >> i don't think you need ajax for this , but if you still need it let us know >> >> >> On Mon, 18 May 2020, 2:26 am Gabriel Araya Garcia, >> wrote: >> >&g

Re: how to write Ajax for a Like button in Django

2020-05-17 Thread Ahmed Khairy
Hi Motaz, When I added your code it disabled the function of the button nothing happened On Sunday, May 17, 2020 at 9:30:38 PM UTC-4, Motaz Hejaze wrote: > > In your like button form in your templates , > try this : > > > > i don't think you need ajax for this , bu

Re: how to write Ajax for a Like button in Django

2020-05-17 Thread Motaz Hejaze
In your like button form in your templates , try this : i don't think you need ajax for this , but if you still need it let us know On Mon, 18 May 2020, 2:26 am Gabriel Araya Garcia, < gabrielaraya2...@gmail.com> wrote: > Hi Ahmed, I was looking for that during several mon

Re: how to write Ajax for a Like button in Django

2020-05-17 Thread Gabriel Araya Garcia
Gabriel Araya Garcia GMI - Desarrollo de Sistemas Informáticos El dom., 17 may. 2020 a las 20:15, Ahmed Khairy (< ahmed.heshamel...@gmail.com>) escribió: > Hi all, > > I need some help writing the ajax for a like button instead of refreshing > every time a like is pos

how to write Ajax for a Like button in Django

2020-05-17 Thread Ahmed Khairy
Hi all, I need some help writing the ajax for a like button instead of refreshing every time a like is posted here is the template: {% csrf_token %} {% if user.is_authenticated %} {% if liked

How to connect the external independent template(contains of javascript and ajax) with django backend to POST the zip file to external template

2020-04-25 Thread yashwanth balanagu
connect the external independent template(contains of javascript and ajax) with django backend to pass the image from front end and get the image in backend convert into the zip file and post to external javascript template -- You received this message because you are subscribed to the Google

django dependent drop down list without using javascript; ajax; jquery

2020-04-11 Thread Mayank Tripathi
Hi All, Could any one please share some details on how we can do dependent drop down list selection. I am seeing lot of videos or content to handle this via JavaScript; AJAX; jquery etc.. but just wondering if Django has anything which can be handled easily. -- You received this message

Unable to receive Ajax GET data in views.py

2020-03-14 Thread Sundaresan R
Hi, In a template I have two ajax calls (one POST, one GET) corresponding to "Save" button and a "Go Back" button which are on two different forms. While the POST data on clicking "Save" gets passed to url1, GET data on clicking "Go Back" is being rec

Django- ajax passing multiple values to the url

2020-02-22 Thread Raj Narayan
me"); var jq_schemaname= $("#collist tr").last().attr("data-schemaname"); var jq_tablenm= $("#collist tr").last().attr("data-tablenm"); $.ajax({ type: "POST", url : "http://localhost:8000/refresh

How to fill the form field with the data based on drop down selection of another form field using ajax request

2020-02-08 Thread Dilipkumar Noone
ajax request is made. Input data and expected result shown in screen shot below. *currently when i select any model from RegisteredModel, none of the data is populated in get_model_nos_for_modelname field.* *Please correct me if i am doing any mistake and how to proceed further.* [image

AJAX request is not rendering at the client side but works perfectly at the server

2020-01-05 Thread Daniel Roseman
Why would you expect it to render anything? All your success function does is log to the console. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django

AJAX request is not rendering at the client side but works perfectly at the server

2020-01-05 Thread Chinmay Dali
I have data that I am trying to display in a tabular format, and I have also added filters for that tabular data. The filter sends an AJAX request to the server, works on the same function inside "views.py" but the page doesn't refresh with new data. I extracted the query format

  1   2   3   4   5   6   7   8   9   10   >