Re: Renaming apps.has_app

2014-01-05 Thread Luc Saffre
On 06/01/14 00:26, Aymeric Augustin wrote: > On 5 janv. 2014, at 22:54, Shai Berger wrote: > >> I'd go for __contains__: >> >> if "django.contrib.auth" in apps: > > I considered this one but I didn’t select it because it will restrict our > freedom in the future. > >

New to Django - Question: All registered users to post content...

2014-01-05 Thread Retnuh
I am new to Django (converted from Drupal) and trying to learn Django first before I dive into converting my site over from HTML,CSS and JS to use Django and Python. I have a question though. I am going through the Django Tutorial and came across where it said this:

Re: Schema editor changes feedback request

2014-01-05 Thread Michael Manfre
Thanks for the feedback. I've added answers to all of your questions and a few extra comments about why I did certain things. Feel free to ask more questions on the pull request or ping me on IRC. Regards, Michael Manfre On Sun, Jan 5, 2014 at 7:13 PM, Andrew Godwin wrote:

Re: Renaming apps.has_app

2014-01-05 Thread Russell Keith-Magee
On Mon, Jan 6, 2014 at 5:47 AM, Aymeric Augustin < aymeric.augus...@polytechnique.org> wrote: > On 5 janv. 2014, at 22:27, Josh Smeaton wrote: > > > The only thing I have against it is that it may sound like it can take > an iterable of app names, where has_app() does not

Re: Schema editor changes feedback request

2014-01-05 Thread Andrew Godwin
I've left some comments on the PR - the overall approach is fine, and I'm in favour of things like removing quote_parameter and adding params to the deferred_sql entries - but there's a few stylistic questions and I'm worried why you've removed the maximum index name length stuff. As for not

Re: Renaming apps.has_app

2014-01-05 Thread Jorge Cardoso Leitão
Hi. First of all, a hug to Aymeric for this, very nice work! My first thought was also on "is_installed", which seems natural. But, on my second thought, the "has_app" is not that bad because it is a method of the "app loading"; i.e. the apps "having" something makes sense than "being"

Re: Renaming apps.has_app

2014-01-05 Thread Curtis Maloney
On 6 January 2014 10:11, Shai Berger wrote: > On Sunday 05 January 2014 23:26:12 Aymeric Augustin wrote: > > If I were to add magic methods on the app registry I’d probably make it a > > dict of app_label => app_config. This is the most common use case. > > > > Then it would

Re: Renaming apps.has_app

2014-01-05 Thread Shai Berger
On Sunday 05 January 2014 23:26:12 Aymeric Augustin wrote: > On 5 janv. 2014, at 22:54, Shai Berger wrote: > > I'd go for __contains__: > > if "django.contrib.auth" in apps: > I considered this one but I didn’t select it because it will restrict our > freedom in the future.

Re: Renaming apps.has_app

2014-01-05 Thread Aymeric Augustin
On 5 janv. 2014, at 22:54, Shai Berger wrote: > I'd go for __contains__: > > if "django.contrib.auth" in apps: I considered this one but I didn’t select it because it will restrict our freedom in the future. If I were to add magic methods on the app registry I’d

Re: Renaming apps.has_app

2014-01-05 Thread Kevin Christopher Henry
+1 for "is_installed" I don't find the grammar objectionable here, just think of it as "is_(each one of these apps)_installed" On Sunday, January 5, 2014 3:50:45 PM UTC-6, Aymeric Augustin wrote: > > On 5 janv. 2014, at 22:38, Raffaele Salmaso > > wrote: > > > Should

Re: Renaming apps.has_app

2014-01-05 Thread Shai Berger
On Sunday 05 January 2014 22:47:22 Aymeric Augustin wrote: > On 5 janv. 2014, at 22:27, Josh Smeaton wrote: > > The only thing I have against it is that it may sound like it can take an > > iterable of app names, where has_app() does not have that problem. > What about

Re: Renaming apps.has_app

2014-01-05 Thread Aymeric Augustin
On 5 janv. 2014, at 22:38, Raffaele Salmaso wrote: > Should it takes a list of apps, just to replace > apps.is_installed('djagno.contrib.sites') and > apps.is_installed('django.contrib.admin') and ... > with > apps.is_installed('django.contrib.sites',

Re: Renaming apps.has_app

2014-01-05 Thread Raffaele Salmaso
On Sun, Jan 5, 2014 at 10:11 PM, Aymeric Augustin wrote: > `apps.has_app(...)` is technically correct but I think we can find a better > name. My current favorite is `apps.installed(…)`. It’s quite short and it’s > reminiscent of INSTALLED_APPS. That makes

Re: Renaming apps.has_app

2014-01-05 Thread Aymeric Augustin
On 5 janv. 2014, at 22:27, Josh Smeaton wrote: > The only thing I have against it is that it may sound like it can take an > iterable of app names, where has_app() does not have that problem. What about is_installed? -- Aymeric. -- You received this message

Re: Renaming apps.has_app

2014-01-05 Thread Josh Smeaton
+1 on .installed() as it reads quite well. The only thing I have against it is that it may sound like it can take an iterable of app names, where has_app() does not have that problem. app_installed() is more accurate but is longer and less nice to read. My 2 cents. Cheers, Josh -- You

Re: Renaming apps.has_app

2014-01-05 Thread Jannis Leidel
On 05.01.2014, at 22:11, Aymeric Augustin wrote: > Hello, > > During the app_loading refactor, I introduced a method to test if a given > application is enabled, and I named it `has_app`. > > Its main uses are detecting misconfigurations: > >if

Renaming apps.has_app

2014-01-05 Thread Aymeric Augustin
Hello, During the app_loading refactor, I introduced a method to test if a given application is enabled, and I named it `has_app`. Its main uses are detecting misconfigurations: if not apps.has_app('django.contrib.admin'): raise ImproperlyConfigured("Put

Re: Saving deleted code from Django source code

2014-01-05 Thread Vajrasky Kok
On Friday, December 27, 2013 8:23:06 AM UTC+8, Russell Keith-Magee wrote: > > > Django itself is licensed under the BSD license. This license allows you > to produce derivative works, provided you comply with the terms of the BSD > license. That means you can apply whatever *additional* terms