Re: How to filter FOO_set in templates?

2008-08-23 Thread Garrett Garcia
On Sat, Aug 23, 2008 at 11:50 AM, Benjamin Buch <[EMAIL PROTECTED]> wrote: > > Am 22.08.2008 um 23:15 schrieb Garrett Garcia: > > How about: > > songs = Recording.objects.filter(song__title__startswith='R', > represents_song=True) > > http://www.dja

Re: How to filter FOO_set in templates?

2008-08-22 Thread Garrett Garcia
On Fri, Aug 22, 2008 at 3:24 AM, Benjamin Buch <[EMAIL PROTECTED]> wrote: > > > > > I'm not sure i understand you question. You can filter via the > > attributes of a related object like this: > > Recording.objects.filter(song__artist="Ben Folds") > > Yes, and that's perfectly all right when you

Re: Text Parsing Question

2008-08-21 Thread Garrett Garcia
On Thu, Aug 21, 2008 at 6:15 PM, Tim Chase <[EMAIL PROTECTED]>wrote: > > > So i'm working on a view that will need to parse character > > strings that will have a predictable structure, but dynamic > > content. The format will look like > > "%Zxx^xx?;xx? where all

Re: How to filter FOO_set in templates?

2008-08-21 Thread Garrett Garcia
On Wed, Aug 20, 2008 at 11:17 PM, Benjamin Buch <[EMAIL PROTECTED]> wrote: > > > Hi Garret, > > > How about sending the template something like: > > > > songs = Recording.objects.filter(represents_song=True) > > > > A custom manager seems like overkill for this situation (If I'm > > understanding

Re: how to locate the OS currently logged in user??

2008-08-20 Thread Garrett Garcia
On Wed, Aug 20, 2008 at 9:53 AM, PeteDK <[EMAIL PROTECTED]> wrote: > > > > On 20 Aug., 17:56, "Emily Rodgers" <[EMAIL PROTECTED]> wrote: > > > -Original Message- > > > From: django-users@googlegroups.com > > > [mailto:[EMAIL PROTECTED] On Behalf Of Steve Holden > > > Sent: 20 August 2008 1

Re: How to filter FOO_set in templates?

2008-08-19 Thread Garrett Garcia
How about sending the template something like: songs = Recording.objects.filter(represents_song=True) A custom manager seems like overkill for this situation (If I'm understanding you right). - Garrett On Sat, Aug 16, 2008 at 2:34 PM, Benjamin Buch <[EMAIL PROTECTED]> wrote: > > I have a many

Re: Importing data from 'MS Access' .mdb files

2008-06-09 Thread Garrett Garcia
Ganesh, I just had to tackle the same problem in a django project. I'm sure this isn't the best solution but it works if you don't have access to a Windows machine. Download and install the mdb-tools package: http://mdbtools.sourceforge.net/ In my app I run the mdb-export program from python an

Memory Usage/Optimization Question

2008-04-05 Thread Garrett Garcia
I recently got my first django project set up on webfaction and am feeling the constraint of their memory usage limits. For example: I have a view that returns a list of objects: def get_meet_results(request, meet_id): meet = Meet.objects.get(pk=meet_id) year = meet.start.year result_