Re: how do I exlude big fields from long listings?

2006-07-06 Thread GrumpySimon
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

Re: how do I exlude big fields from long listings?

2006-07-06 Thread GrumpySimon
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

Re: Guidance would be most welcome

2006-06-15 Thread GrumpySimon
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

Re: Uploading a file

2005-12-04 Thread GrumpySimon
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

Re: problem marketing django to php folk

2005-11-26 Thread GrumpySimon
I created 631 ( http://code.djangoproject.com/ticket/631 ) a few months ago for this very reason :-) --Simon

Re: 20 minute wiki, sortof.

2005-11-21 Thread GrumpySimon
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

Handling Multiple Databases/Application Domains?

2005-10-15 Thread GrumpySimon
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

Re: MySQL problem

2005-09-02 Thread GrumpySimon
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