0
votes
1answer
14 views
Parsing JSON output using Mechanize and Python Django View
I'm currently doing a site search like : site:somedomain.com into BING using Python and Mechanize.
It is submitting fine to bing and returning an output - looks like Json? I can't seem to figure out ...
0
votes
0answers
13 views
Formatting A ManyToManyField in to boxes with Django
I am having trouble with formatting. Here's what my code looks like right now:
As you can see I have a product field and a price field for each one of those products. How can I get it so that the ...
0
votes
0answers
22 views
Django Test views.py function
I'm building a function in my views.py. Is there anyway of telling if the function is called upon. The function has some tricky tasks, so I want to make sure that it is called upon.
In other coding ...
0
votes
2answers
37 views
The Django Way To Write This Query?
I have a obscure database in Django. The database is read only and created by my property managements software. Basically in my view I need to write this query to get a specific record.
SELECT * FROM ...
1
vote
1answer
27 views
How to remove specific directory names from path list
I have a zip files which contains media files, before I extract those files and append the path to my db I need to clean up the path, with extracting the zip.
Path list from zip contains
...
1
vote
1answer
23 views
django installing dependencies from git
Is there any way to tell django to install some dependencies through external repositories? For example, I'd not like to keep twitter-bootstrap code downloaded into my repository, I'd like to define a ...
0
votes
1answer
21 views
Displaying multiple instances in a ManyToManyField in Django
Here's what I have in the image:
I would like to display what I colored in green. Basically I would like to display what each product cost. For Bob he cost $12010 and Jill cost $12010 for a total ...
1
vote
2answers
30 views
Run Django function from Javascript command (UPDATED with CODE)
I'm trying to cause Django to run a function when I tell it based off a javascript button. How do I accomplish this? Where do I write the django function?
EDIT
It's not working yet. Here is my code ...
0
votes
1answer
24 views
POST RESTful api call from Javascript/Django
I'm trying to do a POST RESTful api call from a button on Javascript. The api call is cross domain, so that is a challenge. How do I make this call?
In ajax my call looks like: [I now know that you ...
0
votes
3answers
28 views
django objects.filter exclude yourself
Handling uniqueness in the code in Django, I've found a problem: How to check records at validators, but excluding yourself, because the update function?
I've trying below, but doesn't works.
...
0
votes
0answers
35 views
server code HTTP POST to the remote server - Django
SO I'm trying to call an api from ajax. I've made an ajax call to a local url. Now I want the local url to make the url call and return the returned data. The URL is RESTful.
$.ajax({
type: ...
2
votes
1answer
23 views
Getting HTML to linebreak in django admin's display
I have this as my django display
The code for doing this is:
class PurchaseOrder(models.Model):
product = models.ManyToManyField('Product', null =True)
def get_products(self):
...
1
vote
2answers
30 views
Django - To get form.errors as a dictionary instead of HTML code
Is there a way to get the form errors generated during the django form validation in a dictionary (key as the 'field_name' and value as 'the list of errors relevant to it'), instead of the default ...
0
votes
1answer
15 views
Django View is not getting processed completely after HttpResponse() call
I have a view named Scan which takes a modelform input and sends it to another view Processscan which is supposed to be getting the value of the input from Scan view and process it in Processscan ...
0
votes
1answer
17 views
Getting list-display to show ManyToManyField in an organized format Django
I have the code:
class PurchaseOrder(models.Model):
product = models.ManyToManyField('Product', null =True)
def get_products(self):
return "\n".join([p.products for p in ...