Tagged Questions
1
vote
1answer
39 views
Calling a function from a template using javascript
I'm very new to Django and there's something I'm trying to do that I don't seem to understand how. Right now I have elements of the page show/hide using javascript onclick. What I'm showing includes a ...
-2
votes
1answer
26 views
Web framework with the most developed audio functionality? [closed]
One of the required features on a website I am building requires the concatenation of several audio files, among other things. I have repeatedly struggled to find javascript or php solutions to this ...
0
votes
1answer
8 views
Some .js files are getting 403 from S3 but not others
I've got a django app running on heroku that pulls static files from S3. Until today it was working pretty well. I just pushed a different version (uncompressed) of prettyPhoto.js and now I'm getting ...
1
vote
2answers
36 views
Django: strategy for preventing duplicate object creation
I'm running into an issue of creating multiple DB objects when I only ever expect one.
My application models consist of a Form with a collection of Fields, and a FormEntry with a collection of ...
2
votes
0answers
28 views
unable to get post object models in my template
i have a student model with name,age,email fields.i have created a form StudentForm for this an create a view like this
def student(request):
form=Studentform(request.POST)
if request.method=='POST':
...
0
votes
3answers
39 views
Render HTML String Within A Webpage
I'm building a user dashboard in Django for a python based web service. This web service creates emails, and the HTML strings of these emails are saved in a file (and could theoretically also be saved ...
0
votes
1answer
20 views
How to use imageloader.js with Django
I have a django project. I want to use ImageLoader.js . I've added jquery and jquery.imageloader.js to my base.html but I don't know how should I put js code in my index.html page?
Here's part of my ...
0
votes
1answer
24 views
Is there any way to load, minimize and combine different javascript files for different templates in Django?
Now, I put some common javascript files in PIPELINE_JS settings. But I also want to load more specific js files based on each individual template. I know I can simply add a script tag to include ...
0
votes
2answers
66 views
how to add delete confirmation message
In HTML, delete_icon is an image class in which if I click it, the email id gets deleted without any confirmation message. I want to add a popup to display when delete_icon is clicked. The popup ...
0
votes
1answer
36 views
Good way to prevent access to Django site if JavaScript and cookies disabled?
I'm building a Django site using responsive web design and RESS. I want to prevent the user from accessing the site if they have JavaScript and/or cookies disabled in their browser. Is the code ...
1
vote
2answers
57 views
table background image not set in google chrome
html template for print page:
<table style="width:128px;height:293px;background-position:center;" id="human-body" background="{{ STATIC_URL }}images/human.png" border="0">
...
0
votes
1answer
31 views
Backbone.js: Access JSON returned inside an HTML fragment served over Ajax?
I'm building a web application that uses Django for the back-end, and Backbone for a user-responsive front-end.
When the user carries out a search (or loads more results for an existing search) I ...
0
votes
1answer
32 views
Django Flot e javascript
I would like to do some graphics in my django application. I'm using Flot. I am a newbee with regard to javascript and I do not know how to pass parameters in my situation. This is my code:
view.py
...
0
votes
2answers
63 views
clear checked check box after clicking cancel button
html:
<div id="member_form" style="display:none">
<form id="contactform" method="post" action="." onsubmit="if($('input[name=name]').is(':checked')){return ...
-1
votes
1answer
26 views
How to add multiple paragraphs to a variable in Javascript dynamically? Actually I'm getting those paragraphs from the view [closed]
document.getElementById('id_comment_133').value = "Great job using the customer’s name during the initial greeting! This not only showed good communication between the sales team members, but also ...
0
votes
1answer
24 views
Django returns bad timezone
I've a problem that Django on AWS EC2 Ubuntu 12.04 server using this the following view returns UTC timestamp:
import time
from django.utils.datetime_safe import datetime
def currentTime(request):
...
0
votes
1answer
14 views
how to open pdf in a browser with with disabling the context menu in django?
I have the following code to open up a webpage inside views.py:
def pdfView(request,filesPats):
f = open(filesPats,'rb')
cont = f.read()
response = HttpResponse(cont, ...
0
votes
0answers
23 views
Django: Collapseable menu dont stay expanded/collapsed
I'm using Django 1.5 with Python 2.7. I have an ul menu on the side with a toggle-function, shown in this picture: http://s1.directupload.net/file/d/3278/d9b2xobc_jpg.htm.
So now my problem:
If I ...
0
votes
0answers
26 views
Adding jQuery src to page causes an overflow
I am developing an html5 kiosk application with django that needs to fit on a 1920x1080 screen exactly without scroll bars. The page and css are fine and fit perfectly, but just adding the jQuery ...
-2
votes
0answers
43 views
Combine node.js and Django? [closed]
I'm so interested in learning node.js and i have some trining in Django. I'd like to know if you can combine in One Project these two backend tecnologies.
I'd like to use Django for the architecture ...
2
votes
2answers
55 views
How to execute jquery on page update
I have used jquery multi-select to render my django app muslitiselect in an user friendly way. When My Page First render I have putted script given below on page, this script bind any element having ...
0
votes
3answers
38 views
Unique HTML element IDs for each model with Django
I've got django models displaying on a page using a checkbox input that has a label over it like so:
{% if recipes_list %}
<table>
{% for r in recipes_list %}
<tr>
<td>
...
2
votes
2answers
28 views
SammyJS not working with Django
I am using KnockoutJS with SammyJS for client-side templating, and Django framework
In the topbar of my application, there is a dropdown menu for user logout. This is the code for it -
<div ...
0
votes
2answers
57 views
Django-how to implement javascript for the Save button in Html to help redirect to a new url
I searched the relevant question and get answers to design the button as a form
<form action='/someurl/{{someobject.id}}',method='post'>
<input type="submit" value="Edit" />
...
0
votes
1answer
39 views
Javascript not reading the keys and values of a dictionary in django template
I have a dictionary like:
dest = {2: [u'canada', u'A', 'Ottawa'], 5: [u'Malaysia', u'A', 'KualaLumpur'],...}
Then I tried to retrieve the keys and values from dest in django template using ...
0
votes
1answer
22 views
Dynamically updating form with Django
I need to build a web form with a number of select fields whose choices depend on the answers to the previous fields. A classic example of this would be a vehicle year > make > model form, where the ...
0
votes
1answer
22 views
Writing JS tests for Django apps
I have some django apps for which I have some templates. I have some inline JS in the template and a lot of DOM manipulations.
I would like to test the JS parts. I don't particularly want to use ...
0
votes
1answer
36 views
Django/JQuery Syntax Error: I don't know why I am getting this error
I am making a blog application using Django.
In my post_save() function in post_edit.js, I have this post editt operation:
$.post(item.find("#post-form").attr("action") + "&ajax" , data, ...
0
votes
1answer
63 views
Javascript won't do cross domain request from django
Hi here is an odd problem. I am trying to serve the below index.htm file with django. When you click the button, the page (not the server) does a cross-domain request. If I load the index file direct ...
0
votes
0answers
26 views
what is the best way to check django form errors in javascript before submitting?
Actually I need a method which have same error message in javascript validation (client side) and in my django form validation (server side).
I search for any django library for this but I didn't ...