Re: How to create a new command in django-admin.py

2012-02-23 Thread Johan
Well I can think of a whole lot of ways in which this can be done 'better' :) ... But, I don't have the time to change django atm so I will have to live with it :) ... Thanks for the help ... On Feb 23, 4:14 pm, Tom Evans wrote: > On Thu, Feb 23, 2012 at 1:22 PM, Johan

Re: How to create a new command in django-admin.py

2012-02-23 Thread Johan
Nope there is not. I just thought it could be done as easily as for manage.py. Thanks On Feb 23, 4:13 pm, Jani Tiainen wrote: > 23.2.2012 15:22, Johan kirjoitti: > > > Hi > > > I know how to create a new command in manage.py, this link explains it > > nicely > >

Re: Revisiting multiline tags

2012-02-23 Thread Russell Keith-Magee
On 24/02/2012, at 12:18 PM, colinta wrote: > 1) It's an easy fix. > 2) It's backwards compatible. > 3) It has no impact on performance. > 4) LOTS of people want it. > > and most importantly > > 5) We could stop asking for it. > > This issue is such an easy "sure, why not!?" > > Please, O

Re: Revisiting multiline tags

2012-02-23 Thread colinta
1) It's an easy fix. 2) It's backwards compatible. 3) It has no impact on performance. 4) LOTS of people want it. and most importantly 5) We could stop asking for it. This issue is such an easy "sure, why not!?" Please, O benevolent dictators, listen to the populous, and heed their cry. --

Patch https://code.djangoproject.com/ticket/17756 ready for review

2012-02-23 Thread Daniel Sokolowski
Your guidance is required! Would someone be kind enough and take a look at https://code.djangoproject.com/ticket/17756 and provide feedback. Thank you -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to

django.contrib.gis.measure

2012-02-23 Thread Ric
i've opened a ticket for a small issue in module django.contrib.gis.measure the MeasureBase class cannot be subclassed easily, so i've write a new MeasureBase class to allow developers to implement other Measure class (like weight, currency and so on) the code it's here

Re: HttpRequest.read(), HttpRequest.body, HttpRequest.raw_post_data

2012-02-23 Thread Carl Meyer
On 02/23/2012 09:40 AM, Tom Christie wrote: >> a design decision was made long ago that HttpRequest objects should > provide a file-like interface (thus also .readline(), .readlines(), and > .xreadlines()) > > Wouldn't having .read() .readline(), .readlines(), and .xreadlines() all > on

Re: Improving docs for User.is_authenticated()

2012-02-23 Thread Carl Meyer
On 02/23/2012 09:42 AM, Luke Granger-Brown wrote: > It does prove that they've authenticated, in that request.user will > contain an AnonymousUser if they're not logged in, which overrides this > method to always return False. If they are, then they'll get their > actual user, which will return

Re:Improving docs for User.is_authenticated()

2012-02-23 Thread Luke Granger-Brown
> > > > Obviously, this function cannot change in behaviour or name, so I > > suggest altering the docs, dropping the clause about indicating that > > the user has provided username and password to make it clearer what > > this method does. > > It does prove that they've authenticated, in that

Re:Improving docs for User.is_authenticated()

2012-02-23 Thread Luke Granger-Brown
On Feb 23, 2012 3:41 PM, "Tom Evans" wrote: > > Hi all > > I don't like this function that much. It doesn't actually check > whether users are authenticated - which is to say, they have presented > credentials which we have accepted and authorized them to use to the >

Re: HttpRequest.read(), HttpRequest.body, HttpRequest.raw_post_data

2012-02-23 Thread Tom Christie
> a design decision was made long ago that HttpRequest objects should provide a file-like interface (thus also .readline(), .readlines(), and .xreadlines()) Wouldn't having .read() .readline(), .readlines(), and .xreadlines() all on `request.body` provide a slightly cleaner interface, whilst

Re: Design decision on ticket #13223

2012-02-23 Thread Igor Sobreira
When I said "user", I actually meant "developer", "django user"... sorry for the confusion :] When pre-filling the form to display the "clone" page we can provide a method the developer can override to copy the files on disk, or change anything he wants (for example, change unique fields like

Re: Improving docs for User.is_authenticated()

2012-02-23 Thread Carl Meyer
Hi Tom, On 02/23/2012 08:41 AM, Tom Evans wrote: > I don't like this function that much. It doesn't actually check > whether users are authenticated - which is to say, they have presented > credentials which we have accepted and authorized them to use to the > site. Instead it always returns

Re: HttpRequest.read(), HttpRequest.body, HttpRequest.raw_post_data

2012-02-23 Thread Carl Meyer
Hi Tom, On 02/23/2012 06:07 AM, Tom Christie wrote: > I see that as of 1.4 `HttpRequest.raw_post_data` is being marked as > "pending deprecation", and `HttpRequest.body` has been introduced. > This still leaves us with two ways to get at the request body - `.body` > and `.read()` > > If we're

Improving docs for User.is_authenticated()

2012-02-23 Thread Tom Evans
Hi all I don't like this function that much. It doesn't actually check whether users are authenticated - which is to say, they have presented credentials which we have accepted and authorized them to use to the site. Instead it always returns true. is_not_anonymous_user() may be a better name.

Re: How to create a new command in django-admin.py

2012-02-23 Thread Tom Evans
On Thu, Feb 23, 2012 at 1:22 PM, Johan wrote: > Hi > > I know how to create a new command in manage.py, this link explains it > nicely : > https://docs.djangoproject.com/en/dev/howto/custom-management-commands/#command-objects > . But how do I create new command which would

Re: How to create a new command in django-admin.py

2012-02-23 Thread Jani Tiainen
23.2.2012 15:22, Johan kirjoitti: Hi I know how to create a new command in manage.py, this link explains it nicely : https://docs.djangoproject.com/en/dev/howto/custom-management-commands/#command-objects . But how do I create new command which would be available in django- admin.py or in

Re: Revisiting multiline tags

2012-02-23 Thread Andre Terra
I think regardless of our personal preferences on the aesthetics on template tags, the final decision to split them in multiple lines should be made by users. If there are no cons in implementing such a change and the patch really is only six characters long, then it seems like a no-brainer to

How to create a new command in django-admin.py

2012-02-23 Thread Johan
Hi I know how to create a new command in manage.py, this link explains it nicely : https://docs.djangoproject.com/en/dev/howto/custom-management-commands/#command-objects . But how do I create new command which would be available in django- admin.py or in manage.py BUT without having to add the

HttpRequest.read(), HttpRequest.body, HttpRequest.raw_post_data

2012-02-23 Thread Tom Christie
I see that as of 1.4 `HttpRequest.raw_post_data` is being marked as "pending deprecation", and `HttpRequest.body` has been introduced. This still leaves us with two ways to get at the request body - `.body` and `.read()` If we're going to make the change of marking `raw_post_data` as