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 ri
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".
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_func
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 scri
Specifically, this style is called an Immediately Invoked Function
Expression, or IIFE.
https://en.wikipedia.org/wiki/Immediately-invoked_function_expression
On Fri, Jun 10, 2016 at 3:36 AM, ludovic coues wrote:
> > (function($) {
> > 'use strict';
> >
> > })(django.jQuery);
>
> Th
> (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 version of JQuery shipp
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 :
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 s
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 an
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 me
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
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
> },
> function(data){
>
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 < data.length; i++){
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 test_0(request):
> return rend
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', {})
-
> > 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,
>
Ok, I will try this way.
Thank a lot!
On Feb 5, 11:50 pm, Daniel Roseman
wrote:
> On Feb 5, 12:19 pm, min wrote:
>
>
>
>
>
> > Hi, everyone.
>
> > I'm learing Django now. Currently, I have a problem with Django and
> > jQuery. The detail is that:
On Feb 5, 12:19 pm, min 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 = forms.CharField( max_lengt
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 = Tes
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 j
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:
http://just-tech.
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 m
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
22 matches
Mail list logo