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
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
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
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
:)
--
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
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
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
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
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
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
10 matches
Mail list logo