Tagged Questions
0
votes
2answers
33 views
Pass an argument from javascript to a python script
I have a python script from which I pass an argument to execute a query in an Oracle Database
prov.py
#!/usr/local/bin/python2.7
import sys
import argparse
import cx_Oracle
import json
import cgi
...
-5
votes
0answers
42 views
Coding in Java and JavaScript [on hold]
So what I want to do is not totally necessary, but I would at least want a proof of concept. I want to know how would one go about making a program in multiple languages, primarily Java and ...
0
votes
1answer
35 views
Twitter Photo Card Pulling
I'm trying to make a Twitter Photo Card which uses HTML meta Tags.
The first problem is, the tag looks something like this
<meta property="twitter:image" id="photo" ...
30
votes
9answers
32k views
Best way to integrate Python and JavaScript?
Is it possible to integrate Python and JavaScript? For example, imagine you wanted to be able to define classes in JavaScript and use them from Python (or vice versa). If so, what's the best way? ...
-2
votes
0answers
47 views
Is it possible to scrape data from javascript [on hold]
I want to build a scraper that allows me to retrieve data rendered with javascript. Look at this page for example
...
0
votes
1answer
17 views
How to convert python timestamp to javascript YYY-MM-DDTHH:MM:SS.302325
How can I convert a python timestamp with javacript
from 2014-07-28T20:45:04.271935
to 1.6.2014 (20:45)
I tried to use the builtin parse function from javascript, but it seems to mix up things..
...
0
votes
0answers
10 views
Display mpld3 chart in HTML with django
I'm using mpld3 to display matplotlib charts inside an HTML page via django. I use mpld3.fig_to_dict method to produce a string from a matplotlib figure and save it in a JSON variable .
I don't know ...
-3
votes
0answers
20 views
Python/Javascript live streaming application [on hold]
I recently came accross a few articles that made suggestions for frameworks/api's i could use to try to build an application almost identical to Twitch.tv that im doin for a side project.
The most ...
2
votes
1answer
32 views
Django vote button with ajax
I have this url:
(r'^oyla/(\d+)/$', oyla),
I have this view:
@login_required
def oyla(request, id):
if request.is_ajax():
entry = Entry.objects.get(pk=id)
entry.points += 1
...
2
votes
7answers
13k views
Javascript with Django?
I know this has been asked before, but I'm having a hard time setting up JS on my Django web app, even though I'm reading the documentation.
I'm running the Django dev server. My file structure looks ...
1
vote
1answer
14 views
Pass a request to a DJANGO REST api using Angular and then return those results in a DJANGO view
Ok, so basically what is happening is I have a search input on my index page. The user types something in the search input, and that is sent to the Django REST api which returns the data in JSON ...
1
vote
1answer
19 views
Python Parsing HTML Table Generated by JavaScript
I'm trying to scrape a table from the NYSE website (http://www1.nyse.com/about/listed/IPO_Index.html) into a pandas dataframe. In order to do so, I have a setup like this:
def htmltodf(url):
page = ...
0
votes
1answer
35 views
using key presses instead of buttons in django forms
I have a website that allows text entry, voting on entries, and live tables of the voted entries:
http://www.highscore.a2hosted.com/index/
This is coded in django. I managed to get a text entry and a ...
0
votes
1answer
28 views
Getting data from python in Javascript and AJAX
I have some issues retrieving info from python and try to show the data in a html page
I get the date from a python script (data.py)
import cx_Oracle
import json
lst_proveedores=[{}]
conn_str = ...
0
votes
0answers
24 views
Populate browser text field from excel file
I'm a bit out of my area of expertise here and I was hoping I can get nudged in the right direction.
I have a large excel file containing part information and I would like to feed this information ...
0
votes
1answer
28 views
How to transfer int variable from python to javascript? [on hold]
I am currently doing a project wherein latitudes and longitudes are stored in a MySQL database. I plan to use these coordinates to create an overlay on top of google maps. to do that I require the ...
2
votes
1answer
31 views
Dictionary data ito d3 line chart - Django Python in server side
I have a dictionary object of date time and value. I have set up my axis accordingly in the following formats;
var parseDate = d3.time.format(""d %b %Y %H:%M:%S %p").parse;
var x = ...
0
votes
0answers
10 views
Supporting custom Selenium IDE commands in a formatter
I have managed to add custom commands to Selenium IDE, but am having difficulties supporting these in a format, namely, an extended version of the Python WebDriver format. In the script generated when ...
0
votes
0answers
51 views
Python vs. Javascript speed difference [on hold]
I solved the same Project Euler problem using Javascript and Python. Both solutions essentially use the same logic. The Javascript solution is MUCH faster when I run it in my terminal using node. How ...
-1
votes
1answer
24 views
Read data from python in javascript [on hold]
I will explained my case:
I have some python files who retrieve data from an oracle database and create a json object
But I don't know how to read this json in javascript.
I trying using getJSON and ...
1
vote
2answers
19 views
mac os x python/JavaScript IDE where I can use break points
I looking for python/JavaScript IDE where I can put breakpoints. Currently I'm using coderunner but I can not put break points. I'll really appreciate you recommendations
-1
votes
0answers
18 views
3D vector drawing embedded in website [on hold]
I would like to know if there's a way to embed a 3D cartesian plan so I can draw vectors. Is there a tag for this, or a javascript/jquery function, or a way to embed a python module.
Thanks!
0
votes
1answer
26 views
Selenium python javascript popup
I am using Selenium in Python to navigate to a website and fill in a form. There is a section of the code that let's you click on a button to open a pop-up node tree using javascript. I am able to ...
0
votes
2answers
31 views
Trouble Using JavaScript to Insert HTML Img Tag
I'm using the following code:
var oDiv = document.createElement ("DIV");
oDiv.innerHTML='<img src="{{ url_for(\'static\', filename=\'images/bubble4.png\') }}">'
to try and insert an image ...
30
votes
6answers
36k views
are there dictionaries in javascript like python?
i need to make a dictionary in javascript like this
i dont remember the exact notation, but it was something like:
states_dictionary={ CT=[alex,harry], AK=[liza,alex], TX=[fred, harry] ........ }
...
1
vote
0answers
15 views
How to integrate curl.js with server-side jinja2 templating
I have a Python-based Flask web application that uses Jinja2 to perform templating on the server-side.
I would like to improve my Javascript and CSS loading by using curl.js to load JS and CSS ...
0
votes
1answer
31 views
Javascript twos complement
The following python code seems to work very well to het the twos complement of a number:
def twos_comp(self, val, bits):
if (val & (1 << (bits - 1))) != 0:
val -= 1 << ...
2
votes
2answers
58 views
Pubnub presence limit to 20
I'm implementing presence with pubnub, and I'm encountering a problem, I create a method to get the presence in python, and its working properly, when I connect one to 20 users simultaniously, but ...
1
vote
2answers
33 views
Modal Form Submission without refresh
I have a modal window that pops up when I want to add a new project to my dashboard. I have gotten it to work with jquery post however, I cannot prevent it from refreshing. What I want to do is after ...
39
votes
4answers
33k views
Django Template Variables and Javascript
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 ...
12
votes
8answers
7k views
Passing objects from Django to Javascript DOM
I'm trying to pass a Query Set from Django to a template with javascript.
I've tried different approaches to solve this:
1. Normal Approach - Javascript gets all messed up with trying to parse the ...
-3
votes
0answers
42 views
I have to create a directory so that non-coders can input info [on hold]
Ok I have to create a directory similar to this one, but the information would have to be able to be entered in a wysiwyg editor. How would you go about doing that? and what languages would you use? ...
8
votes
5answers
1k 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 ...
2
votes
0answers
40 views
Dynamically changing chart data using Django and Highcharts?
How would I go about allowing a user to change the status of a graph and updating it on the page?
For example, allowing a user to adjust the size of a graph without having to rePOST.
I am using ...
0
votes
2answers
42 views
Call python FUNCTION from javascript
this question have been asked numerous times, I know and I'm sorry if by ignorance I didn't get the answers.
I have a hosting plan which doesn't allow me to install django, which was really nice to ...
-3
votes
0answers
30 views
Opening cmd on client side using button in html webpage? [closed]
I am creating a web UI based on HTML, JavaScript and php. My requirement is to open a command prompt in client side by a click of a button and that cmd should run a telnet session on an IP (the ...
0
votes
0answers
24 views
Filling dialog parameters from Django/Python app
I'm creating a dashboard using Django that intends to simplify operation for several other (web) applications created by third parties, by redirecting the user to specific links on that applications ...
3
votes
1answer
69 views
AngularJS: Change input value with server data when page loads
Sorry if this was already asked, but I really didn't find anything that applies exactly to my problem.
Well, although I know that an AngularJS form value must be loaded from controllers and that I ...
1
vote
2answers
49 views
Can't add labels to d3js force layout network visualization
I've been pulling out my hair trying to implement labels in a force-directed layout network visualization using d3js (I'm using Python and Flask to generate a JSON file from an API and present the viz ...
0
votes
0answers
33 views
How to send a POST request with JavaScript XMLlhttpRequest to Google App Engine?
I would like to send a JavaScript XMLlhttpRequest to a .py script on Google App Engine. But I am not looking for a jQuery solution
HTML:
<form action="javascript:sendMessage();">
...
-1
votes
1answer
23 views
Filter logic like in reports
This kind of filter logic : (1 and 2) or 3
can be implemented in Python or Javascript, any ideas? I didnt found nothing google.
I mean , user will type filter in textarea, need to check filter's ...
14
votes
2answers
4k views
How to use CrawlSpider from scrapy to click a link with javascript onclick?
I want scrapy to crawl pages where going on to the next link looks like this:
<a href="#" onclick="return gotoPage('2');"> Next </a>
Will scrapy be able to interpret javascript code of ...
0
votes
0answers
25 views
Selenium operation in different tab (Python or C++)
I have an issue with Selenium.
I have a scenario:
Users opens a browser via script:
driver = webdriver.Firefox()
driver.get ("some_startpage")
Then USER opens a new tab (the person clicks, it is ...
1
vote
2answers
63 views
Flask flash and url_for with AJAX
I am currently stuck on a rather "big" problem, and I will try to be as clear and concise as I can about it.
I am developing a tool in Python, using Flask. It's meant to be an intranet. The idea is ...
1
vote
1answer
19 views
Django/Python/toDataURL return a response with the string from toDataURL
I have saved in a database a string return by the javascript method toDataURL. An exemple is available here: http://pastebin.com/0Qu8rngD
I need to return the image in a django response. Something ...
0
votes
1answer
35 views
control java instance by (java script) interfaces from shell script?
I am absolutely new to java and am referring to a program energy2d. Its source code is here.
It is run as an embeded applet(see at the website link in github, as I am not allowed to post more then ...
0
votes
1answer
71 views
How to dynamically serve markers from Django to google maps according to view bounds?
I have a Django database model that looks like this:
class Point(models.Model):
date = models.DateTimeField(auto_now_add=True)
long = models.DecimalField(max_digits=10, decimal_places=7)
lat = ...
0
votes
0answers
9 views
Specify Content-Type in JS Post Request to fix JSON Decode Error
I have a JavaScript/Python web app that functions as it should on my colleague's computer, but I encounter a JSON Decode Error when I serve my git cloned copy of the program.
A function in the form ...
5
votes
3answers
102 views
Django + Django-Pipeline with Javascript “Require”
I have a module that calls require on a Javascript library. I am trying to compress my .js files with Django-Pipeline but after collectstatic the web-page gives the error:
UncaughtReferenceError: ...
0
votes
0answers
17 views
How can I merge SVG countries into a larger region in JVectorMap
I'm using JVectorMap to display an interactive world map on my site, where pop-up information is displayed about certain countries when you hover over them - very similar to the demo on the homepage ...