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

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

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

2020-05-31 Thread meli...@melindaminch.com
Hello! To answer the question about template tags in javascript, i.e. $.post("{% url 'upvote' %}", {answer_id:answerid}) I This works when your js is written in the template, as you have it, but if you ever want to move that JavaScript into a separate .js file, it will break. That’s because

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

2020-05-31 Thread Stephen J. Butler
This isn't a jQuery issue, it's a JavaScript/ECMAScript issue. When you use the "arrow function" style like "() => { ...code... }" then certain variables are not bound into the function contact, including "this".

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 template tags in javascript

Re: Django and jQuery, I don't get it

2016-06-10 Thread Stephen J. Butler
t; 'use strict'; > > > > })(django.jQuery); > > This syntax is called a closure. First you declare a function so you > don't contaminate the global scope with your local declared variable. > Then you execute your function. > I will assume django.JQuery is the version of JQuery shipp

Re: Django and jQuery, I don't get it

2016-06-10 Thread ludovic coues
> (function($) { > 'use strict'; > > })(django.jQuery); This syntax is called a closure. First you declare a function so you don't contaminate the global scope with your local declared variable. Then you execute your function. I will assume django.JQuery is the versi

Re: Django and jQuery, I don't get it

2016-06-09 Thread Mike Dewhirst
I can't help at all with jquery but IIRC there is a question in the Admin "Are you sure?" when you try deleting something from a list view. Might be a start Mike On 10/06/2016 1:06 AM, Olivier Dalang wrote: Hi ! I'm using several modules that rely on jQuery, and have some own needs as well

Django and jQuery, I don't get it

2016-06-09 Thread Olivier Dalang
Hi ! I'm using several modules that rely on jQuery, and have some own needs as well : - admin > - grappelli > - autocomplete light > - session security > ... I also see that there are tons of different variables that reference jQuery, defined by theses modules, some of which are the same, and

Re: Both directly transfer data from django to jQuery

2016-03-10 Thread setivolkylany
May be there is something simpler than Ajax request? четверг, 10 марта 2016 г., 14:20:17 UTC+2 пользователь Sergiy Khohlov написал: > > Ajax ? > Have you checked this one ? > > Many thanks, > > Serge > > > +380 636150445 > skype: skhohlov > > On Thu, Mar 10, 2016 at 2:18 PM,

Re: Both directly transfer data from django to jQuery

2016-03-10 Thread Sergiy Khohlov
Ajax ? Have you checked this one ? Many thanks, Serge +380 636150445 skype: skhohlov On Thu, Mar 10, 2016 at 2:18 PM, wrote: > I had method model that generate dict, sample: > > { > 'translators': 5, > 'glossaries': 1, > 'abbrs': 0, > } > > I want

Both directly transfer data from django to jQuery

2016-03-10 Thread setivolkylany
I had method model that generate dict, sample: { 'translators': 5, 'glossaries': 1, 'abbrs': 0, } I want known, how transfer data without hidden fields in html file. I need here for generate google-chart. -- You received this message because you are subscribed to the Google Groups

Re: How to django with jquery-mobile

2015-07-29 Thread Alex Heyden
You pretty much answered it yourself. >there's just one actual html page and inside it we have to create a page (data-role="page") Django's template helps you put together the response that gets to the client. It's unaware of what your CSS and Javascript frameworks will do with that response.

How to django with jquery-mobile

2015-07-29 Thread Kakar Nyori
g features with jquery mobile? Or how to django with jquery mobile? Please help me understand this concept. Thank you. -- 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

Re: Django and Jquery UI

2015-05-20 Thread Joris
Hi Robert Could you please specify more clearly how you "added jqueryui to my settings.py" ? It should be handled like any other static file and doesn't really have a place in settings.py Do your other static files (images, css, etc) load? Best Seems tough to get the Jquery UI code to do

Django and Jquery UI

2015-05-19 Thread Robert librado
Seems tough to get the Jquery UI code to do anything like on Jquery.com Im using there demos just to get my feet wet ive already added jqueryui to my settings.py I already did collectstatic I added the draggable demo to an html template created the view it shows on the page but does not allow

Re: django ajax jquery

2013-08-15 Thread carlos
Hi maybe you need find in google.com for example http://fromzerotocodehero.blogspot.com/2011/01/django-ajax-tutorial-part-1.html I think there are more tutorials Cheers, On Thu, Aug 15, 2013 at 6:09 AM, Scheck Nyori wrote: > Hello! > I am a noob in web development.

django ajax jquery

2013-08-15 Thread Scheck Nyori
Hello! I am a noob in web development. Just finished polls tuts. Can anyone give me any insight in using jquery and ajax with django! If possible any tutorial. Any help will be appreciated! Thank you. -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Django with Jquery

2012-10-11 Thread Adrián Espinosa
: > > Hello, > I am totally helpless. I am trying to use JQuery in my django > templates, but I always get in firebug this: $ not defined. > > In my template I am linking jquery : > > > And then > > $(document).ready(function() { > alert("Hello from

Re: Django with Jquery

2012-10-11 Thread Marc Kirkwood
I'm having this problem at the moment too. In our case, it's because we have a base template that inserts the jQuery library via a script tag towards the end of the document, just before the close of the body element. Since anything following a $ character in JS depends on jQuery, including

Django+Ajax+jquery

2012-08-03 Thread Rishabh Dixit
Someone please give some solution to this stack overflow question- http://stackoverflow.com/questions/11706721/updating-a-button-value-database-and-call-a-view-function-without-refreshing-th -- You received this message because you are subscribed to the Google Groups "Django users" group. To

django and jquery data grids

2012-06-25 Thread rafiee.nima
Hi I want to know what is the most compatible and straight forward jquery data grid plugin for django and also how I can integrated jqgrid with django -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: django and jquery

2012-06-11 Thread Lee Hinde
On Jun 11, 2012, at 11:51 AM, cocoza4 wrote: > i tried to retrieve data from django to jquery by using get > > this is my $get in jquery > > $.get("/video/", > { > video_page: page_number >

django and jquery

2012-06-11 Thread cocoza4
i tried to retrieve data from django to jquery by using get this is my $get in jquery $.get("/video/", { video_page: page_number }, function(data){ for (var i = 0; i < d

Re: Django 1.3 - JQuery features?

2010-11-23 Thread Russell Keith-Magee
On Tue, Nov 23, 2010 at 5:18 PM, Derek wrote: > In the last Django advent,  Zain Memon said: > > "A lot of implemented features missed the cut for Django 1.2, like > drag-and-drop reordering of inlines for models with an ordering field, and > an autocomplete widget for

Django 1.3 - JQuery features?

2010-11-23 Thread Derek
In the last Django advent, Zain Memon said: "A lot of implemented features missed the cut for Django 1.2, like drag-and-drop reordering of inlines for models with an ordering field, and an autocomplete widget for Foreign Key and M2M relations to be used instead of the select drop-down (or

Re: Django + Ajax + Jquery

2010-06-07 Thread Massimiliano della Rovere
This is useful too: http://www.dajaxproject.com/ On Mon, Jun 7, 2010 at 07:57, Dmitry Dulepov wrote: > Hi! > > tazimk wrote: >>     I want to use ajax in my templates using jquery. >>     Can someone provide me some sample examples /links related to >> this. > >

Re: Django + Ajax + Jquery

2010-06-06 Thread Dmitry Dulepov
Hi! tazimk wrote: > I want to use ajax in my templates using jquery. > Can someone provide me some sample examples /links related to > this. http://www.google.com/ may be? The question is too broad. -- Dmitry Dulepov Twitter: http://twitter.com/dmitryd/ Web: http://dmitry-dulepov.com/

Re: Django + Ajax + Jquery

2010-06-06 Thread Andy Kelley
I'll go ahead and insert a plug here: http://github.com/superjoe30/jst-parser On Jun 6, 12:14 am, tazimk wrote: > Hi, > >     I want to use ajax in my templates using jquery. >     Can someone provide me some sample examples /links related to > this. >     Also some

Re: Django + Ajax + Jquery

2010-06-06 Thread Horst Gutmann
Django itself doesn't really care what JS framework you use and only offers some framework agnostic helpers within the request object like http://docs.djangoproject.com/en/1.2/ref/request-response/#django.http.HttpRequest.is_ajax to distinguish requests coming as XHRs as well as

Django + Ajax + Jquery

2010-06-06 Thread tazimk
Hi, I want to use ajax in my templates using jquery. Can someone provide me some sample examples /links related to this. Also some sample examples on using Jquery efficiently -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Django + Ajax + Jquery

2010-06-06 Thread tazimk
Hi, I want to use ajax in my templates using jquery. Can someone provide me some sample examples /links related to this. Also some sample examples on using Jquery efficiently -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Django with Jquery

2010-03-01 Thread grimmus
e 28 févr. 2010 à 18:39, Alexis Selves a écrit : > > > Hello, > > I am totally helpless. I am trying to use JQuery in my django > > templates, but I always get in firebug this: $ not defined. > > Did you try with 'jQuery' instead of '$' ? > If jQuery.no_conflict() was

Re: Django with Jquery

2010-03-01 Thread Romain Gaches
Le 28 févr. 2010 à 18:39, Alexis Selves a écrit : > Hello, > I am totally helpless. I am trying to use JQuery in my django > templates, but I always get in firebug this: $ not defined. Did you try with 'jQuery' instead of '$' ? If jQuery.no_conflict() was called, the $ variable isn'

Re: Django with Jquery

2010-02-28 Thread andreas schmid
Alexis Selves wrote: > Hello, > I am totally helpless. I am trying to use JQuery in my django > templates, but I always get in firebug this: $ not defined. > > In my template I am linking jquery : > > > where do you have your static files? did you serve them as sta

Re: Django with Jquery

2010-02-28 Thread Malcolm Box
On Sun, Feb 28, 2010 at 5:39 PM, Alexis Selves <petr.pej...@gmail.com>wrote: > Hello, > I am totally helpless. I am trying to use JQuery in my django > templates, but I always get in firebug this: $ not defined. > Check with Firebug if the jquery script has been successfully lo

Django with Jquery

2010-02-28 Thread Alexis Selves
Hello, I am totally helpless. I am trying to use JQuery in my django templates, but I always get in firebug this: $ not defined. In my template I am linking jquery : And then $(document).ready(function() { alert("Hello from jQuery"); }); But I always get nothing.. us

Re: Django and jQuery trouble

2009-02-10 Thread Antoni Aloy
2009/2/10 min : > > Hi, everyone. > > I have a question for the following example. > > Firstly, in the view.py: > > def test_1(request, zipcode, pro): > if zipcode == 'a' and pro == 'b': >city = 'c' > else: >city = '' > > return HttpResponse(city) > > def

Django and jQuery trouble

2009-02-09 Thread min
Hi, everyone. I have a question for the following example. Firstly, in the view.py: def test_1(request, zipcode, pro): if zipcode == 'a' and pro == 'b': city = 'c' else: city = '' return HttpResponse(city) def test_0(request): return render_to_response('test_0.html', {})

Re: Trouble with Django and jQuery

2009-02-06 Thread varikin
> > The external jQuery script doesn't go through Django, so obviously the > > template variables aren't parsed. As you have discovered, you can put > > javascript in the template so that it is parsed. So you already have > > the answer to your question: use a small script within your template,

Re: Trouble with Django and jQuery

2009-02-05 Thread min
Ok, I will try this way. Thank a lot! On Feb 5, 11:50 pm, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On Feb 5, 12:19 pm, min <inuyasha...@gmail.com> wrote: > > > > > > > Hi, everyone. > > > I'm learing Django now. Currently, I have a p

Re: Trouble with Django and jQuery

2009-02-05 Thread Daniel Roseman
On Feb 5, 12:19 pm, min <inuyasha...@gmail.com> wrote: > Hi, everyone. > > I'm learing Django now. Currently, I have a problem with Django and > jQuery. The detail is that: > > Firstly, I have a form in the forms.py: > > class TestForm(forms.Form): >     name

Trouble with Django and jQuery

2009-02-05 Thread min
Hi, everyone. I'm learing Django now. Currently, I have a problem with Django and jQuery. The detail is that: Firstly, I have a form in the forms.py: class TestForm(forms.Form): name = forms.CharField( max_length=30 ) Then, in the views.py: def Test_page(request): form = TestForm

Re: Django + newforms + jQuery

2007-07-14 Thread skam
On 12 Lug, 08:42, Przemek Gawronski <[EMAIL PROTECTED]> wrote: > Hi, any one willing to share some examples of django newforms with > jQuery? Few months ago I posted on djangosnippets.org a widget that uses the jquery autocomplete plugin written by Jörn Zaefferer, have a

Re: Django + newforms + jQuery

2007-07-14 Thread Gary Doades
Przemek Gawronski wrote: > > What I'm looking for now is, how to redirect to a different page with > the button, and sending to the page (django view) the id number. > > Przemek If you don't want to use ajax you can either use a form as normal to submit it and then issue a redirect at the

Re: Django + newforms + jQuery

2007-07-14 Thread Przemek Gawronski
> I'm assuming that you want to use some form a AJAX type request/response > for this? Well, once I'll feel comfortable with django and js, then probably, but not at the moment. > As an outline you might want to do something like this: > Display your list as a table > Use your workorder id

Re: Django + newforms + jQuery

2007-07-13 Thread Gary Doades
Przemek Gawronski wrote: > I want to show to the user a list of workorders with the possibility > to select one (probably I should use a radio button for that), above > the list are a couple of buttons that allow to display some extra > information for the selected workorder like a list of time

Re: Django + newforms + jQuery

2007-07-13 Thread Przemek Gawronski
> I have no idea what you're trying to do with your form, How about something like this: in my model I've got a class Workorder, with some info about it. For the Workorder there are time sheets, printouts and some other objects. I want to show to the user a list of workorders with the

Re: Django + newforms + jQuery

2007-07-12 Thread Przemek Gawronski
> This__ isn't interesting, but it *is* an example. :-) > .. __: http://groups.google.com/group/django-users/msg/c8f7d18eb79d9aa1 It's definitely a start, thanks! Przemek -- AIKIDO TANREN DOJO - Poland - Warsaw - Mokotow - Ursynow - Natolin info: http://www.tanren.pl/ phone: +4850151

Re: Django + newforms + jQuery

2007-07-12 Thread Nathaniel Whiteinge
> Well, in general, I'm pretty new to web development including javascript > (but with 7 years of python coding) so I just wanted to see what (and > how) people do newforms and jQuery to get the idea. This__ isn't interesting, but it *is* an example. :-) .. __:

Re: Django + newforms + jQuery

2007-07-12 Thread [EMAIL PROTECTED]
Well, jquery is just a framework for javascript, much like Django is a framework for python. So the real question is, what are you trying to do... validation? Hide and show elements? Send ajax requests back and forth? Without knowing what you're trying to do, I can't really help. On Jul 12, 2:28

Re: Django + newforms + jQuery

2007-07-12 Thread Przemek Gawronski
> I have no idea what you're trying to do with your form, but I've used > jquery and newforms together. Without knowing waht you're trying to > do, I can't give any specific advice or tips, but at the most basic > level, you just grab the element you want: $("#id_foo") and you're on > your way.

Re: Django + newforms + jQuery

2007-07-12 Thread [EMAIL PROTECTED]
I have no idea what you're trying to do with your form, but I've used jquery and newforms together. Without knowing waht you're trying to do, I can't give any specific advice or tips, but at the most basic level, you just grab the element you want: $("#id_foo") and you're on your way. On Jul

Re: Django + newforms + jQuery

2007-07-12 Thread Przemek Gawronski
> What do you mean? Perhaps you should go to the jQuery-EN group and > look for examples of form manipulation there. Thanks, I'll do that! Przemek -- AIKIDO TANREN DOJO - Poland - Warsaw - Mokotow - Ursynow - Natolin info: http://www.tanren.pl/ phone: +4850151 email: [EMAIL PROTECTED]

Re: Django + newforms + jQuery

2007-07-12 Thread Jökull
What do you mean? Perhaps you should go to the jQuery-EN group and look for examples of form manipulation there. J On Jul 12, 7:42 am, Przemek Gawronski <[EMAIL PROTECTED]> wrote: > Hi, any one willing to share some examples of django newforms with > jQuery? > > Thanks in ad

Django + newforms + jQuery

2007-07-12 Thread Przemek Gawronski
Hi, any one willing to share some examples of django newforms with jQuery? Thanks in advance! Przemek -- AIKIDO TANREN DOJO - Poland - Warsaw - Mokotow - Ursynow - Natolin info: http://www.tanren.pl/ phone: +4850151 email: [EMAIL PROTECTED

Re: Django and jQuery Autocomplete Routing Help

2007-03-08 Thread limodou
On 3/9/07, johnny <[EMAIL PROTECTED]> wrote: > > I am new to python and javaScript, I have created a funtion that > return the tags via ajax. I tried to replicate the php example. But > it's not working. I doesn't return any tags back to my html page via > ajax. I need some help. I am using

Re: Django and jQuery Autocomplete Routing Help

2007-03-08 Thread johnny
I am new to python and javaScript, I have created a funtion that return the tags via ajax. I tried to replicate the php example. But it's not working. I doesn't return any tags back to my html page via ajax. I need some help. I am using jQuery autocomplete plugin from here:

Re: Django and jQuery Autocomplete Routing Help

2007-03-05 Thread limodou
On 3/6/07, johnny <[EMAIL PROTECTED]> wrote: > > I am using jQuery to do the autocomplete. Autocomplete request > backend script like this: script_url?q=foo. But there is a problem > with django routing? > > (r'^tag/autocomplete/?q=(?P\w+)/$', > 'apps.tag.views.tag_autocomplete'), > > Here is

Django and jQuery Autocomplete Routing Help

2007-03-05 Thread johnny
I am using jQuery to do the autocomplete. Autocomplete request backend script like this: script_url?q=foo. But there is a problem with django routing? (r'^tag/autocomplete/?q=(?P\w+)/$', 'apps.tag.views.tag_autocomplete'), Here is my error: [05/Mar/2007 15:11:51] "GET /tag/autocomplete/?q=a