Tagged Questions
0
votes
1answer
10 views
Simultanous AJAX requests and MySQL database data visibility in Django
I have a Django app with a MySQL database which allows answering of questions on an HTML page. The answers get sent to the server via AJAX calls. These calls are initiated by various JavaScript events ...
0
votes
1answer
16 views
Data returns with SQL query but not through Django models
I have 5 models that need to be aggregated based on data within the fields. All models have primary and foreign key relationships.
The data I'm trying to get can be extracted via the query
SELECT ...
0
votes
1answer
25 views
how to save an instance of a Django model to my database
I have a model called Job that I want to save to my database. My template has passed its fields to my View function as POST data. I am wondering how to from here take that, create some kind of Job ...
0
votes
1answer
19 views
Django Raw Query SQL injection display attack
I am trying to write a website with Django that could display SQL injection for classroom purposes.However when i try to exploit the query nothing is getting returned. I am using a MYSQL database
...
1
vote
1answer
44 views
Why would django give me an ObjectDoesNotExist error on a newly created object?
I just ran into this while testing some code that uses django to handle orders. I'm getting an "ObjectDoesNotExist" error when trying to load (by id) a newly created record.
Here's a skeleton of how ...
1
vote
1answer
33 views
Sort table by a column and set other column to sequential value to persist ordering
So I'm not sure whether to pose this as a Django or SQL question however I have the following model:
class Picture(models.Model):
weight = models.IntegerField(default=0)
taken_date = ...
0
votes
1answer
35 views
DISTINCT keyword IN MYSQL backend in Django?
I hae a MYSQL query like this:
shared_file = File.objects.filter(id__in= Share.objects.filter(user_id = log_id).values_list('file', ...
0
votes
0answers
39 views
Error while using the id of one record in another record
models.py
from django.db import models
import datetime
class Categories(models.Model):
category_name=models.CharField(max_length=200)
def __unicode__(self):
return ...
0
votes
1answer
34 views
Openshift-django-mysql : No tables created to database via syncdb
My settings.py
if ON_OPENSHIFT:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'django',
'USER': 'USER',
...
1
vote
0answers
42 views
Django Unknown system variable 'TRANSACTION' on syncdb
My local Django is blowing up running the manage.py syncdb script that runs on our servers.
This is the error message I'm seeing when running python manage.py syncdb,
OperationalError: (1193, ...
0
votes
1answer
24 views
Django raw SQL query trouble with format characters and string interpolation
In my Django app, I need to generate a MySQL query like this:
SELECT * FROM player WHERE (myapp_player.sport_id = 4 AND (myapp_player.last_name LIKE 'smi%'))
UNION
SELECT * FROM player WHERE ...
0
votes
0answers
23 views
Django South - OperationalError: Object does not support indexing
i have the following problem with Django, South using a MySQL Database: I tried to integrate South into my Django project. As backend i use a MySql Database.
First i installed South via pip install ...
0
votes
1answer
19 views
django MySQLdb not syncing [closed]
Running syncdb, following tutorial at http://www.youtube.com/watch?v=srHZoj3ASmk
Not sure what this error means and googling it seems to not produce anything useful.
...
0
votes
1answer
32 views
Django Admin ManyToMany error
I'm using the the built in django admin site to save instances of a model that has a ManyToMany field. If I save, not update, a model in the admin site without setting a value for the ManyToMany field ...
-1
votes
0answers
87 views
Relative advantage of ASP.NET MVC over PHP Zen or Python/Django [closed]
I am about to start the coding phase of a fairly large project and am trying to decide on a programming language/framework. It is a clinical healthcare application that will be used by various ...