For reference:
http://google-ctemplate.googlecode.com/svn/trunk/doc/auto_escape.html
--~--~-~--~~~---~--~~
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
Hellos,
I was wondering if there is a filter that can remove these '\' that
python added when strings are appended to a list or dictionary. I
cannot use cut because I still need one of the '\'
ex. C:\\moo
Code:
arrPlaces = []
intPoint =0
while (len(testline)):
testline = fileName.re
However, when I send the list over as a dictionary for HTML:
d["places"] = arrPlaces
return render_to_response('rentSearch.html', d)
the HTML using Django has:
{{ places }} but returns ['C:\\moo', 'C:\\supermoo']
--~--~-~--~~~---~--~~
You received this message
I want to access the string from the list that is in the dictionary:
function changeArea()
{
alert({{list_areas.British_Columbia}});
}
I get what I want in the generated HTML:
function changeArea()
{
alert(['Metro Vancouver', 'Metro Vancouver A', 'Sunshine Coast']);
}
Howev
I tried that before, but it only seems to work when it is used on
the .html file.
onchange="changeArea('{{ list_areas.BC|safe|escapejs}}')
I need it to be onchange="changeArea('{{ list_areas|safe|escapejs}}')
so the function can use list_areas (My javascript and html are on
separate files).
On
I sent the variable as dictionary with lists
{'BC:['Vancouver', 'Kamloops'], AB:['Calgary']}
However, when I use the variable in the function, it is treated as a
string.
function changeArea(mooman)
{
alert(selectedAreas["BC"]);
}
This was not defined. Is there something more I need to
Thanks,
It worked, but out of curiosity, what do the additional quotes change
(why are they needed)?
--~--~-~--~~~---~--~~
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
No, I placed the spaces in so it is more readable (I tested with
spaces afterwards and they still do not work). The function is passed
in by:
I am not sure; I am just trying to pass the variable from the
dictionary using render_to_response to a javascript function. The
function is stored as a .js file. This is a part of the code I am
using it for:
{{ selectCity|safe }}
The {{ selectCity|safe }} works but the {{ mooman | safe | es
Hellos,
I was wondering how to use {{ }} variables in javascript functions.
ex. onchange = "changeArea({{ mooman |safe|escapejs}});"
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To p
Well then I will have to try a different approach. When using
render_to_response('webpage.html', d), I have d as a dictionary. I
was wondering if you send a whole text file as a part of the
dictionary.
For example:
fileView = open('C://path//main_cities.txt', 'r+')
d['main_cities'] = fileView
Hellos,
I was wondering if I can use Django caching system to store .txt
or .img files on the client side (as temp file). I want to use
javascript to use them later so it would not require to transfer files
from the server again. The txt files are just list so there is
nothing about security, b
Never mind... I figured it out. Because the location is at "/", I
would not need the "PythonOption django.root / " part.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
I think I found my problem. I thought that the httpd.exe is the
application running in the Vista's control panel, but it was just the
"ApacheMonitor.exe" not "httpd.exe".
However, while my project worked in development, it is giving me
TypeError.
--~--~-~--~~~---~--~-
I am using Apache and mod_python with the some of the changes
suggested in http://docs.djangoproject.com/en/dev/howto/deployment/modpython/
as shown in the fourth posting. I can start Apache Service Control
and the Test Configuration does not show any errors; however when my
ip address or my doma
@ Kenneth: If I do not use runserver, what command should I use to
run the python scripts for production servers?
@ BoĊĦtjan: I am not sure if I even setup a connection between them.
In httpd.conf, I only added:
ServerName www.domainname.ca
SetHandler python-program
PythonHandl
Hellos,
When running a production server, I was wondering if I still use
"python manage.py runserver [ip]:[port]" because the cmd says it is
running a development server.
Also, do I use the my LAN IP or Internet IP with which port (is it the
same one Apache listens to)?
Thanks
--~--~-~
17 matches
Mail list logo