Re: Japanese Text Sort Order

2011-12-15 Thread JohnA
I just joined this group and this is the first thread I’m responding to so please bear with me as a newbie. The question posed by Denys Poulat on Dec 14 2011 is mostly answered at the beginning of the long thread that it now appears at the end of, particularly the responses of Tetsuya Morimoto and

Re: All models with FKs, M2Ms, or 121s pointing to a given model

2011-12-28 Thread JohnA
It's maybe not as rigorous as the explicitly _meta-based approach noted by Russ McGee, but I use straight introspection combined with a knowledge of naming conventions, as follows: # This function looks only at passed in object, not its derived subobjects # If you want items from the most derived

Is the django coummity converging on a preferred REST API package?

2012-01-06 Thread JohnA
I’ve looked on this group, stackoverflow and the web at large for indication that the django community is converging on a single REST API package that is “preferred” and a potential candidate for inclusion in a future django distribution. So far all I’ve seen is people saying positive or negative

Re: Is the django coummity converging on a preferred REST API package?

2012-01-07 Thread JohnA
two were not the last time I looked. > > On 6 Jan., 22:25, JohnA wrote: > > > > > I’ve looked on this group, stackoverflow and the web at large for > > indication that the django community is converging on a single REST > > API package that is “preferred” and a potenti

Re: How to make a single 'special' m2m relationship?

2012-01-09 Thread JohnA
I’m fairly new to Django but I worked through a similar problem a couple months ago. You say: >If I was doing this manually with SQL, I would probably make a table >especially for the m2m relationship, called "articles_tags", and this >table would have ariticle_ids linked to tag_ids, and then I'd

Re: Primary key for read-only models

2012-01-14 Thread JohnA
I think you can do what you want as long as you set your read-only model to managed=False in the Meta. You have to set some field to primary_key=True but it doesn’t have to actually be unique. To avoid situations where django will do something that will only work if it is unique you might want to

Re: Why can't erase this model object? "AssertionError: Question object can't be deleted because its id attribute is set to None."

2012-01-21 Thread JohnA
How are you finding these objects? That might point to the answer. Probably the likeliest explanation is that you are creating the objects but not saving them. On Jan 21, 12:31 pm, Chris Seberino wrote: > On Jan 21, 6:44 am, Tom Evans wrote: > > > Models are representations of rows in a databa

Re: Why can't erase this model object? "AssertionError: Question object can't be deleted because its id attribute is set to None."

2012-01-21 Thread JohnA
o get feteched. Maybe the problem is trying to delete something directly out of the queryset, or maybe you're somehow deleting the same record twice, or maybe django is somehow getting confused while performing the operation. -- John On Jan 21, 6:39 pm, Chris Seberino wrote: > On Jan 21, 2

Re: django docs __unicode__ return u'%s %s

2012-01-25 Thread JohnA
Just to fill in some more info, __unicode__ methods are also part of core python and just happen to appear a lot in django code because of its preference for 16-bit unicode strings (though I think the methods are actually mostly invoked in the admin). There is also a __str__ function for “ordina

Re: Models inheritance in django: how to change PK "_ptr_id" on "id"?

2012-02-09 Thread JohnA
Glad you were able to resolve your problem. I use multi-table inheritance a lot and so far it always "just works" without me having to worry about or fiddle with the internal ids that Django uses to connect the derived class rows to the base class ones. -- John On Feb 8, 1:25 pm, Artyom Chernetz

newbie on django 0.96

2007-03-26 Thread johna
I downloaded the latest release from django and followed the install instructions for windows. I am using windows 2000. Python 2.4 django 0.96. PostgreSQL 8.1 psycopg2. I then started the tutorial. I started to have problems with not being able to find modules such as django.core.management. I

Re: newbie on django 0.96

2007-03-26 Thread johna
Thanks for the time to reply. I installed django by copyong the packahe into site-packages. The w2k box uses ntfs and is just a local pc. No network setup except internet connection. I think what I will do is start clean and redo the tuturial. I'm still not too clear about what to pass for the

Re: newbie on django 0.96

2007-03-26 Thread johna
Joe Thanks for the info. I'm going to redo the tutorial and see where I get. John On Mar 27, 4:33 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > < > match the new templates and context variables. Change the template > > call from polls/detail.html to polls/poll_detail.html, and pass o