Django is an open source Web 2.0 application framework, written in Python. Its primary goal is to ease the creation of complex database-driven websites.
0
votes
1answer
7 views
Running a script through Django admin interface button/url
I am kinda new to python and Django as well so many things still confuse me!I have my Django admin interface with a database on it!
The thing i want to do now is the following:
I want to be able to ...
0
votes
1answer
4 views
Django Error:: global name 'HttpRequestRedirect' is not defined
I am getting this error, I tried working on it a lot but cannot understand whats wrong.
I am basically trying to make a signup registration that has a couple of forms to be filled
Request Method: GET
...
0
votes
0answers
5 views
create child extjs iframe
I am working with django and extjs. I create a html page in extjs iframe like that
items:[ {
html:'<iframe src="/page/object/" width="100%" height="100%"></iframe>'
}],
the ...
0
votes
0answers
14 views
Not able to send email - Django
views.py
def report(request):
''''''''
if 'send_email' in request.POST:
subject, from_email, to = 'Parent Incident Notification',user.email, person.parent_email
...
0
votes
0answers
6 views
How to customise Django admin for subclasses depending of its type?
I have a simple inheritance at one of the models
class ParentClass(models.Model):
attribute1 = models.CharField()
attribute2 = models.CharField()
......
child_type_choices = (ChildClass1, ...
1
vote
0answers
9 views
WSGIScriptAlias & DjangoCMS url rewriting
I have a django cms site on my VM and a wordpress.
To go to the wordpress site : xx.xx.xx.xx/wordpress, this works fine, thanks to the alias.
To go to the djangoCMS site : xx.xx.xx.xx/djangocms
And ...
0
votes
1answer
11 views
Celery: Running tasks when they are modular
I am using celery to run scheduled tasks in django. My tasks are in tasks.py .
The thing if I break my function to smaller ones like this :
@periodic_task(run_every=crontab())
def run_something():
...
0
votes
0answers
6 views
Django recommended structure TastyPie
Using TastyPie (API framework for Django) what is the recommended file structure (or in your opinion).
Have a different resources in each app something like this:
app1
models.py
resources.py
...
1
vote
1answer
11 views
how to add a condition of comparing two fields of the model itself in Django model query
As mentioned by the title, in Django:
Say I have a model name QuestionRecord, with two fields: full_score and actual_score.
I want to realize the SQL:
select * from QuestionRecord as QR where ...
0
votes
0answers
20 views
Postgresql: Query 10x slower in a different client
Looking at the postgres server log, I see that the exact same query on the same postgres server takes much longer (about 10x longer) when invoked from a Linux client or from a Windows client.
The ...
0
votes
1answer
23 views
Calling Django from C++ using Python.h
I need to call Django functions from C++ and get their output in my C++ code.
As you know, Django is used by calling the Manage.py Python script with the wanted function as first parameter and ...
0
votes
0answers
17 views
Django crashes when illegal characters are entered in a form?
I am giving the invalid keyword like this in a search form:
汉字/漢字
I use the search value to query in the database. I get the following exception:
Traceback:
File ...
0
votes
0answers
8 views
Are the default values for the different Django model fields documented somewhere?
In this part of the south documentation it says
"some columns don’t have a default defined".
Which model fields get a default value when syncdb is used and which don't? (The South documentation ...
2
votes
1answer
20 views
Inefficient SQL query while excluding results on QuerySet
I'm trying to figure out why django ORM has such strange (as I think) behaviour. I have 2 basic models (simplified to get the main idea):
class A(models.Model):
pass
class B(models.Model):
...
0
votes
0answers
14 views
django ORM performance when using paginator with normal lists
Long story short, I am using polymorphic models and some queries I just cannot do as normal, so I have to convert the query result into a normal list. Then use the paginator to page results.
To put ...