Re: Using a signal to update a counter cache??

2007-12-01 Thread Tane Piper
Hi Simon, Ok - I checked that out, but I'm still unsure on something, in that example you have self.thread within in the Reply save. I've tried applying the same way to my model like this: def save(self): if not self.slug: self.slug = slugify(self.title) super(Leaf,

Newbie question.

2007-12-01 Thread walterbyrd
I am trying to work through the tutorial. Everything seems to work. But, when I run: $ python manage.py validate polls I get: Error: Command doesn't accept any arguments The error does not make any sense to me. I am using djangodomain.com for my django environment. I am using django 0.96, and

Another question about the tutorial

2007-12-01 Thread walterbyrd
This is driving me nuts. Here is what I'm getting: >>> from djangoproject.polls.models import Poll, Choice >>> Poll.objects.all() [, ] I have no idea why I'm getting twice. It's a big problem. This is the models.py file, that I modified according to the instructions in the tutorial: -- [djan

Re: Newbie question.

2007-12-01 Thread Karen Tracey
On 12/1/07, walterbyrd <[EMAIL PROTECTED]> wrote: > > > I am trying to work through the tutorial. Everything seems to work. > But, when I run: > > $ python manage.py validate polls > > I get: > > Error: Command doesn't accept any arguments > > The error does not make any sense to me. I am using dja

Re: Another question about the tutorial

2007-12-01 Thread Karen Tracey
On 12/1/07, walterbyrd <[EMAIL PROTECTED]> wrote: > > > This is driving me nuts. > > Here is what I'm getting: > > >>> from djangoproject.polls.models import Poll, Choice > >>> Poll.objects.all() > [, ] > > I have no idea why I'm getting twice. It's a big > problem. > > This is the models.py file,

Re: Another question about the tutorial

2007-12-01 Thread Rick Dooling
On Dec 1, 11:27 am, walterbyrd <[EMAIL PROTECTED]> wrote: > This is driving me nuts. > The tutorial also gave me fits whether I used .95 or .96. I eventually bagged it. I had much better luck with the book. Simpler, and more of the exercises actually work. http://www.djangobook.com/en/beta/ Ri

Re: low-level cache & pagination

2007-12-01 Thread Doug B
It might depend on your cache setting in setting.py, and the devserver reloading on file change. I've had that happen and confuse things a bit. Going straight to memcache or file based for low level caching development was the only way to get consistent. There are also some limitations on the s

Re: Newbie question.

2007-12-01 Thread walterbyrd
On Dec 1, 10:47 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On 12/1/07, walterbyrd <[EMAIL PROTECTED]> wrote: > > Are you sure you are using 0.96? How do I find out? At djangodomain, django comes pre-installed. I thought the default install was 0.96, but I could be wrong. --~--~-~--

Re: Another question about the tutorial

2007-12-01 Thread walterbyrd
Thanks Karen, and thanks Rick. You guys are a big help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this

Re: Newbie question.

2007-12-01 Thread Karen Tracey
On 12/1/07, walterbyrd <[EMAIL PROTECTED]> wrote: > On Dec 1, 10:47 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > On 12/1/07, walterbyrd <[EMAIL PROTECTED]> wrote: > > > > Are you sure you are using 0.96? > > How do I find out? At djangodomain, django comes pre-installed. I > thought the defau

Re: Newbie question.

2007-12-01 Thread Karen Tracey
On 12/1/07, Karen Tracey <[EMAIL PROTECTED]> wrote: > > I know nothing of djangodomain so have no idea what version they offer. OK, so I got curious and consulted my friend Google. This page: http://www.djangodomain.com/pages/Info/ says that unless you specifically request an older version, yo

Re: Using a signal to update a counter cache??

2007-12-01 Thread Tane Piper
Ok, I've fixed it now. Instead of trying to save the value, I show the value on my list page: def num_leafs(self): return self.leaf_set.count() num_leafs.short_description = "Number of Leafs" Thanks for your help anyway. On Dec 1, 2007 3:40 PM, Tane Piper <[EMAIL PROTECTED]> wrote:

Do away with django's support for python 2.3?

2007-12-01 Thread AmanKow
I am curious as to whether the django community cannot comfortably do away with support for python 2.3 in the effort towards django 1.0. There were significant changes made between python 2.3 and 2.4, and continuing support of 2.3 in the django code base is a significant restriction. As django 1.

Re: Do away with django's support for python 2.3?

2007-12-01 Thread Malcolm Tredinnick
On Sat, 2007-12-01 at 12:25 -0800, AmanKow wrote: > I am curious as to whether the django community cannot comfortably do > away with support for python 2.3 in the effort towards django 1.0. > There were significant changes made between python 2.3 and 2.4, and > continuing support of 2.3 in the d

Re: Do away with django's support for python 2.3?

2007-12-01 Thread AmanKow
Thanks for the response, Malcolm! On Dec 1, 3:54 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2007-12-01 at 12:25 -0800, AmanKow wrote: > > I am curious as to whether the django community cannot comfortably do > > away with support for python 2.3 in the effort towards django 1.0. >

Need Help Iterating Through a Form With HTML Interspersed

2007-12-01 Thread machineghost
First off thanks in advance for any help you can provide. My problem is that I have a very long form with a very repetitive layout: {{ field.label }} {{ field }} which should in theory be perfect for wrapping inside a {% for field in form %} {% endfor %} loop; right? Except there's one pro

Re: Need Help Iterating Through a Form With HTML Interspersed

2007-12-01 Thread machineghost
P.S. I also tried using {% ifequals field.__repr__ form.field1.__repr__ %} to compare the objects, but Django (intelligently) prevents you from accessing __ methods in templates. On Dec 1, 3:17 pm, machineghost <[EMAIL PROTECTED]> wrote: > First off thanks in advance for any help you can provide

Re: Need Help Iterating Through a Form With HTML Interspersed

2007-12-01 Thread Karen Tracey
On 12/1/07, machineghost <[EMAIL PROTECTED]> wrote: > > > First off thanks in advance for any help you can provide. My problem > is that I have a very long form with a very repetitive layout: > > {{ field.label }} > {{ field }} > > which should in theory be perfect for wrapping inside a {% f

Re: Do away with django's support for python 2.3?

2007-12-01 Thread Kenneth Gonsalves
On 02-Dec-07, at 1:55 AM, AmanKow wrote: > So, the question is "Does django 1.0 need to continue support for > python 2.3?" yes it does - servers are always slow to upgrade for the reason is that if it is not broken, it is better not to fix it. So there are lots of servers out there still o

see the marvelous educational site : www.a2zlearning.org

2007-12-01 Thread Sree Santh
Register with a2zlearning and get: More than 1000 electronic book Lecture notes for Arts, Commerce, Science, Management Multiple Choice Questions for Competitive Exams Case Studies for Management Aspirants Slide Shows on various subjects Kids Games, Software, Comic books etc. U need something mor

Re: Need Help Iterating Through a Form With HTML Interspersed

2007-12-01 Thread machineghost
> (You did remember to pass in 'firstSetOfFields' as a variable in your > template context, right?). *sigh* Sadly, I didn't; as soon as I did everything worked fine; thanks. Jeremy On Dec 1, 4:26 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On 12/1/07, machineghost <[EMAIL PROTECTED]> wrote:

Dynamically adding methods to Widget instance

2007-12-01 Thread Michael Elsdörfer
I just spent the last 5 hours debugging this, what a nightmare ;) I recently updated from around rev. ~5600 to the latest trunk. Before the update, I was doing this: # wrap render method MyFormClass.base_fields['fieldname'].widget.render = new.instancemethod() ... myform = MyFormClass() ..

Re: Do away with django's support for python 2.3?

2007-12-01 Thread Darryl Ross
AmanKow wrote: > I am curious as to whether the django community cannot comfortably do > away with support for python 2.3 in the effort towards django 1.0. RHEL4 (and hence CentOS 4) still uses 2.3.4. I do not know what the other commercially supported distros are running, but I would imagine the

hierarchical constraints (country/city) and form validation?

2007-12-01 Thread Mark Green
Hello djangoics, I'd like to ask for the opinion of some django veterans on a task that I imagine to be a fairly common one. My site allows the user to set a country and city as part of their UserProfile. Obviously the city-field should only allow values that are valid within the context of the

Re: Do away with django's support for python 2.3?

2007-12-01 Thread Sean Perry
AmanKow wrote: >> Also, in practice, there are a *lot* of >> installations still running Python 2.3. Sometimes it's just not >> convenient to upgrade your Python installation every couple of years. > > I understand that. But, with 2.6 coming soon and 3.0 on the horizon, > it seems that continue