1
vote
1answer
16 views

Pyton POST request same JS/PHP

I'm not good in js/php, but i need to convert code below to Python. Javascript version: function api_query(key,keyId,url,post,body,signature,cb){var method='POST'; var date=new Date(); var ...
0
votes
0answers
23 views

How to handle scrollable pages like soundcloud.com using Matlab/R/Python?

I would like to retrieve a source code of the first N pages from soundcloud.com/explore, but the problem is that I have to somehow preload them first. For now what I do is using some browser and ...
1
vote
0answers
12 views

Openlayer: Cannot select feature from AJAX loaded values

I have a problem on how to add an event from AJAX loaded values. The code below works fine when the option values are pre loaded but when it is from AJAX, it cannot click a feature. Here's the ...
1
vote
1answer
16 views

WTForms only submits first form

I have a blog page where users can add their replies and that works just fine. I also have an edit feature, but it isn't working. Just the first one does. When for example, I submit the second or ...
-2
votes
0answers
29 views

Developing desktop application [on hold]

I'm interested in developing applications such as spotify, skype, evernote and etc. How does one start developing for applications such as that. Are they web apps? Desktop Apps? What tools would be ...
0
votes
1answer
9 views

list of all selected items from django select2 plugin

How can i pull out the list of all selected items in django select2 plugin? So, I select 5 options in a select2 field and i want to use javascript and pass the list of selected options using an ajax ...
0
votes
0answers
14 views

How to fetch data from my google analytics account to use on site?

Consider that I am owner of http://ethernalsite.com On my website i've added google analytics script and it's happily collecting data about my precious visitors. I would like to create page views ...
0
votes
0answers
20 views

Generate the bar graph from xml file

I am a C++ (Linux) developer trying to make a bar graph by reading an XML file result.xml. I need to generate a bar graph (shown below) based on the value of "state" field in the XML file. The bars ...
0
votes
0answers
36 views

What does it mean to say “Javascript doesn't have the concept of modules” [on hold]

I stumbled upon this question when I read "Javascript doesn't have modules" . Is there a difference in doing var module = ( function(){ var key1 = value1; var key2 ...
0
votes
1answer
26 views

Can't get json through ajax and flask

I am trying to make a simple web application for logs show. On the web side: python 3.4 and flask and on the client side it's simple web form with ajax. Flask: import json from flask import Flask, ...
1
vote
1answer
27 views

Uncaught SyntaxError: Unexpected token & while rendering a Django template

I'm trying to draw a line chart using "https://www.google.com/jsapi", and passing data from a Django view; this is my template <head> <script type="text/javascript" ...
-2
votes
0answers
21 views

Looking for simple planning poker web app in ruby or python [on hold]

I'm looking for simple app for SCRUM's planning poker. Do you know of any? It could be as simple as choosing name and assigning a value. Then just hit vote button.
0
votes
1answer
56 views

JavaScript code executes multiple times

I have created a simple webpage that does basic image processing. I have used php to upload the images and Python (cgi-scripting) to resize them if their width or height is over 600px or 400px ...
0
votes
0answers
14 views

Django Ajax - Dajaxice.myapp is not defined

I'm trying to implement Ajax functionality into my website. This seems to be a moderately common problem, but all solutions to it I've found online have been simple, like forgetting something in the ...
0
votes
0answers
42 views

How to Load a javascript file and execute its functions with given parameters in Python 3.4?

For example, a js file called x.js (it's very simple just for explanation): function func2(x, y) { return x + y } function func1(x, y) { return func2(x, y) } Now the module name is ...
0
votes
0answers
12 views

Mechanize Python: How can I determine the Javascript processes behind a clickable li tag?

So basically I am automating a process with Mechanize and I am stuck. I need to be able to press some buttons automatically, but they appear to be Javascript-like buttons: <li ...
0
votes
0answers
23 views

Why can't my Django view receive data from a created tag in my Django template?

Django view: if request.method == 'POST': myData = request.POST.get('tester', None) print myData Django template (jquery and javascript): var i = document.createElement('input'); ...
0
votes
1answer
38 views

With Flask and Angular, how do I make $scope variables available to a python function

I am kind of a beginner so I don't even know the best way to do this or what to call what I am trying to do, but I am making an event posting app which will have a header of the month and year like in ...
0
votes
0answers
28 views

jquery ignore element's html changed

i'm trying to reload albums when changing artist in select2 element (http://ivaynberg.github.io/select2/). at start i'm retrieve new data from controller when artist changed my.js ...
1
vote
1answer
32 views

Holder.js in Google Appengine (python)

I want to load a placeholder image using holder.js in a static template. In static template index.html I have: <img src="/static/holder.js/200x200"> I have handlers set in app.yaml for ...
0
votes
1answer
17 views

Minification error with django compressor

I'm using an automatic minification tool called django compressor. However django compressor minification seems to introduce errors. Updated script with semicolons: Before: var app = ...
0
votes
1answer
15 views

How can i get next page after submit form using Ghost.py

I'm using Ghost.py for filling form. After submit form i get same page. Code: url_local = 'url' gh = Ghost() page, name = gh.create_page() page.open(url_local, wait_onload_event=True) ...
0
votes
1answer
24 views

How to print formatted python output for javascript?

I am trying to capture the stdout when I print on shell. I get output like this: ************* STARTING healthmonitor *********************** Aug 28, 2014 5:17:58 AM ...
0
votes
1answer
17 views

AngularJS $http posting object containing array strange behaviour

I have a function which uses $http to post params. The thing I don't understand is that the filters param contains an array. However, the server interprets this array as a key/value pair for each ...
1
vote
1answer
44 views

AngularJs data binding in ajax html response

I'm using python/django as an backend aplication with complex forms structure. I got an angular controller which makes and request to get suitable form. I found an django-angular package that adds ...
0
votes
0answers
19 views

Using typeahead.js with Django [duplicate]

First of all, I nearly don't have js information at all. I want to autocomplete an input according to this model's title field: class Baslik(models.Model): user = models.ForeignKey(User, ...
0
votes
1answer
19 views

Python toDataUrl Equivalent

I am trying to do the exact same thing in python as what I can in JavaScript. In JavaScript I can easily draw on a canvas and then use toDataUrl(imageFormat, quality) to get the image in base64 ...
0
votes
1answer
27 views

why so much XHR polling when using app engine Channel API

I am trying to use the App Engine Channel API to avoid polling for updates in my client. The problem is that I see an continuous stream of XHR packets sent in the Chrome console after starting a ...
0
votes
1answer
22 views

Python Selenium execute javascript function [closed]

The source of the wepage of interest is like this: Pages={ "xxxxx": [ {grouptitle:"sometitle", id:"someid", title:"sometitle". hidden:"false", locked:"true", script:"openPage("xxx-xxx");", ...
0
votes
1answer
28 views

how to call python script from javascript?

I have a backend python script where it retrieves the data from the sqlalchemy engine. And I would like to show the data in a search box where you can scroll down the list of data and select it. I ...
0
votes
1answer
32 views

Best practice for loading ajax content into a template [closed]

I am working on a single page application, however, my app has about 15 different "views" which are all fairly unique. What is the best practice for loading ajax retrieved content into a template? ...
0
votes
2answers
29 views

Javascript execute python file

I'm building a house monitor using a Raspberry Pi and midori in kiosk mode. I wrote a python script which reads out some GPIO pins and prints a value. Based on this value I'd like to specify a ...
0
votes
1answer
28 views

Element following user message

I have created a unique web chat using websockets and python for the server. It's very basic at the moment however there's a feature I'd like to implement but I'm not sure as to how I'd go about it. ...
0
votes
1answer
36 views

run python script using ajax

I have the python script which export data from a database. The script executes the exportData function() I would like to run that on the website by clicking a button via ajax. This is want i have ...
1
vote
5answers
88 views

Regex replace new lines in between start and end

I have a string that includes new lines. Between the lines that are """, I want to add semicolons just before \n. Example input string: print and not affected """ This is my game dead or alive ...
-4
votes
0answers
41 views

how to generate .doc, .pdf, .txt. from html webpage [closed]

I need a little help. I have a website which is built on flask Microframework, and i am trying to generate doc, pdf, and txt files from specific sections of webpages on my Webite. I would like to know ...
1
vote
0answers
37 views

Using Selenium to parse a page for links that do not exist in the source

I am looking to find a way to code a script in python that can extract the link to each item in my Steam inventory. For those who do not know what that is here is an example: ...
1
vote
1answer
40 views

Python: Is there a way to get HTML that was dynamically created by Javascript?

As far as I can tell, this is the case for LyricWikia. The lyrics (example) can be accessed from the browser, but can't be found in the source code (can be opened with CTRL + U in most browsers) or ...
0
votes
0answers
32 views

Trouble with Django and typeahead.js

I'm trying to autocomplete from my db in an input with bloodhound of typeahead.js I have models like this: class Baslik(models.Model): user = models.ForeignKey(User, null=True, blank=True) ...
3
votes
2answers
30 views

What is the python equivalent of JavaScript's Array.prototype.some?

Does python have any equivalent to JavaScript's Array.prototype.some / every? Trivial JavaScript example: var arr = [ "a", "b", "c" ]; arr.some(function (element, index) { console.log("index: " ...
0
votes
0answers
31 views

Use Python (spynner) to open <script src=“/xxx/xxx/xxx.js” type=“text/javascript”>

I need to crawl some data from a webpage and currently I am using spynner in python. After my login and run a javascript, I finally reach a webpage in which there are many tags on the top like this: ...
0
votes
1answer
19 views

Docker IO Error with local js file

I am having hard time loading local js file with docker. I had no problem testing on local machine but if I host it on web server running on docker No such file or directory: 'static/js/data.js error. ...
1
vote
0answers
70 views

What am I doing Wrong? - Django JSON response and JQuery

I am working on a small website and I need to send thread-post data through JSON. This is the JSON object django serves: [{"text":"Some sample text","id":"21","title":"Test Thread"}] I saved ...
0
votes
0answers
54 views

Django ModelForm and AJAX usage

i am working on for a basic feedback system. I just want to submit feedback with ajax, for example if fields are empty ajax will return some error msg and update the div at the same page with no ...
0
votes
2answers
33 views

Converting JavaScript JSON data to Python JSON

I have JavaScript JSON data: var data = '{a: 10, b: 20}' I want to convert it to Python JSON. How can I do? My situation: I have script that read text from a website. website has data in ...
0
votes
0answers
15 views

Have a blob for a wav file on client side, how do I send it as a wav file to the server?

So I am using recorder.js to generate a blob for a wav file, an example blob looks something like this "blob:b99aada2-955c-4fcf-a0ad-da5bb377f4b2". I'm sending it to a server running django. I need ...
1
vote
2answers
31 views

How do I decode escaped unicode javascript code in Python?

I have this string: V posledn\u00edch m\u011bs\u00edc\u00edch se bezpe\u010dnostn\u00ed situace v Libyi zna\u010dn\u011b zhor\u0161ila, o \u010dem\u017e sv\u011bd\u010d\u00ed i ned\u00e1vn\u00e9 ...
1
vote
1answer
37 views

preview CSS before submitting it as a final style

I am trying to make an interface in which a user can edit their "user styles" css sheet and preview it. If they like what they see, they can commit it. Here is what I do so far, as a very basic ...
3
votes
1answer
71 views

Serve random image with Django

I have approx. 100.000 pictures and my goal is to generate a Django-powered webpage that displays one of those pictures at random every time the page loads (actually it's a bit more complicated, but ...
0
votes
1answer
34 views

Django ajaxuploader 400 badrequest error

Submitted.html The JS is also surrounded by a document.ready function var uploader = new qq.FileUploader({ action: "{% url 'QCOMLTE:imager' %}", element: ...