All Questions
Tagged with python javascript
18,384
questions
315
votes
19
answers
371k
views
How can I use the variables from "views.py" in JavasScript, "<script></script>" in a Django template?
When I render a page using the Django template renderer, I can pass in a dictionary variable containing various values to manipulate them in the page using {{ myVar }}.
Is there a way to access the ...
8
votes
11
answers
2k
views
Scripting in Java [closed]
Me and some friends are writing a MORPG in Java, and we would like to use a scripting language to, eg. to create quests.
We have non experience with scripting in Java. We have used Python, but we are ...
1
vote
5
answers
2k
views
Starting a new database driven python web application would you use a javascript widget framework? If so which framework?
I am starting a new web application project. I want to use python as I am using it at my bread-and-butter-job.
However I don't want to reinvent the wheel. Some things I have thought about:
AJAX ...
9
votes
10
answers
1k
views
How to ensure user submit only english text
I am building a project involving natural language processing, since the nlp module currently only deal with english text, so I have to make sure the user submitted content (not long, only several ...
1
vote
3
answers
3k
views
Issue With Python Sockets: How To Get Reliably POSTed data whatever the browser?
I wrote small Python+Ajax programs (listed at the end) with socket module to study the COMET concept of asynchronous communications.
The idea is to allow browsers to send messages real time each ...
20
votes
2
answers
36k
views
Python library for rendering HTML and javascript [closed]
Is there any python module for rendering a HTML page with javascript and get back a DOM object?
I want to parse a page which generates almost all of its content using javascript.
2
votes
3
answers
484
views
Adding New Element to Text Substring
Say I have the following string:
"I am the most foo h4ck3r ever!!"
I'm trying to write a makeSpecial(foo) function where the foo substring would be wrapped in a new span element, resulting in:
"I ...
11
votes
6
answers
6k
views
Re-ordering entries in a model using drag-and-drop
Say I have a blogging app in Django. How can i re-order the posts using a draggable table in the default admin?
It would be best if i didn't have to add any extra fields to the model, but if i really ...
26
votes
6
answers
16k
views
Javascript equivalent of Python's locals()?
In Python one can get a dictionary of all local and global variables in the current scope with the built-in functions locals() and globals(). Is there some equivalent way of doing this in Javascript? ...