Custom Django tag & jQuery

Posted by pocoa on Stack Overflow See other posts from Stack Overflow or by pocoa
Published on 2010-06-13T15:32:58Z Indexed on 2010/06/13 15:42 UTC
Read the original article Hit count: 244

Filed under:
|
|
|

I'm new to Django. Today I created some Django custom tags which is not that hard. But now I wonder what is the best way to include some jQuery or some Javascript code packed into my custom tag definition. What is the regular way to include a custom library into my code? For example:

{% faceboxify item %}

So assume that it'll create a specific HTML output for Facebox plugin. I just want to learn some elegant way to import this plugin into my code. I want the above definition to be enough for all functionality. Is there any way to do it? I couldn't find any example. Maybe I'm missing something..

Thank you.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about python