Re: Parse a javascript file having django template variables

2011-11-25 Thread IanKRolfe
Or you can render the js file as if it was a template. Put the javascript in a template directory. In the main HTML, change the tag to something like

Re: Parse a javascript file having django template variables

2011-11-25 Thread Alessandro Candini
On 11/25/2011 03:06 PM, Tom Evans wrote: On Fri, Nov 25, 2011 at 11:25 AM, Alessandro Candini wrote: Hi everybody. I have an application with the following structure: STO ├── __init__.py ├── jsonopenlayers │ ├── __init__.py │ ├── models.py │ ├── static │ │ ├── css │ │ │ └── STO.css │ │ └── js

Re: Parse a javascript file having django template variables

2011-11-25 Thread Tom Evans
On Fri, Nov 25, 2011 at 11:25 AM, Alessandro Candini wrote: > Hi everybody. > > I have an application with the following structure: > > STO > ├── __init__.py > ├── jsonopenlayers > │ ├── __init__.py > │ ├── models.py > │ ├── static > │ │ ├── css > │ │ │ └── STO.css > │ │ └── js > │ │ └── renderMap

Parse a javascript file having django template variables

2011-11-25 Thread Alessandro Candini
Hi everybody. I have an application with the following structure: STO ├── __init__.py ├── jsonopenlayers │ ├── __init__.py │ ├── models.py │ ├── static │ │ ├── css │ │ │ └── STO.css │ │ └── js │ │ └── renderMaps.js │ ├── tests.py │ └── views.py ├── manage.py ├── settings.py ├── templates │ └── j

Re: django template variables

2010-07-11 Thread Syed Ali Saim
:) -- 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 a

Re: django template variables

2010-07-10 Thread commonzenpython
alright, thanks a lot Syed :P -- 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

Re: django template variables

2010-07-10 Thread Syed Ali Saim
dude I missed 1 important import. first add this, - from django.template import RequestContext also makesure your template path is set in settings.py mine looks something like this TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templa

Re: django template variables

2010-07-10 Thread commonzenpython
thanks, unfortunately i keep getting a 404, the templates name is 2col.html, its inside ash/templates, the url i have is (r'^paragraph/ $', 'show_para'), and the views is from django.http import HttpResponse from django.shortcuts import render_to_response def show_para(request): para = "I lo

Re: django template variables

2010-07-10 Thread Syed Ali Saim
you can use django render_to_response which by far the most common and preferred way, i found as newbie my self. here is an example: (roughly but will give you an idea) --- Now following this is an extremly crude tut by myself, for a superb one

django template variables

2010-07-10 Thread commonzenpython
hey guys, im trying to create a template that uses variables like {{ paragraph }} , but i cannot find how to get django to render the paragraph into the variable, i know i have to create a .py file that uses django's render class to render the paragraph but how can i connect the html file to the .p