Re: trunk broken since [6402]

2007-09-24 Thread Joseph Heck
On 9/22/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > - Have we got any documentation pointing to the existence of the > buildbot? I was thinking that it should be mentioned somewhere on the > 'how to contribute' page. > > - The build last night ([6407]) should have passed, but the

Re: why create and get_or_create can't use id to set foerign key ?

2007-09-24 Thread Yuri Baburov
2007/9/24, 张沈鹏(电子科大08年本科应届) <[EMAIL PROTECTED]>: > why create and get_or_create can't use id to set foerign key ? > > for example I can't write like below: > > Star.objects.get_or_create(user=request.user,title_id=title_id) > > I have to write like this: > > try: >

Re: why create and get_or_create can't use id to set foerign key ?

2007-09-24 Thread James Bennett
On 9/24/07, 张沈鹏(电子科大08年本科应届) <[EMAIL PROTECTED]> wrote: > why create and get_or_create can't use id to set foerign key ? Read the documentation for 'get_or_create', specifically for the 'defaults' keyword argument it accepts. -- "Bureaucrat Conrad, you are technically correct -- the best kind

Django Models

2007-09-24 Thread Sebastien Lannez
Hi, I've seen something which is not very "concept proof"... at least in SQLLite ( hasn't been tested on PostgreSql or MySql ) >>> class A(Models.models): ... name = CharField(primaryKey=True) ... field_1 = CharField() ... >>> class B(A) ... field_2 = CharField ... Django will then build

Re: Django Models

2007-09-24 Thread James Bennett
On 9/24/07, Sebastien Lannez <[EMAIL PROTECTED]> wrote: > Is it a limitation of SQLLite ? If not, how can we implement this > mapping ? Django does not currently support any form of subclassing or inheritance for model classes. Please search the archives of this list, the django-developers list,

Re: Django Models

2007-09-24 Thread Ludovico Magnocavallo
James Bennett wrote: > > Django does not currently support any form of subclassing or > inheritance for model classes. Please search the archives of this > list, the django-developers list, or the Django Trac instance if you > would like more information on this topic. I have always read that

Re: Django Models

2007-09-24 Thread James Bennett
On 9/24/07, Ludovico Magnocavallo <[EMAIL PROTECTED]> wrote: > I have always read that Django does not support model inheritance or > subclassing, but in my experience some forms of it work. Take the > following for example, straight from a running app: It used to work in older versions of

Re: Django Models

2007-09-24 Thread Ludovico Magnocavallo
James Bennett wrote: > > It used to work in older versions of Django. Right now it is not > supported, and it is probably quite dangerous to the integrity of your > data to rely on things which accidentally "sort of work" due to the > remains of the legacy system. Again: this is not currently

Re: Looking for discussion on #5535

2007-09-24 Thread Simon Litchfield
James Bennett said the following: > >>> my_id = 3 > >>> UserProfile.objects.create(user_id=my_id) #works > >>> UserProfile.objects.get(user__id=my_id) # works > >>> UserProfile.objects.get_or_create(user__id=my_id, defaults={'user_id': > >>> my_id }) #works That's it, right there in a

Re: Looking for discussion on #5535

2007-09-24 Thread Simon Litchfield
Gary Wilson wrote: > This is a tricky way around django.db.models.base.Model.__init__'s current > enforcement of the foreign key field (without the _id) wanting an instance, > but shouldn't be needed if we implement the above (meaning create() would act > like get() in that you could pass either

Re: #4796 - Needs an expert's eye.

2007-09-24 Thread Andrew Durdin
On 9/23/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Previously, I've wondered about pulling string_concat out of trans_real > and into __init__, since it doesn't depend on the USE_I18N setting at > all. That piece of tidying would avoid some of these problems, too, so I > think I'll do

Re: Looking for discussion on #5535

2007-09-24 Thread James Bennett
On 9/24/07, Simon Litchfield <[EMAIL PROTECTED]> wrote: > That's it, right there in a nutshell. Empty your head of Django for a > second, have another look; do you not see the inconsistency there? No :) As I see it, the existence of the "somefieldname_id" property is an implementation detail of

Re: Looking for discussion on #5535

2007-09-24 Thread Michael Radziej
On Mon, Sep 24, James Bennett wrote: > As I see it, the existence of the "somefieldname_id" property is an > implementation detail of ForeignKey -- the data comes back as part of > the row we select, and we need to stick it somewhere. Ehm ... does this mean that this might change, or is this

newforms-admin still broken?

2007-09-24 Thread andybak
Hi, As far as I can tell newforms-admin has been broken for the last week. Add and change pages are broken for most objects (I think any with a foreign key) and the error given is something like: TypeError at /admin/cms/keyword/add/ instancemethod expected at least 2 arguments, got 0 It appears

Re: newforms-admin still broken?

2007-09-24 Thread Jacob Kaplan-Moss
On 9/24/07, andybak <[EMAIL PROTECTED]> wrote: > If it's going to be a while before this gets fixed is would it be > worth renaming 5505 so it is easier for people to find and maybe > update the patch so that it can be applied directly to the latest SVN > version? Please do rename the ticket and

BlogRush: a best way to increase your blog traffic

2007-09-24 Thread harry
Join here: http://www.blogrush.com/r18502062 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from

Rev 6164 breaks HTTPS redirects

2007-09-24 Thread Jeffrey Froman
Hello, As of revision #6164, when accessing my site over HTTPS, all redirects are being sent to plain HTTP urls. It seems that this is because build_absolute_uri() uses request.is_secure() to determine if the absolute url should be secure, and request.is_secure() makes its determination based

Re: changeset 6391

2007-09-24 Thread Joseph Kocherhans
On 9/20/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > My initial reaction to the problem was to think about adding an 'app > prefix' when you deploy an app, much like a form prefix, that is > injected into the template context to affect the resolution of {% url > %} tags. However,

Ticket 5034 Discussion

2007-09-24 Thread [EMAIL PROTECTED]
I just want to bring this ticket up on the list for a little discussion. It relates to problems that are pretty large and involved so I was hoping to get some insight on the direction we want to go regarding the fix. Basically it boils down to the, this function doesn't have a reference to

Re: Ticket 5034 Discussion

2007-09-24 Thread Nicola Larosa
[EMAIL PROTECTED] wrote: > 5034 is my own ticket, and I have some views about why it should be > included anyway. But maybe I am just too attached to it :) Then be careful, sometimes Trac refuses attachments to tickets, and you may be left stranded in some nowhere land. -- Nicola Larosa -

Re: Looking for discussion on #5535

2007-09-24 Thread Collin Grady
James Bennett said the following: > 1. It breaks consistency with how we currently do things I still disagree with you there. It would only break consistency if it was actually crossing the relation and checking the ID field of the other table. Since it is *not* a cross-relation lookup, not

Re: newforms-admin still broken?

2007-09-24 Thread Joseph Kocherhans
On 9/24/07, andybak <[EMAIL PROTECTED]> wrote: > > As far as I can tell newforms-admin has been broken for the last week. > Add and change pages are broken for most objects (I think any with a > foreign key) and the error given is something like: > TypeError at /admin/cms/keyword/add/ >

Ticket #5172 discussion

2007-09-24 Thread vfoley
SmileyChris added a ticket to propose extending the for loop tag to support numerical looping. I posted a patch that adds such a capability and includes a few tests. Documentation is still lacking. Let me know what you think, here are some code examples: {% for i 1 to 5 %} {{ i }} {%

Re: Rev 6164 breaks HTTPS redirects

2007-09-24 Thread Ramiro Morales
On 9/24/07, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > > In WSGI indication of https is specified by: > > wsgi.url_scheme A string representing the "scheme" portion of the URL > at which the application is being invoked. Normally, this will have > the value "http" or "https", as