Re: Getting related data...

2008-01-01 Thread lispingng
maybe you'll use a set on the result so you don't have duplicates, a least i think so.. On Jan 1, 2:04 am, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote: > There's probably an easier/more efficient way to do it, but you can do > > services = [] > for p in Profile.objects.all(): >     services += p.ser

Re: Using CheckboxSelectMultiple

2007-12-24 Thread lispingng
Hi Alex, I read through your post but am not very clear what you are trying to achieve. you have these choices and you want users to select multiple options, right? now for your model/database, do you plan to store all these options in the same credentials field, or you'll have another table hold

Re: newforms and many objects instances

2007-12-24 Thread lispingng
I have had a similar problem (prolly still do). I actually used code like this ResultForm = forms.form_for_model(Result) result_forms = [] for i in range(num_forms): form = ResultForm(prefix=str(i)) result_forms.append(form) which will convert names of each form's widget like this; name

Re: ModelForm, ImageField and User

2007-12-24 Thread lispingng
i think you should look at using threadlocals to access users outside the request instead of sending the user id in a hidden field. http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser quite straightforward On Dec 24, 2:10 am, l5x <[EMAIL PROTECTED]> wrote: > class Photo(models.Model):

Re: exporting related data without killing the db

2007-11-27 Thread lispingng
t; clear and concise SQL/SQL processing code. > > JJ. > > On Nov 26, 11:56 am, lispingng <[EMAIL PROTECTED]> wrote: > > > Hi, > > I am working on a large project that requires i export applications to > > csv. > > the problem is the Application model ha

exporting related data without killing the db

2007-11-26 Thread lispingng
Hi, I am working on a large project that requires i export applications to csv. the problem is the Application model has about six foreignkey fields including one to the Profiles model. also there are two backward relations to the Application models as well in other words the model structure is a

Re: learning django and python

2007-11-13 Thread lispingng
sebey: a python overview you can go through in an hour or 2 is byteofpython. it's very short, and though u wont get everythng in it, it gives you a feel for what python is about. i lso find reading the django code can be very informative (after u have got some python under your belt) you can get

Re: Django profiler to find a project weak spots

2007-11-13 Thread lispingng
hey, i have been rather interested in the profiling of my django apps (i'm a not-very-newbie) will look at it and provide useful (i sincerely hope) feedback On Nov 12, 6:23 pm, Dima Dogadaylo <[EMAIL PROTECTED]> wrote: > Hi, > > I wrote a Django pofiler that can be used to find weak performance >

Re: Plz, I am just new to Python...

2007-10-10 Thread lispingng
actually django templates look more like php smarty templates. i also am from php and am new to django. i don't think installing django on windows is such a big deal. i just unzipped the tar and copied it to the python25\lib\site-packages \ folder and that was it (i think) On Oct 4, 9:52 pm, John