Sure, but it's very common (and good database etiquette) to want to get
a subset of fields from a set of rows and leave out unnecessary
information. This is really quite important when it comes to things
like blob fields.
It'd be very nice if the standard queryset could also take a
values-style
Unfortunately, this gives you a dictionary and not an object ( and so
you lose all the cool object methods like get_absolute_url, get_FOOsets
etc ). Is there a way around this I'm missing?
Malcolm Tredinnick wrote:
> Look at the .values() method on QuerySets ([1]). It will give you back a
> list
Why bother shuffling data between tables?
I've got a wiki app I've been working on (slowly - hoping to release
soon!), and I add a revision field ( IntegerField ), and just add a new
entry with revision+1. The latest version has the latest revision
number. Easy :-)
Then it's just a matter of som
I've been using something like this. I'm not sure if it's the best way
to do this ( everyone else - please correct me ), but the main idea id
that the file info will be in request.FILES.
# TEMPLATE:
File:
# VIEW:
def save_file( request ):
import os.path
# where to store files. Pro
I created 631 ( http://code.djangoproject.com/ticket/631 ) a few months
ago for this very reason :-)
--Simon
Excellent work David - I was tossing up between Django and Turbogears
for a few weeks before coming down on the Django side. Interesting to
see the differences between the two frameworks ( & I think the
Django-folks should chat to the Turbogears people too ).
Ian, etc: I've been slowly building a
Hi all,
Forgive me if this has been asked, but I went through both -users and
-developers and couldn't see anything similar.
So - is it possible to run django across multiple databases? The
project I'm working on at the moment has some rather
distinct/incompatible data sets, and I'd prefer to ru
This error often occurs when MySQL times out because the query's taking
too long.
At a guess this would be at the MySQL end of things - try running this
command at the mysql prompt:
SHOW VARIABLES LIKE 'wait_timeout';
You should get something like this:
+---+--+
| Variable_n
8 matches
Mail list logo