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 right now your file is being run through the Django templating 
engine, but a stand-alone js file wouldn’t be. What I usually do is put a data 
attribute on a convenient element and then get it in the way that Stephen 
suggests below.

So I would have  in my html, and then in my 
javascript, something like this:

$(".upvote").click( function () {
let answerid = $(this).data("answer-id");
console.log(answerid);
$.post($(this).data(“url’), {answer_id:answerid});
});


Good luck, hope this helps!
Melinda

> On May 31, 2020, at 1:26 PM, Stephen J. Butler  
> wrote:
> 
> 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_functions
>  
> 
> 
> To get "this" inside your event handler you need to use "function () { 
> code... }".
> 
> $(".upvote").click( function () {
> let answerid = $(this).attr("answer-id");
> console.log(answerid);
> $.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").
> 
> On Sun, May 31, 2020 at 2:19 PM Jan Gregorczyk  > wrote:
> 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: http://answer.id/>}}">
> I also want to know if using template tags in javascript scripts like here 
> $.post("{% url 'upvote' %}", {answer_id:answerid}) is a good idea.
> 
> 
> {% extends 'base.html' %}
> {% block title %}{{question.title|truncatechars:52}}{% endblock %}
> {% block content %}
> {{question.title}}
> {{question.content}}
> {% for answer in question.answers.all %}
> {{answer.author}}
> {{answer.content}}
> 
> http://answer.id/>}}">
> {{answer.votes.count}}
> http://answer.id/>}}">
> 
> {% endfor %}
> http://question.id/> 
> %}">
> {% csrf_token %}
> {{form.as_p}}
> 
> 
> {% endblock %}
> {% block javascript %}
> {% load static %}
>  src="https://cdn.jsdelivr.net/npm/js-cookie@rc/dist/js.cookie.min.js 
> <https://cdn.jsdelivr.net/npm/js-cookie@rc/dist/js.cookie.min.js>">
> 
> //upvote and downvote script
> var csrftoken = window.Cookies.get('csrftoken');
> function csrfSafeMethod(method) {
> // these HTTP methods do not require CSRF protection
> return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
> }
> $.ajaxSetup({
> beforeSend: function(xhr, settings) {
> if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
> xhr.setRequestHeader("X-CSRFToken", csrftoken);
> }
> }
> });
> $(".upvote").click( () => {
> let answerid = $(this).attr("answer-id");
> console.log(answerid);
> $.post("{% url 'upvote' %}", {answer_id:answerid});
> });
> 
> {% endblock %}
> 
> -- 
> 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-users+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/aa129ea5-dd3d-402f-a297-796b408e8217%40googlegroups.com
>  
> .
> 
> -- 
> 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-users+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> 

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".
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions

To get "this" inside your event handler you need to use "function () {
code... }".

$(".upvote").click( function () {
let answerid = $(this).attr("answer-id");
console.log(answerid);
$.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").

On Sun, May 31, 2020 at 2:19 PM Jan Gregorczyk 
wrote:

> 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 scripts like here
> $.post("{% url 'upvote' %}", {answer_id:answerid}) is a good idea.
>
>
> {% extends 'base.html' %}
> {% block title %}{{question.title|truncatechars:52}}{% endblock %}
> {% block content %}
> {{question.title}}
> {{question.content}}
> {% for answer in question.answers.all %}
> {{answer.author}}
> {{answer.content}}
> 
> 
> {{answer.votes.count}}
> 
> 
> {% endfor %}
> 
> {% csrf_token %}
> {{form.as_p}}
> 
> 
> {% endblock %}
> {% block javascript %}
> {% load static %}
> https://cdn.jsdelivr.net/npm/js-cookie@rc/dist/js.cookie.min.js";>
> 
> //upvote and downvote script
> var csrftoken = window.Cookies.get('csrftoken');
> function csrfSafeMethod(method) {
> // these HTTP methods do not require CSRF protection
> return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
> }
> $.ajaxSetup({
> beforeSend: function(xhr, settings) {
> if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
> xhr.setRequestHeader("X-CSRFToken", csrftoken);
> }
> }
> });
> $(".upvote").click( () => {
> let answerid = $(this).attr("answer-id");
> console.log(answerid);
> $.post("{% url 'upvote' %}", {answer_id:answerid});
> });
> 
> {% endblock %}
>
> --
> 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-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/aa129ea5-dd3d-402f-a297-796b408e8217%40googlegroups.com
> 
> .
>

-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAD4ANxVDepam-GZ_nOBKoD9fff7aPE9ic5Et-VxJvw85vqEQrQ%40mail.gmail.com.


Re: Ajax in Django

2015-09-19 Thread Martin Torre Castro
If you use jQuery (I do), making AJAX requests is incredibly easy. Just use 
the $.get(), $.post() or $.ajax() functions.

If you have any doubt, the api.jquery.com page has all the references and 
information for using them (search for jQuery.get(), jQuery.post() and 
jQuery.ajax() ).

On Monday, 31 August 2015 16:04:45 UTC+2, Dheerendra Rathor wrote:
>
> Ajax are just normal HTTP requests. You can write a view in your code 
> which returns data from db. If it is a post requests then make sure you're 
> adding "csrfmiddlewaretoken" in the ajax data. 
>
> On Mon, 31 Aug 2015 at 19:30 jasir1903  
> wrote:
>
>> How to retrive Data from Db in Django to Template using Ajax? I am new to 
>> Django i need to retrive the data WITHOUT PAGE REFRESH USING AJAX please 
>> help me with that..
>>
>> -- 
>> 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-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/c4c35ccb-ed72-4850-87f5-730310f37883%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d7e1339c-1b5f-41c6-b809-5c0296e84ddf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Ajax in Django

2015-08-31 Thread Dheerendra Rathor
Ajax are just normal HTTP requests. You can write a view in your code which
returns data from db. If it is a post requests then make sure you're adding
"csrfmiddlewaretoken" in the ajax data.

On Mon, 31 Aug 2015 at 19:30 jasir1903  wrote:

> How to retrive Data from Db in Django to Template using Ajax? I am new to
> Django i need to retrive the data WITHOUT PAGE REFRESH USING AJAX please
> help me with that..
>
> --
> 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-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c4c35ccb-ed72-4850-87f5-730310f37883%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAByqUgj_w8cf54ONATFEtAXcg4m2Qa_WgFSAYXBwnR9%2B5PCSJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: ajax and django

2013-07-26 Thread Lucas Magnum
https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax

[]'s

Lucas Magnum.


2013/7/26 Lucas Magnum 

> Are you passing crsf_token in ajax post?
>
> []'s
>
> Lucas Magnum.
>
>
> 2013/7/26 heni yemun 
>
>> Hi,
>> I'm trying to get a django project interact with ajax based site. The
>> problem is that when i use the send function to send a POST data
>> asynchronously the django app returns a 500 code and the server doesn't do
>> anything. How do i correct this?
>>
>> --
>> 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-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ajax and django

2013-07-26 Thread Lucas Magnum
Are you passing crsf_token in ajax post?

[]'s

Lucas Magnum.


2013/7/26 heni yemun 

> Hi,
> I'm trying to get a django project interact with ajax based site. The
> problem is that when i use the send function to send a POST data
> asynchronously the django app returns a 500 code and the server doesn't do
> anything. How do i correct this?
>
> --
> 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-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ajax and django

2010-11-22 Thread Reinout van Rees

On 11/22/2010 11:48 PM, owidjaya wrote:

What is the best way to go about handling ajax request per
application?

I currently have a middleware that implements "process_request"
function.
the function acts as a relay to call "serve_ajax(request)" function
that is implemented in the application class that wants to respond to
ajax request. The application object that will respond to the ajax
request is indicated by a GET variable "object". while every other
variables to be passed to the application is passed with POST
variable.


Having one process_request function is not best practice.  It is better 
to design good URLs for your application.  Instead of:


http://example.com/do_something?object=library_book12=loan

something like a POST to the following URL is better:

http://example.com/library/book12/loan


So: allow django to do its job of "URL dispatching".  This frees your 
method to just do their actual job instead of also having to figure out 
on which object to do their work.



Reinout


--
Reinout van Rees - rein...@vanrees.org - http://reinout.vanrees.org
Collega's gezocht!
Django/python vacature in Utrecht: http://tinyurl.com/35v34f9

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: ajax and django

2010-11-22 Thread owidjaya
correction it's "process_response" function not process_request.

On Nov 22, 2:48 pm, owidjaya  wrote:
> What is the best way to go about handling ajax request per
> application?
>
> I currently have a middleware that implements "process_request"
> function.
> the function acts as a relay to call "serve_ajax(request)" function
> that is implemented in the application class that wants to respond to
> ajax request. The application object that will respond to the ajax
> request is indicated by a GET variable "object". while every other
> variables to be passed to the application is passed with POST
> variable.
>
> please comments on the method above.
> Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Ajax with Django

2010-02-05 Thread chefsmart
http://lethain.com/entry/2007/dec/01/using-jquery-django-autocomplete-fields/

On Feb 5, 2:19 am, Rohan Shah  wrote:
> Any good documentation available on how to implement AJAX with Django ?
>
> --
> Thanks and Regards,
> Rohan Shah
>
> ++[>>++>+++>+-]>++. >+++.---. 
> ---.. >++. <<+. >--.
>
> ---.+++.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Ajax with Django

2010-02-04 Thread Prashanth
On Fri, Feb 5, 2010 at 2:49 AM, Rohan Shah  wrote:
> Any good documentation available on how to implement AJAX with Django ?
>

http://www.b-list.org/weblog/2006/jul/31/django-tips-simple-ajax-example-part-1/


-- 
regards,
Prashanth
twitter: munichlinux
blog: prashanthblog.appspot.com
irc: munichlinux, JSLint, munichpython.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Ajax with Django

2010-02-04 Thread Jonathan Orlando
http://code.google.com/p/dojango/

What is dojango

Dojango is a reusable django application that helps you to use the
client-side framework dojo within your django project.

   - It provides capabilites to easily switch between several dojo versions
   and sources (e.g. aol, google, local)
   - Delivers helping utilities, that makes the development of rich internet
   applications in combination with dojo more comfortable.
   - It makes the building of your own packed dojo release easier.

Another goal of this project is, that you can learn how you have to
structure your html to use dojo within your projects.


_
@jonathanorlando
Linux user # 458151
Geek Emprendedor !!
Cucuta / Norte de Santander / Colombia


2010/2/4 Rohan Shah 

> Any good documentation available on how to implement AJAX with Django ?
>
> --
> Thanks and Regards,
> Rohan Shah
>
>
> ++[>>++>+++>+-]
> >++. >+++.---. ---.. >++. <<+. >--.
> ---.+++.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Ajax with Django

2010-02-04 Thread Gonzalo Delgado
El 04/02/10 18:19, Rohan Shah escribió:
> Any good documentation available on how to implement AJAX with Django ? 
http://lmgtfy.com/?q=django+ajax=1

-- 
Gonzalo Delgado 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Ajax in Django

2009-08-12 Thread Jorge Bastida
I' currently working in/with Dajax.
http://code.google.com/p/dajaxproject/

I hope it helps you.

-- 
neo2001[at]gmail.com
jorge[at]thecodefarm.com
neo[at]art-xtreme.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Ajax in Django

2009-08-12 Thread Malcolm Tredinnick

On Wed, 2009-08-12 at 11:47 +0300, Jani Tiainen wrote:
> HB kirjoitti:
> > Hey,
> > Why Django doesn't provide integration with Ajax out of the box (like
> > Rails and Wicket)?
> 
> It all depends what you mean by "integration"?
> 
> You can use (model)forms with Ajax, or use any other means if you wish.
> 
> Only thing that django doesn't provide is Ajax form rendering - I mean 
> that you can't just say {{ form }} and magically get ajaxafied form.

I'll reply here, rather than against the original post, since you're hit
the nail on the head, but I want to expand somewhat...

We have always encouraged people to come up with a good set of template
tags to do this sort of stuff. Right now, there doesn't appear to be
anything that looks very Django-like. If you look at the Ajax helpers in
Rails, for example, it's like writing Ruby in the templates. Since
Django deliberately strives to have very simple templates, without
programming in the templates, the challenge is greater for "generic"
template tags.

This doesn't mean it's harder to use Ajax, it just means that people are
more likely to write custom template tags that insert the precise Ajax
bits they're after. Including Ajax or other Javascript bits in Django
templates isn't hard and writing custom tags is very easy, so it seems
that the middle ground we've arrived at is reasonably acceptable to our
core audience (experienced Python developers and web designers).

It also doesn't mean that people shouldn't continue to try and create
the perfect set of Ajax tags. When that happens, it will attract
attention, fame, fortune, etc, and after suitable shaking out, we would
look at whether it's worthwhile including in contrib. But in the 4+
years that Django has been open sourced, nobody has yet done that, which
shows where the balance between need and pragmatism lies.

> And there is good reason - what would be javascript framework to use 
> then? MooTools? jQuery? Prototype? ExtJS? Or my favourite Dojotoolkit (I 
> bet there is dozen of others that I don't remember or are aware of)

That is also definitely a consideration.

Along those lines, there are some library specific helpers that have
been created. Search for dojango, for example, a set of Dojo-based
Django template tags. I'm not sure if they're particularly good or not,
as I haven't used them much at all, but they exist, which is definitely
a good thing. There's also YUI-based incremental loading via Django
template tags out there, too, which was even featured on the YUI
developers blog (as an example of YUI-in-action) at one point.

Regards,
Malcolm


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Ajax in Django

2009-08-12 Thread Jani Tiainen

HB kirjoitti:
> Hey,
> Why Django doesn't provide integration with Ajax out of the box (like
> Rails and Wicket)?

It all depends what you mean by "integration"?

You can use (model)forms with Ajax, or use any other means if you wish.

Only thing that django doesn't provide is Ajax form rendering - I mean 
that you can't just say {{ form }} and magically get ajaxafied form.

And there is good reason - what would be javascript framework to use 
then? MooTools? jQuery? Prototype? ExtJS? Or my favourite Dojotoolkit (I 
bet there is dozen of others that I don't remember or are aware of)

-- 
Jani Tiainen

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Ajax in Django

2008-07-08 Thread Matthias Kestenholz

On Mon, 2008-07-07 at 21:50 -0700, bharathi wrote:
> I am creating one Django application with jquery..
> In that Jquery function am using One Ajax script.. Django code  cant
> taken that ajax code...
> 
> My code is:
> 
> $(document).ready(
>   function () {
>   $("#sortme").Sortable(
>   {
>   accept : 'sortitem',
>   onchange : function (sorted) {
>   serial = $.SortSerialize('sortme');
> 
>   $.ajax({
> url: "/sortdata",

You should probably add a trailing slash here: "/sortdata/" instead of
"/sortdata". Django will redirect the browser to /sortdata/ by default
(see APPEND_SLASH) and your POST data will be lost.

> type: "POST",
> data: serial.hash,
> // complete: function(){},
>success: function(feedback){ 
> $('#data').html(feedback); }
> // error: function(){}
> 
>   });
> 
>   }
>   }
>   )
> 
> 
> 
>   }
> 
> 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Ajax in Django

2008-07-08 Thread Kenneth Gonsalves


On 08-Jul-08, at 10:20 AM, bharathi wrote:

> I am creating one Django application with jquery..
> In that Jquery function am using One Ajax script.. Django code  cant
> taken that ajax code...

this code must be put in the HEAD section of the html - so create a  
block 'head' in the head section of base html and put the code there  
in the derived template

-- 

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/code/




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Ajax and Django example application

2006-08-04 Thread Darryl Caldwell
That is awesome. Thanks for putting this together.-dOn 8/3/06, Istvan Albert <[EMAIL PROTECTED]
> wrote:Hello All,For those interested here is an AJAX based demo application using
django, developed with two different _javascript_ libraries: Prototypeand with MochiKithttp://www.personal.psu.edu/iua1/ajax-django-sandbox.htm
cheers,Istvan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django users" group.  To post to this group, send email to django-users@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/django-users  -~--~~~~--~~--~--~---


Re: Ajax and Django example application

2006-08-04 Thread Corey Oordt

Istvan,

Thanks for the code. I can't wait to dive into it.

Corey

On Aug 4, 2006, at 12:12 AM, Istvan Albert wrote:

>
> Hello All,
>
> For those interested here is an AJAX based demo application using
> django, developed with two different javascript libraries: Prototype
> and with MochiKit
>
> http://www.personal.psu.edu/iua1/ajax-django-sandbox.htm
>
> cheers,
>
> Istvan
>
>
> >


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---