Tagged Questions
0
votes
1answer
21 views
Django “static” files - Javascript
Minor terminology question: I see Django refers to images, CSS and Javascript scripts as "static" files (https://docs.djangoproject.com/en/dev/howto/static-files/). However, a Javascript script is not ...
0
votes
1answer
43 views
how can I transfer the javascript code to python code?
the javascript code is here:
var goat=6111+7380;
var hen=5548+7476^goat;
var seal=2094+4451^hen;
var rat=1687+7000^seal;
var pig=3997+8240^rat;
And I want get the goat, hen seal variable and so ...
0
votes
1answer
34 views
D3 Pre-Rendering
I'm still a beginner with JS + Python and I'd be really happy to get your help on one problem. What I basically need to to is to pre-render a d3js visualization of a network (as for example ...
0
votes
1answer
18 views
How can I save every Outlook Express Email as an html without clicking “Save As” for every email [on hold]
I am trying to save a whole slew of emails as html in Outlook Express, but the program only lets me save them individually. If I click "Save As" on more than one email Outlook only lets me save them ...
-1
votes
0answers
17 views
Connecting client to websocket chat
I've designed a websocket chat using python, javascript and html. I've also created a register and login page which functions efficiently. The only confusion I have is connecting the login to the ...
1
vote
2answers
28 views
AJAX not resolving url correctly
I have an HTML form that I want to submit to a flask endpoint, /add_int. When the form is submitted I intercept it with Jquery and submit the form to the endpoint using AJAX as follows:
var form = $( ...
0
votes
2answers
53 views
How can I retrieve a JavaScript variable using Python? [on hold]
I'm trying to retrieve a Javascript variable using Python and I'm having some issues...
Here is what the variable looks like :
<script type="text/javascript">
var exampleVar = [
{...},
...
0
votes
1answer
24 views
“method not allowed” in a python function for flask
I want to save on a .ttl file a type 'person' resource from a javascript function:
this is my sparql query:
@app.route('/registraAnnotatore/<author>+<mail>', methods=['POST'])
def ...
0
votes
1answer
18 views
Python Error When Accessing JSON Data From AngularJS POST
I am trying to send data to a python script via POST but unable to read it. The UI is in AngularJS. I have seen similar questions but they are either not using AngularJS or not using POST.
The ...
0
votes
0answers
12 views
Javascript bookmarklet button on python application
I have this code creating a simple browser using pywebkitgtk
#!/usr/bin/python
import sys, re
import gtk, gobject
import webkit
DEFAULT_URL = 'http://www.facebook.com' # Change this as you Wish
class ...
0
votes
0answers
15 views
Can a key logger in python be set to record only a browser window (firefox)
I assembled the key logger from this video:
http://www.youtube.com/watch?v=kUQz87TMHZM
It works great, but is too good. I need to limit its functionality to only recording entries in a Firefox, ...
0
votes
1answer
29 views
how to create highcharts formatted json structure with python
I am trying to create some json that will render a highchart graph with python/django.
here is what my view looks like so far:
class LineHighChart(object):
title = {}
def weight_graph(request):
...
0
votes
0answers
11 views
Direction to create script to launch, close, relaunch (or perhaps refresh) browser
My question probably entails something a bit involved, but lets see.
I created a js metric script that does a few things, one of them being "page load time". I need a way to be able to have ...
0
votes
0answers
16 views
Passing Object in the url to call the web API in Python
I want to call a web api , where the url contains a json object also.
I am able to create the json object. But urllib.request.urlopen(url) is throwing a bad request exception.
The web api is as ...
-1
votes
0answers
12 views
Couldn't stay connect to a a socket connection.
I try to use websocket to send a file with the HTML5 tag input file.
On the loadind page, I am connecting to the server (flask-Socket framework on python) (Ready State0). But I have always a ready ...
-2
votes
0answers
19 views
Connect to vpn using python [on hold]
I'm trying to connect to my university's webpage. For that I need to enter my username and password and from there select a couple of thing from the menu that will take me to an external website that ...
-1
votes
0answers
35 views
How can we use Python, Javascript and MySQL on a website
My goal is to use the following:
MySQL (database)
Python (Connection to database and outputs information that will be taken from Javascript)
Javascript (Frontend to display information)
I tried ...
0
votes
1answer
32 views
How to store a JQuery submitted variable and reuse it at a later stage in a Python/Django project?
I have developed an application using Python2.7 and Django 1.6 which uses the below slider bar to allow a user to rate various images using a multi page SessionWizardView form. The user rating is ...
0
votes
1answer
25 views
Bidirectional HTML to Markdown/reStructuredText conversion tool in Python or Javascript [on hold]
I have an command line app that stores notes in plain text. I use Markdown (but reStructuredText would be fine as well) as a way to have nicely presented notes but still plain text. I would like to ...
1
vote
1answer
27 views
Parsing through the HTML and scripts on a webpage using python?
I'm currently using Beautiful Soup to parse through the HTML of a webpage. However, I would also like to recursively parse through any .js files on the webpage as well. My goal is to look for certain ...
-1
votes
1answer
30 views
Javascript equivalent of Python's repr? [on hold]
In python there is repr().
Is there anything like it in JavaScript?
0
votes
0answers
25 views
Javascript (jQuery) Client is not working with python webservice
I'm trying to build a small restful web service with python. Therefore I used flask (and now bottle).
For testing purposes I wrote a small android application and everything works just fine. I can ...
0
votes
1answer
25 views
Python Django: Pass json from view to javascript in template
I am new to django.
From my findings, I tried this way, but didn't work.
<script type="text/javascript" >
var data = {{json}}
</script>
I am trying to use data table from this ...
0
votes
1answer
25 views
Redirect after AJAX GET request in Django
I am new with Django and AJAX (javascript).
Finally I can send some arguments to a django view. This view render an edit form.
I send the parameters and the view response the form with the info that I ...
0
votes
0answers
27 views
Compress string in javascript and uncompress in python [closed]
I have to send a string to from a chrome extension javascript application to a python server but the string(it is a stringified json object) at this point is too large and should be compressed and ...
0
votes
0answers
29 views
Need a very simple GAE Channel API example [closed]
How do I trigger a JavaScript function on the client from a server script using GAE Channel API?
I have read through the following docs however I am not too familiar with Java or Python and found ...
0
votes
1answer
21 views
Caching somewhere preventing updated templates in Django 1.6
Apologies for the poor title. I have a template errror when running a Django 1.6 server and accessing a particular set of templates. I've removed
TemplateSyntaxError at /url_name
Could not ...
1
vote
2answers
22 views
Javascript not rendering correctly in Flask jinja2 templates
I'm writing a Flask app using jinja2, and I'm trying to pass my Python variables both into some Javascript and HTML. I made Javascript and HTML templates, but for some reason the Javascript is getting ...
0
votes
0answers
29 views
How to keep track of user once he/she logs in (Flask)
I created two simple views on my website. In the first one the user logs in and I set the session to 'logged_in':
@app.route('/', methods=['GET', 'POST'])
def login():
error = None
if ...
1
vote
1answer
14 views
Unable to retrieve an Array of objects posted to Django from jQuery
My Javascript:
var postData = {
customer: 'test',
order: 1,
boxes: [
{
"size":"2",
"color":"1",
"colorNumber":"1",
...
0
votes
2answers
58 views
Rock, Paper, Scissors, Lizard, Spock in javascript as (Python Coursera course) [closed]
I took the python course in coursera of Rice Academy. There was a rpsls exercise and I passed it. Now I want to do the same program, but in javascript. I already copied the functions in javascript ...
0
votes
0answers
45 views
Pass arguments to a django template using AJAX
I am new with Django and JavaScript and I am struggling trying to pass some values from a html table rendered with django-tables2
I want to open a django template passing 3 arguments.
I have an html ...
0
votes
1answer
11 views
django-angular, display servor-side error
I'm using django-angular to perform basic CRUD operations on a single page application. I have a bunch of form I need to integrate in that page.
I use the following mixin:
from djangular.forms ...
0
votes
0answers
23 views
can't connect Brython with database sqlite3 [closed]
here is my code:
import re
from browser import document as doc
from browser import alert, window
def validate():
if not doc['name'].value:
alert('Veuillez saisir le nom')
...
0
votes
2answers
28 views
How to extract hidden tags created by javascript from source page by python
I have THIST page that has some javascript in it. You can see them by clicking on show details.
So how can I extract these data from that url source?
Using re? What I tried in re is:
import ...
0
votes
1answer
36 views
Want to create a new application for website traffic monitoring ( analysis ) [closed]
I want to create my own application for monitoring traffic of my website without using any third party tools like google analytics. In which I want to log screenshots, user details, page details and ...
0
votes
1answer
21 views
get multiple variables from form with websockets in python
Just starting to learn websockets and python. for now I am using Socket-IO and have the very basic 'pull from form and echo it back out' but I need to be able to pull in 2+ variables from the form ...
-2
votes
1answer
33 views
Django returned JSON, how to parse JSON Objects in js
I am returning from my django code JSON and it looks like this:
my django code:
objs = AccessInfo.objects.filter(~Q(weblink=''))
return HttpResponse(serializers.serialize('json', objs), ...
0
votes
1answer
18 views
How to post a form to django site, securely and from another site
I have a django app which need to receive post requests from another site using html+javascript.
For example i have mydjangosite.com and smallhtmlsite.com
What i want is : user visit ...
0
votes
0answers
58 views
how to return a serialized array?
please help to solve the problem.
I do Ajax request. in the form transmitted phrase "qqq". in the form of a request is made to the model function and returns a set of objects. This set of objects is ...
0
votes
1answer
26 views
Get Django form in html from Ajax
I have a django page with a fullcalendar in it. My usecase is that I want to be able to click on an event, that will open a pop up with to edit it (the event being a Django model). I think I cannot ...
0
votes
1answer
28 views
Calling javascript from html button
A quick summary of what I am trying to do. I am trying to make a webpage that receives a list from my python server using flask. It then adds each element of the list with a checkbox form. After that ...
-1
votes
0answers
27 views
passing arguments to django template from javascript function
I have an HTML table rendered with django-tables2, in the first column i have a drop down button with several options
I want to pass some value of the HTML table as parameters to a form in another ...
0
votes
1answer
24 views
Python3 executing Javascript
I need to execute a Javascript function from Python 3 (pass a few variables into it's environment and collect the result). I found pyv8 and python-spidermonkey, but neither supports Python 3.
Is ...
1
vote
0answers
14 views
Debugging JavaScript with Flask and PyCharm
I just installed the professional version of PyCharm for its Flask features, but I'm having a lot of issues getting anything JavaScript related working.
Firstly, is there any way of getting the ...
0
votes
0answers
16 views
Converting vimeo video to other formats using ffmpeg
I want to convert a vimeo video from the given url
http://pdl.vimeocdn.com/13322/588/290087783.mp4?token2=1411704845_d736c3912f639f9ce58fd4930053a86b&aksessionid=9fb9de7e32f5337c
Usually when i ...
1
vote
2answers
38 views
The equivalent of jquery $.when in Python Tornado
In jQuery $.when(promise1, promise2...) is used as a master promise to represent the overall status of its children promises. We can then attach .done(callback) to the $.when promise so that when ALL ...
0
votes
1answer
23 views
python's mechanize and forms: javascript string returned
I am trying to access http://forum.kriminala.net via Mechanize and parse my inbox messages.
From the html code, I can see that the login form is in the nested iframe of the main page:
<iframe ...
0
votes
0answers
11 views
Pass form to Javascript function Jinja2(Python) [duplicate]
I have a simple template in Jinja2:
form.html
{{ render(form.description) }} # rendering the form works
<input type="button" value="Preview" class="formButton" ...
0
votes
1answer
36 views
How should I structure a Meteor project with external scripts?
I'm curious if anyone has developed a best practice for organizing Meteor applications that contain external shell scripts, or other back-end processes that happen outside of the node.js server code ...