Tagged Questions
0
votes
1answer
25 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
18 views
Javascript or Python library to do bidirectional HTML to Markdown conversion [on hold]
I am looking for Javascript or Python library that is able to do bidirectional HTML to Markdown conversion. I found libraries in both languages to go either way, but none that goes both ways. In ...
1
vote
1answer
20 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
28 views
Javascript equivalent of Python's repr? [on hold]
In python there is repr().
Is there anything like it in JavaScript?
0
votes
0answers
23 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
23 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
24 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 [on hold]
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
23 views
Need a very simple GAE Channel API example [on hold]
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
20 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
21 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
28 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
56 views
Rock, Paper, Scissors, Lizard, Spock in javascript as (Python Coursera course) [on hold]
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
41 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
0answers
9 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
22 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
35 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
16 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
31 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
15 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
56 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
24 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
25 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 ...
0
votes
0answers
12 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
15 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
37 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
35 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 ...
0
votes
1answer
22 views
Perform Simple Javascript Regex in Python
How to perform this javascript regex into Python (3.2)?
exmple_string.replace(/-/g, '.').replace(/(^|\.)([0-9]+)($|\.)/g, '[$2]$3');
The regex should work as following:
How to replace and correct ...
1
vote
3answers
32 views
Unable to simulate onclick javascript inside <span> tag using Selenium webdriver,python
I am trying to simulate onclick event at the following tag
span class="taLnk hvrIE6 tr165579546 moreLink ulBlueLinks" ...
0
votes
0answers
11 views
Django conditional dialog box
I've got a django site that contains a button that brings up a django form. I'd like to add a confirmation dialog box to come up when the user hits the 'Save' button on the form, but only if the ...
0
votes
0answers
25 views
Python slimit and d3.js
I developed some code for data visualisation using d3. It works fine but I encountered a problem trying to integrate it into my project. It's a python/django-based application in which all javascript ...
0
votes
2answers
25 views
where to get the value when sending the request?
please help to solve the problem.
html:
<div class="modal fade" id="commonModal" tabindex="-1" role="dialog" aria-labelledby="commonModalLabel" aria-hidden="true">
<div ...
0
votes
0answers
30 views
Use jQuery to determine when Django's filter_horizontal changes and then get the new data
I have a filter_horizontal selector in my Django admin that has a list of categories for products (this is on a product page in the admin). I want to change how the product change form looks based on ...
0
votes
0answers
12 views
python-nfqueue seems to be ignoring whole HTTP chunks
I've written a little python script using libnetfilter-queque bindings to grab packets into user space.
The code:
import socket
import nfqueue
buf = ''
frame_count = 0
def ...
1
vote
1answer
31 views
Unable to obtain desired response from .aspx login page using Python and the Requests module
I have been trying to log in to a .aspx site (https://web.iress.com.au/html/LogonForm.aspx - For source / initial cookie reference) which uses a javascript function __doPostBack(eventTarget, ...
-2
votes
1answer
42 views
A browser searching program for a a specific site [closed]
Ok it seems as though my previous question was voted down and was broad (not specific enough) OK, so let me try to be more specfic.
So there is this URL "WWW.SAMPLEURL.COM/FE8ETB8TBig7-BU.COM". On ...
1
vote
1answer
28 views
jquery prompted variable value given to python script
I have what I think to be a simple problem, but I cannot figure out the solution. I have a javascript form with options, and when the user selects an option they get prompted to input a value as ...
0
votes
1answer
37 views
Index error with Javascript parser
I am using Scrapy and the Javascript parsing module 'slimit' to look for a particular Javascript item within pages that I am crawling, like so:
from scrapy.contrib.spiders import CrawlSpider, Rule
...
0
votes
0answers
36 views
How to HTTP POST a Unicoded Japanese data in Python
Trying to mine data off my institute's web server. (With permission, of course.)
Since I could not bring the codes back with me, I am sorry but I can only provide some snippets.
The intranet ...
0
votes
1answer
39 views
Obtaining correct data using Regex/List
I am parsing the following code using a regex (not ideal I know, but that is a story for another day):
data:{
url: 'stage-team-stat'
},
defaultParams: {
...
0
votes
0answers
18 views
Django language selection does not work with Firefox
I'm trying to set up a language selector using the Framework Django.
I used this code:
<form action="/i18n/setlang/" method="post">
{% csrf_token %}
<input name="next" type="hidden" ...
0
votes
1answer
64 views
JavaScript math issue [closed]
I see this in JavaScript
2-(1/3 * 1) // => Returns 1.66666666667
but,
4-(1/3 * 7) // => Returns 1.6666666667
This is one less 6 than the previous result. This is awkard, because both ...
0
votes
0answers
19 views
Utilize script in Raspberry Pi JS
I want my Raspberry pi to be able to access some endpoints. The information appears to be on this page:
here
However, I can't figure out how to get Pi JS to recognize gapi. I think I'm doing ...
-1
votes
0answers
27 views
How to change “the file” in HTML form <input type=“file”>
I'm writing a mobile website with Python Flask.
When refers to image updating, things is getting harder.
I can direct update image with HTML form of <input type="file">.
But mobile website need ...