Re: Non-default managers in related field lookups

2012-06-01 Thread Russell Keith-Magee
On Fri, Jun 1, 2012 at 7:08 PM, Anssi Kääriäinen wrote: > On Jun 1, 1:43 pm, Russell Keith-Magee > wrote: >> > Just as a bike-shedding thought: Would it be possible to have >> > frank.events.confirmed.all() as the syntax? I see this a tiny bit >> > cleaner. On

Re: Non-default managers in related field lookups

2012-06-01 Thread Russell Keith-Magee
On Sat, Jun 2, 2012 at 1:54 AM, Jeremy Dunck wrote: > On Fri, Jun 1, 2012 at 2:26 AM, Russell Keith-Magee > wrote: >> On Fri, Jun 1, 2012 at 8:53 AM, Jeremy Dunck wrote: > ... >>> Candidate.context('site') would return a manager depending on the >

Draft branch: Swappable User models in contrib.auth

2012-06-04 Thread Russell Keith-Magee
Hi all, Following the BDFL pronouncement of a preferred option for customisable User models in contrib.auth [1], I've just pushed a branch to Github that contains a draft implementation [2]. It's not ready for trunk quite yet, but you can use this code to set up a custom User model, and then log

Re: Draft branch: Swappable User models in contrib.auth

2012-06-05 Thread Russell Keith-Magee
On Tue, Jun 5, 2012 at 3:56 AM, Anssi Kääriäinen wrote: > On Jun 4, 6:12 pm, Russell Keith-Magee > wrote: >>  * The swapping mechanic is set up using a new Meta option on models >> called 'swappable' that defines the setting where an alternate model >> can be d

Re: Draft branch: Swappable User models in contrib.auth

2012-06-05 Thread Russell Keith-Magee
On Tue, Jun 5, 2012 at 9:00 PM, Anssi Kääriäinen wrote: > Understood & agreed (the "this model is dynamic made explicit" part > seems really important specifically). > > I am afraid of the hard-coding of meta.swappable must be 'SOME_VAR' > which then references settings.SOME_VAR, and that this is

Re: Draft branch: Swappable User models in contrib.auth

2012-06-07 Thread Russell Keith-Magee
On Thu, Jun 7, 2012 at 7:48 PM, Anssi Kääriäinen wrote: > On Jun 7, 11:57 am, Florian Apolloner wrote: >> Hi, >> >> On Wednesday, June 6, 2012 4:32:02 PM UTC+2, Anssi Kääriäinen wrote: >> >> > Still, yet another API idea: [snip] >> >> Then, Model.__new__ will replace the SwappableUser class with

Re: Draft branch: Swappable User models in contrib.auth

2012-06-08 Thread Russell Keith-Magee
On Fri, Jun 8, 2012 at 8:53 AM, Anssi Kääriäinen wrote: > On 8 kesä, 02:43, Russell Keith-Magee wrote: >> >  - For documentation: It should be suggested that the example MyUser >> > should define class Meta: swappable = 'AUTH_USER_MODEL'. Otherwise it >> >

Re: Draft branch: Swappable User models in contrib.auth

2012-06-10 Thread Russell Keith-Magee
On Fri, Jun 8, 2012 at 7:50 PM, Anssi Kääriäinen wrote: > On 8 kesä, 13:43, Russell Keith-Magee wrote: >> That's certainly an interesting use case. However, I can think of at >> least 2 ways it could be mitigated. >> >> One way would be to treat this as part of t

Re: Test runner with search

2012-06-15 Thread Russell Keith-Magee
On Thu, Jun 14, 2012 at 6:51 PM, Anssi Kääriäinen wrote: > On 14 kesä, 13:35, Chris Wilson wrote: >> I've made some improvements (in my view) to the DjangoTestSuiteRunner. I >> got tired of having to remember my test class names and of typing so much: >> >>   ./manage.py test binder.BinderTest.te

Re: Django-nonrel patches

2012-06-24 Thread Russell Keith-Magee
On Sun, Jun 24, 2012 at 10:31 PM, Adam "Cezar" Jenkins wrote: > I'm only lightly involved in the project, but there is some misinformation > going around about it. > > On Sun, Jun 24, 2012 at 5:47 AM, Daniel Greenfeld  wrote: >> >> >> >> We evaluated django-nonrel for use in projects and looked ag

Re: Proposal: unique by default on SlugFields

2012-06-27 Thread Russell Keith-Magee
On Wed, Jun 27, 2012 at 7:15 PM, Meshy wrote: > Perhaps it's just me, but I've very rarely wanted a SlugField that wasn't > unique. Would this not be a sensible default? I realise that a lot of apps > will rely upon this default, but objectively speaking would this not be > better? Perhaps this ch

Re: Proposal: Add support for PEP 302 importers

2012-06-29 Thread Russell Keith-Magee
On Fri, Jun 29, 2012 at 7:33 PM, bhuztez wrote: > Django makes assumptions about the filesystem layout of python > packages here and there, and will silently skip any app which does not > meet Django's assumptions without raise up any warning. I had been > bitten by this many times before I learne

Re: How to generate an edit form for django comments

2012-07-04 Thread Russell Keith-Magee
Hi Sachin, Django-Developers is a forum for discussing the development of Django itself, not for general user queries. General user queries should be posted to Django-users. You should also refrain from posting the same question to both lists. Yours, Russ Magee %-) On Wed, Jul 4, 2012 at 2:44 PM

Re: Emberjs Vs knockoutjs with django?

2012-07-10 Thread Russell Keith-Magee
Hi Anand, I can only assume you're really excited about this blog post, but please: 1) Don't cross post. Pick the right list, and post once. 2) Don't post things like this to Django-developers. This is a list for discussing the development of Django itself. Yours, Russ Magee %-) On Tue, Jul 1

Re: Customizable Serialization check-in

2012-07-11 Thread Russell Keith-Magee
On Wed, Jul 11, 2012 at 8:18 AM, Piotr Grabowski wrote: > Hi, > > It is time to midterm evaluation of my participation in gsoc so I want to > summarize in this check-in what I have done in last month. > https://gist.github.com/3085250 - here is something that can be > "documentation". I wrote some

Re: pre_init/post_init vs. performance

2012-07-14 Thread Russell Keith-Magee
On Sat, Jul 14, 2012 at 10:57 AM, Jeremy Dunck wrote: > I was poking around in our (Votizen's) use of signals and thinking > about making some tooling so that signal usage was a bit more > transparent. > > In doing so, I noticed that GenericForeignKey hooks the model pre_init > signal. It does th

Re: Optional operator index discussion

2012-07-18 Thread Russell Keith-Magee
On Thu, Jul 19, 2012 at 2:19 AM, Eric Floehr wrote: > I'd like to open up a discussion on the possibilities of having a way to > optionally specifying not to create operator indexes on CharField's when > db_index=True. Based on the consensus from this discussion, I'll open up a > ticket and if it

Re: Ticket 18685

2012-07-31 Thread Russell Keith-Magee
Hi Christopher, The process from here: 1) You convince someone else in the community to review your patch 2) They look at the patch, and mark it Ready for Checkin; or, they give you feedback, and you go back to step 1 3) Someone on the core team commits the patch. The "someone else" for ste

Re: Python 3 - style question

2012-08-09 Thread Russell Keith-Magee
On Fri, Aug 10, 2012 at 4:58 AM, charettes wrote: > I think this will only be an issue for django application maintainers. > > IMHO, projects target a specific version of python and won't have to provide > python 2-3 compatibility. Am I wrong? Yes and no. On the one hand -- yes. Jo(sephin)e Publ

Re: new syntax for management commands

2012-08-11 Thread Russell Keith-Magee
On Sun, Aug 12, 2012 at 5:26 AM, dffdgsdfgsdfhjhtre wrote: > https://github.com/zacharyvoase/django-boss > http://blog.zacharyvoase.com/2009/12/09/django-boss/ > > What is the outlook of something like this replacing the current way > management commands are handled by django? I'm no the author of

Re: new syntax for management commands

2012-08-12 Thread Russell Keith-Magee
On Sun, Aug 12, 2012 at 6:32 PM, Florian Apolloner wrote: > Hi, > > > On Sunday, August 12, 2012 2:22:58 AM UTC+2, Russell Keith-Magee wrote: >> >> I'll agree that it looks appealing. However, as always, my question is >> about backwards compatibility. &g

Re: new syntax for management commands

2012-08-13 Thread Russell Keith-Magee
On Mon, Aug 13, 2012 at 8:33 PM, Melvyn Sopacua wrote: > On 13-8-2012 1:54, Alex Gaynor wrote: > >> In my view, the current largest source of boilerplate with management >> commands is where they have to be, you have to stick them 3 directories >> deep. Writing a command itself is pretty boilerpl

Re: Breaking out localflavor

2012-08-16 Thread Russell Keith-Magee
On Fri, Aug 17, 2012 at 5:26 AM, Adrian Holovaty wrote: > I'd like to move all Django localflavor code into a separate package, > distributed separately from Django the framework. +1. I've had the exact same thought myself over the past couple of years. My hesitation historically has been the lim

Re: Breaking out localflavor

2012-08-16 Thread Russell Keith-Magee
On Fri, Aug 17, 2012 at 5:39 AM, Alex Gaynor wrote: > > > On Thu, Aug 16, 2012 at 9:38 PM, Russell Keith-Magee > wrote: >> >> On Fri, Aug 17, 2012 at 5:26 AM, Adrian Holovaty >> wrote: >> > PROPOSED SOLUTION >> > >> > I think it m

Re: Draft branch: Swappable User models in contrib.auth

2012-08-19 Thread Russell Keith-Magee
On Sun, Aug 19, 2012 at 10:02 AM, Victor Hooi wrote: > Hi, > > I'm just wondering, has there been any updates on the User model refactor? > > My understanding is that this is the official way of handling Users going > forward. > > Is there any roadmap on when it might hit trunk? I didn't see any r

Re: Draft branch: Swappable User models in contrib.auth

2012-08-19 Thread Russell Keith-Magee
On Sun, Aug 19, 2012 at 5:23 PM, Marc Tamlyn wrote: > I believe changes to auth (and several other things) are waiting for > contrib.migrations. It will be some time... Incorrect. The strategy that was approved for trunk won't require migrations unless you want to change an existing project, whic

Re: Help review tickets, get a prize!

2012-08-19 Thread Russell Keith-Magee
The problem is that we aren't in a position to guarantee that we have the resources to do this all the time. Rather than set the formal expectation that the 5-for-1 deal will always be available, I'd rather keep it as a "Sale now on!" feature that a core developer can announce when they find themse

Re: Draft branch: Swappable User models in contrib.auth

2012-08-20 Thread Russell Keith-Magee
On Mon, Aug 20, 2012 at 7:11 AM, Russell Keith-Magee wrote: > On Sun, Aug 19, 2012 at 10:02 AM, Victor Hooi wrote: >> Hi, >> >> I'm just wondering, has there been any updates on the User model refactor? >> >> My understanding is that this is the official

Re: Docs mistake

2012-08-20 Thread Russell Keith-Magee
Hi, Thanks for the report -- if you want to make sure this isn't forgotten, you should open a ticket and describe the fix you think needs to be made. Reporting to the mailing list is helpful, but is just as likely to get lost in someone's inbox. Yours, Russ Magee %-) On Tue, Aug 21, 2012 at 9:45

Re: Proposal: Signal connection via "my_app.MyModel"

2012-08-22 Thread Russell Keith-Magee
On Wed, Aug 22, 2012 at 1:17 PM, Yo-Yo Ma wrote: > Is there anyone else out there who doesn't like having to import models from > app X into app Y just so that app Y can connect post save signals to them? I can't say the need to import models to set up a signal has ever caused me any difficulty.

Re: Draft branch: Swappable User models in contrib.auth

2012-08-23 Thread Russell Keith-Magee
On Thu, Aug 23, 2012 at 10:16 PM, sergzach wrote: > The question about databases. > > Do I understand correctly that if we create a MyUser class (as in your > example) then extra fields (e.g. date_of_birth) will be stored in the same > table of a database with inherited fields (from AbstractBaseUs

Re: Customizable Serialization check-in

2012-08-24 Thread Russell Keith-Magee
Hi Piotr, Thank you so much for your efforts over the summer. I'd also like to apologise for my lack of communication; I certainly haven't been a model mentor over the course of the program. Although we may not have achieved all the goals we set out to achieve at the start of the program, I don'

Yak shaving the test framework on the way to pluggable user models (#3011)

2012-08-25 Thread Russell Keith-Magee
Hi all, So, I've been working on a Django branch [1] to implement the approach to pluggable user models that was decided upon earlier this year [2] [1] https://github.com/freakboy3742/django/tree/t3011 [2] https://code.djangoproject.com/wiki/ContribAuthImprovements The user-swapping code itself

Re: Yak shaving the test framework on the way to pluggable user models (#3011)

2012-08-25 Thread Russell Keith-Magee
On Sat, Aug 25, 2012 at 4:24 PM, Aymeric Augustin wrote: > On 25 août 2012, at 10:15, Russell Keith-Magee wrote: > >> We *could* just mark the affected tests that require auth.User as >> "skipUnless(user model == auth.User)", but that would mean some >> proj

Re: M2M with to_fields (ticket #18823)

2012-08-27 Thread Russell Keith-Magee
On Tue, Aug 28, 2012 at 3:11 AM, peter wrote: > I opened this ticket (https://code.djangoproject.com/ticket/18823) on the > Trac but thought i'd bring it up here to increase the likelihood of it > getting noticed. In short things don't quite work right when you have a m2m > field that uses a throu

Re: M2M with to_fields (ticket #18823)

2012-08-28 Thread Russell Keith-Magee
ll() > > It's not exactly a real world example though i think it demonstrates that > data loss is a possibility. > > Monday, August 27, 2012 5:33:03 PM UTC-7, Russell Keith-Magee wrote: >> >> On Tue, Aug 28, 2012 at 3:11 AM, peter wrote: >> > I opened th

Re: Auto-import support for models and other objects in shell

2012-08-28 Thread Russell Keith-Magee
I'm in complete agreement with Alex. -1 from me. Explicit is better than implicit, and to my mind, hiding imports just complicates the learning curve associated with Django's package tree. If you *really* want this, there are hooks into ipython et al that can do this; I don't see it as something a

Re: Yak shaving the test framework on the way to pluggable user models (#3011)

2012-08-29 Thread Russell Keith-Magee
On Wed, Aug 29, 2012 at 2:01 PM, ptone wrote: > > > On Saturday, August 25, 2012 5:32:08 PM UTC-7, Russell Keith-Magee wrote: >> >> On Sat, Aug 25, 2012 at 4:24 PM, Aymeric Augustin >> wrote: >> > On 25 août 2012, at 10:15, Russell Keith-Magee wrote: >>

Re: Future url tag behaves unexpectedly

2012-08-29 Thread Russell Keith-Magee
On Thu, Aug 23, 2012 at 10:17 PM, Klaas van Schelven wrote: > Hi all, > > I'm not really ready to post this as a bug, please help me correct any > possible misunderstandings before I do so. > > I was gently pushed towards the future url template tag due to my > screen filling up with DeprecationWa

Re: Models.py not loaded at server startup ?????

2012-09-02 Thread Russell Keith-Magee
… and this is exactly why the app-refactor has been a topic of discussion for several years. Hopefully we'll get a chance to thrash out some of the details this week at DjangoCon US; I know Preston (who has been working on the patch of late) is keen to discuss what he's done. Yours, Russ Magee %-)

#3011 - Custom User Models -- Call for final review

2012-09-15 Thread Russell Keith-Magee
Hi all, The implementation of custom User models is now ready for final review, prior to commit to trunk. The code is available in my Github repo, in the t3011 branch. https://github.com/freakboy3742/django/tree/t3011 The diff is available here: https://github.com/freakboy3742/django/compare/m

Re: #3011 - Custom User Models -- Call for final review

2012-09-15 Thread Russell Keith-Magee
On Sat, Sep 15, 2012 at 11:59 PM, Anssi Kääriäinen wrote: > On 15 syys, 15:34, Russell Keith-Magee > wrote: >> Hi all, >> >> The implementation of custom User models is now ready for final >> review, prior to commit to trunk. >> >> The code is availa

Re: #3011 - Custom User Models -- Call for final review

2012-09-15 Thread Russell Keith-Magee
On Sun, Sep 16, 2012 at 1:07 AM, Anssi Kääriäinen wrote: > On 15 syys, 18:59, Anssi Kääriäinen wrote: >> With the above commits I can do this: >> >> class MyUser(AbstractUser): >> employee_no = models.CharField(max_length=5) >> some_other_field = models.TextField(null=True, blank=True) >>

Re: #3011 - Custom User Models -- Call for final review

2012-09-16 Thread Russell Keith-Magee
ddress the feedback received to date Based on the feedback on the patch so far, it looks like we're on track to merge this later this week. Yours, Russ Magee %-) On Sun, Sep 16, 2012 at 7:15 AM, Russell Keith-Magee wrote: > On Sat, Sep 15, 2012 at 11:59 PM, Anssi Kääriäinen > wrote:

Re: #3011 - Custom User Models -- Call for final review

2012-09-16 Thread Russell Keith-Magee
On Sun, Sep 16, 2012 at 8:15 PM, Anssi Kääriäinen wrote: > On 16 syys, 02:15, Russell Keith-Magee > wrote: > Creating an admin class for no-added-fields extended user model is > somewhat straightforward, although the admin forms currently assume > the auth.User as the base user.

Re: #3011 - Custom User Models -- Call for final review

2012-09-18 Thread Russell Keith-Magee
On Wed, Sep 19, 2012 at 9:13 AM, Ben Slavin wrote: > Hi Russ, > > First, let me apologize for being a bit late to the party on this. If > there's been prior discussion of any of the points below kindly tell me to > get stuffed and so shall I do. You asked for it… :-) > Our team has been working

Re: ``models.BooleanField`` fields default to ``False`` when missing from fixtures

2012-09-24 Thread Russell Keith-Magee
On Tue, Sep 25, 2012 at 8:00 AM, Yo-Yo Ma wrote: > Developer of a pet shop software adds: > > feed_before_midnight = models.BooleanField() > > because they're planning on carrying baby gremlins... forgets to update the > zoological XML feed importer to use the "feed_before_midnight" value, and > t

Re: DatabaseFeatures and supports_transactions

2012-09-25 Thread Russell Keith-Magee
On Tue, Sep 25, 2012 at 11:24 PM, maxi wrote: > > > El martes, 25 de septiembre de 2012 09:05:47 UTC-3, Karen Tracey escribió: >> >> On Mon, Sep 24, 2012 at 10:15 PM, maxi wrote: >>> >>> Hi, >>> >>> DatabseFeatures class has a supports_transactions property for test if >>> the db engine support t

Re: Schema Alteration update

2012-09-27 Thread Russell Keith-Magee
On Wed, Sep 26, 2012 at 7:14 PM, Andrew Godwin wrote: > So, the patch [1] is looking alright, but after some consideration I think > it's going to be best to leave this until just after the 1.5 branch has > happened and then merge it in as part of the 1.6 cycle. > > My reasoning is thus: > > - Th

Re: Schema Alteration update

2012-09-27 Thread Russell Keith-Magee
On Fri, Sep 28, 2012 at 8:29 AM, Jacob Kaplan-Moss wrote: > On Fri, Sep 28, 2012 at 4:55 AM, Russell Keith-Magee > wrote: >> Have I missed part of the discussion here? At DjangoCon, South was >> still going to exist (as the "smarts" part of the problem) -- has th

Re: #3011 - Custom User Models -- Call for final review

2012-09-28 Thread Russell Keith-Magee
On Fri, Sep 28, 2012 at 8:14 PM, rizumu wrote: > > It is great to see this merged, it has been a long time coming. :) > > I would like to add backwards compatibility to some apps and I'm looking for > a recommended technique. Could the following, or a better option, find its > way into the docs in

Re: localflavor for Singapore

2012-09-28 Thread Russell Keith-Magee
Hi James, Thanks for the submission. Two quick points: 1) As we describe in our contributors guide, there's no need to post a message to django-dev letting us know you've opened a ticket. Trac has plenty of triggers and notifications to let people know about new tickets, including an email feed

Re: DatabaseFeatures and supports_transactions

2012-09-28 Thread Russell Keith-Magee
On Sat, Sep 29, 2012 at 5:27 AM, Andy Dustman wrote: > On Tue, Sep 25, 2012 at 7:57 PM, Russell Keith-Magee > wrote: >> On Tue, Sep 25, 2012 at 11:24 PM, maxi wrote: >>> No, I just answer because it caught my attention. Why not just trust in a >>> True/False pro

Re: URL dispatcher slow?

2012-10-11 Thread Russell Keith-Magee
On Thu, Oct 11, 2012 at 2:02 PM, Yo-Yo Ma wrote: > Why does every conversation about Django's performance met with "GTFO we > don't care"? (that was a rhetorical question :). Ok - If this is where the conversation is starting, it's going to go downhill *very* fast. Consider this a warning to *e

Re: Update on localflavor move

2012-10-12 Thread Russell Keith-Magee
On Sat, Oct 13, 2012 at 6:21 AM, Adrian Holovaty wrote: > Hi all, > > We've been talking about moving django.contrib.localflavor into > separate packages, outside of Django proper > (https://groups.google.com/d/topic/django-developers/OiyEGmXTifs/discussion). > Today I did the work of creating the

Re: end of "coming soon" in the tutorial? - tutorial 5 feedback needed!

2012-10-13 Thread Russell Keith-Magee
Hi Tim, Both of these are looking really good. I've left some comments on the tickets, mostly fairly minor suggestions. Russ %-) On Sun, Oct 14, 2012 at 6:43 AM, Tim Graham wrote: > Thank-you for the feedback, guys. I've updated the patch based on > suggestions, so if you are interested, pleas

Re: finding the source of "interesting" SQL queries

2012-10-22 Thread Russell Keith-Magee
Hi Matt, I'm not aware of any community maintained solution for this. However, interestingly, what you've suggested (including some contextual stack information in a query comment) is something that was suggested by Cal Henderson at the very first DjangoCon. I'm not sure Ned's "global request obj

Re: Add a "split" field to a model causes problems

2012-10-23 Thread Russell Keith-Magee
On Tue, Oct 23, 2012 at 6:52 PM, Andrew Ingram wrote: > Hi all, > > This one stung me today. Basically as part of an event (calendar) app, I > have functionality for splitting a series of events into two at a given > timestamp. The details aren't particularly relevant, but the key thing is > that

Re: #3011 - Custom User Models -- Call for final review

2012-10-27 Thread Russell Keith-Magee
On Sat, Oct 27, 2012 at 7:25 PM, Ludwig Kraatz wrote: > Hi Russ, > > >> >> > - The last_login field is in the AbstractBaseUser, but it isn't >> > documented as a required field. Is this field required for something? >> > Is it needed as part of AbstractBaseUser? >> >> Yes, last_login is require

Re: How to test patch

2012-10-27 Thread Russell Keith-Magee
On Sun, Oct 28, 2012 at 7:33 AM, Jan Bednařík wrote: > Hi all, > > I'm using Django for more than four years and last week I started > contributing. > > In docs about contributing I didn't find how detailed should be my testing > while I'm writing or reviewing patch? Is enough to run tests only fo

Re: How to test patch

2012-10-28 Thread Russell Keith-Magee
On Sun, Oct 28, 2012 at 3:55 PM, Dominic Rodger wrote: > Another long time user here (at some point I'd love to make the jump to > contributor, just need to find more time) - out of interest, is there a > reason we don't use Travis? I wonder if that might help those with commit > access, since pre

Re: Unicode SlugField

2012-11-01 Thread Russell Keith-Magee
On Thu, Nov 1, 2012 at 8:27 PM, Florian Apolloner wrote: > Hi, > > it surely won't change in 1.5 since we already released an alpha. > > That's incorrect -- it's still possible. Alpha is the freeze for "big" features. Little features can still be added up till the release of the beta. A minor enha

Re: Updating default errors in contrib.auth.forms.PasswordResetForm

2012-11-02 Thread Russell Keith-Magee
Hi Lee, What you propose certainly sounds reasonable -- anything that reduces the exposure of valid accounts to an external source is a good thing, IMHO. Did you have an alternative wording to suggest? If you do, please open a ticket. Yours, Russ Magee %-) On Fri, Nov 2, 2012 at 9:42 PM, Lee Tr

Re: Possible deprecation of depth= in select_related

2012-11-02 Thread Russell Keith-Magee
On Fri, Nov 2, 2012 at 10:33 PM, Jacob Kaplan-Moss wrote: > On Fri, Nov 2, 2012 at 9:29 AM, Marc Tamlyn wrote: > > If anyone has any major objections to the deprecation of depth, you > should > > shout now. If there are no objections and people think it's ok to push > this > > deprecation in now,

Re: Django template filters floatformat and intcomma: speed issues

2012-11-03 Thread Russell Keith-Magee
On Sun, Nov 4, 2012 at 12:05 AM, Kee wrote: > Hello, > > I was generating a lagrge table with django and wondered why response is > so slow (it has ~ 2000 x 10), so I rewrote > profiled ``floatformat`` and ``intcomma`` and wrote down their > implementations using builtin functions only. > > Take

Re: Class based views: A standard hook for http-method-independent code (and a proposal for an init() method)

2012-11-05 Thread Russell Keith-Magee
On Tue, Nov 6, 2012 at 2:20 AM, Jordan Hagan wrote: > As it seems that there is no longer any real opposition to this ticket (if > there is, now would be the time to speak up) I'll go ahead and prepare a > patch against the current trunk and get it uploaded to trac and see where > we get to from

Re: Class based views: A standard hook for http-method-independent code (and a proposal for an init() method)

2012-11-05 Thread Russell Keith-Magee
On Tue, Nov 6, 2012 at 7:48 AM, Jordan Hagan wrote: > I'm sorry if I came across that way, that wasn't my intention at all. > Andre Terra who was the one to initially raise opposition has changed his > stance on the functionality since he first posted, as per his email 4 days > ago. Aside from hi

Re: Custom user models in 1.5, not flexible/dry enough?

2012-11-05 Thread Russell Keith-Magee
On Tue, Nov 6, 2012 at 7:59 AM, ionel wrote: > Hello, > > I'm trying to make a custom user model so I can login and register > with the email (instead of username). This means the email must become > unique and I don't need the username fields. I don't want to fill it > with random data, unique i

Re: Custom user models don't like non integer primary keys.

2012-11-06 Thread Russell Keith-Magee
Hi Eric, Although the full stack trace would confirm it, I think I can guess what the problem is here -- it's the mechanism for generating reset tokens. If you dig into the token generation (and reversal) mechanisms, they use int_to_base36 and base36_to_int to convert the user's primary key into

Re: Custom user models in 1.5, not flexible/dry enough?

2012-11-08 Thread Russell Keith-Magee
Ok - so, I've been following this thread, and I should probably shed some light on the other side of the decision making process. I've got a history with Mixins. I was responsible for the final commit of Django's class-based views, which are very mixin heavy… and haven't been universally well rece

Re: Class based views: A standard hook for http-method-independent code

2012-11-08 Thread Russell Keith-Magee
On Thu, Nov 8, 2012 at 8:42 PM, Diederik van der Boor wrote: > > Op 7 nov. 2012, om 17:49 heeft Aaron Merriam het volgende geschreven: > > I wanted to post and modified version of a gist posted earlier in this > thread. > > https://gist.github.com/4032482 > > I originally implemented the original

Re: DatabaseError with empty IN clause with Paginator

2012-11-08 Thread Russell Keith-Magee
On Thu, Nov 8, 2012 at 9:44 PM, Chi Ho Kwok wrote: > Hi devs, > > I've noticed that after upgrading to Django 1.4, __in queries really don't > like empty sets. Simple queries still work, like > User.objects.filter(groups__in=[]), but most failures I've seen are with > Paginators. I think this is

Re: Class based views: A standard hook for http-method-independent code

2012-11-08 Thread Russell Keith-Magee
On Fri, Nov 9, 2012 at 1:05 PM, Aaron Merriam wrote: > Without setting request, args, and kwargs on on the view instance (which > is done during the base dispatch view), anything in the view that assumes > these values are present cannot run. > > Most of my views end up with functions which retrie

Re: Class based views: A standard hook for http-method-independent code

2012-11-08 Thread Russell Keith-Magee
#x27;t give you a good reason for it, it just feels bad every > time I do it. The only way to work around this is to override dispatch > without calling the original, and essentially duplicate the original > dispatch method with an init call added in. > > Cheers, > Jordan > > On F

Re: dumpdata with custom auth model

2012-11-09 Thread Russell Keith-Magee
On Sat, Nov 10, 2012 at 3:57 AM, Christian Jensen wrote: > Hi, > > Has anyone run into an issue where dumpdata refers to the old auth model > and tries to dump its data? > > Here is what I am encountering: > > DEBUG 2012-11-09 11:49:46,363 util 8457 140488053692160 (0.002) SELECT > "auth_user"."id

Re: Custom user models in 1.5, not flexible/dry enough?

2012-11-21 Thread Russell Keith-Magee
On Thu, Nov 22, 2012 at 12:03 AM, Val Neekman wrote: > OK, I went back and looked at Django 1.5 again. (New Custom User Model) > > Here is what I think: (User Django 1.4 as base) > > 1. Rename username to userid and increase the length to 255 chars while > keeping the rest of attribute the same (

Re: Improved ajax support idea

2012-11-23 Thread Russell Keith-Magee
I use a lot of AJAX in my projects as well. However, it that doesn't mean that *Django* needs to include advanced AJAX support. I (and other members of the core team) have said this many times in the past -- the Django community benefits when Django isn't a monolithic core. >From a technical per

Re: dumpdata with custom auth model

2012-11-23 Thread Russell Keith-Magee
Hi Benoit, Like I said in my last response, I'm *not* seeing the problem. Saying "I'm seeing the problem" doesn't help me. Saying "I've got a custom User" doesn't help me either -- I've got a custom User (several, actually - a test case extending AbstractUser and one extending AbstractBaseUser, pl

Re: Confusion with Unicode

2012-11-24 Thread Russell Keith-Magee
On Sat, Nov 24, 2012 at 9:55 PM, Santiago Basulto < santiago.basu...@gmail.com> wrote: > Hey guys, i'm posting this here because I posted this on django-users > yesterday and didn't get any help. > > I realise someone has now answered your question -- but *please* don't use django-developers as "s

Re: Improved ajax support idea

2012-11-24 Thread Russell Keith-Magee
On Sun, Nov 25, 2012 at 1:10 AM, James Pic wrote: > Hello everybody, > > Thank you for your feedback. And pretty soon I will tackle this problem in > an external app - or consider joining the party if somebody else has > started, in this case feel free to let me know. > > I can understand most of

Re: I'd like to make a contribution to the wiki

2012-11-29 Thread Russell Keith-Magee
Hi Harry, That particular page has been locked down due to problems we've had with spam. If you let us know what you want to add, I can add an entry to the list on your behalf. Yours, Russ Magee %-) On Tue, Nov 27, 2012 at 10:57 PM, Harry Percival wrote: > It's for promotional purposes really -

Re: Thank you to our security aware developers

2012-11-30 Thread Russell Keith-Magee
Hi Chris, Thanks for the kind words. It's always nice to know when your efforts are appreciated. As for the suggestion about the error message -- that's sounds like a reasonable idea to me; feel free to open a ticket. If you're looking to get involved in the development of Django itself, this sho

Re: Blocker for 1.5 - representation of filesystem paths in Django

2012-12-01 Thread Russell Keith-Magee
On Sun, Dec 2, 2012 at 2:43 AM, Aymeric Augustin < aymeric.augus...@polytechnique.org> wrote: > Hello, > > Django 1.5 beta 1 contains a regression for users who install Django or > their projects under non-ASCII paths: > https://code.djangoproject.com/ticket/19357 Unfortunately, the patch > isn't

Re: I'd like to make a contribution to the wiki

2012-12-03 Thread Russell Keith-Magee
On Fri, Nov 30, 2012 at 7:04 PM, Harry Percival wrote: > Hi Russell, thanks for getting back to us. Here's our info: > > Hi Harry, I've just posted those updates, and done the cleanups you suggested. Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Gr

Re: Provide a way to lookup valid dict items

2012-12-03 Thread Russell Keith-Magee
On Tue, Dec 4, 2012 at 10:08 AM, Ryan Stuart wrote: > Hi All, > > I recently discovered that there is no way in the Django template syntax > to access all valid items of a dict. For example, as I understand it, it is > impossible to access the only item of this dict: > > my_dict = {"_key": "value"

Re: Proposal: Django Admin Site and "pretty" app name

2012-12-07 Thread Russell Keith-Magee
On Sat, Dec 8, 2012 at 9:29 AM, Pedro J. Aramburu wrote: > Ramiro, I've read the ticket but it seems stuck. I just want it to go > forward because I think it's a major UI/UX issue for non-programmers the > lack of "pretty" app names. But I want it to be done right with a proper > app metadata hand

Re: Proposal: Django Admin Site and "pretty" app name

2012-12-07 Thread Russell Keith-Magee
to find it. > > On Friday, December 7, 2012 10:41:16 PM UTC-3, Russell Keith-Magee wrote: > >> >> On Sat, Dec 8, 2012 at 9:29 AM, Pedro J. Aramburu >> wrote: >> >>> Ramiro, I've read the ticket but it seems stuck. I just want it to go >>> forward

Re: #19076 - TemplateView does not support setting mime type

2012-12-10 Thread Russell Keith-Magee
Hi Gavin, Unfortunately, the deadline for new features in Django 1.5 has passed; once we release a beta, we only accept bug fixes. Yours, Russ Magee %-) On Tue, Dec 11, 2012 at 7:54 AM, Gavin Wahl wrote: > I know this is last minute, but is there any chance of getting this change > in 1.5? It'

Re: Django Admin Revamp - Any updates?

2012-12-14 Thread Russell Keith-Magee
On Fri, Dec 14, 2012 at 11:06 PM, Travis Swicegood wrote: > Is there a wiki page on the admin and changes that are planned for it? > This comes up every few months with a "hey, I've done X with the admin, > can we just use it to replace/update contrib.admin?" Would be nice to have > everyone's (

Re: Is Django documentation translations to land in main repository ?

2012-12-14 Thread Russell Keith-Magee
On Sat, Dec 15, 2012 at 11:53 AM, Amirouche B. wrote: > Héllo, > > Everything is in the title. Does Django core dev's want to have localized > documentation in main repository or should it be managed by local DUG ? > Yes :-) In a perfect world, you'd be able to get documentation in other langua

Re: e-mail changed to email in email validator

2012-12-19 Thread Russell Keith-Magee
On Thu, Dec 20, 2012 at 5:23 AM, Skylar Saveland wrote: > I checked out 1.5 branch today and found a change that I can't find the > debate/announcement for: e-mail to email in > > django/core/validators.py:validate_email = EmailValidator(email_re, > _('Enter a valid email address.'), 'invalid') >

Re: First request - Modify django.core.management.color with settings option

2012-12-19 Thread Russell Keith-Magee
Agreed - a --color command line flag makes more sense to me, and a lot more sense than a setting. I *might* be able to be convinced about an environment variable too (since the environment variable DJANGO_COLORS is already used to set the palette), but frankly, Alex Gaynor's argument about this bei

Re: Proposal: use SQLAlchemy Core for query generation

2012-12-26 Thread Russell Keith-Magee
On Mon, Dec 24, 2012 at 7:10 AM, Donald Stufft wrote: > On Sunday, December 23, 2012 at 4:08 PM, Florent Gallaire wrote: > > Django ORM should work for SQL and NoSQL DBMS. > NoSQL integration in Django is a more interesting and needed subject, > but who cares about that in the core team ? > > Why

Re: Proposal: use SQLAlchemy Core for query generation

2012-12-26 Thread Russell Keith-Magee
On Thu, Dec 27, 2012 at 11:29 AM, Donald Stufft wrote: > On Wednesday, December 26, 2012 at 10:00 PM, Russell Keith-Magee wrote: > > Why? Because we've gone to extraordinary lengths to make sure this sort of > thing is at least theoretically possible. > > Although we

Re: Request for proposals: Django project at Cascade Bicycle Club

2012-12-30 Thread Russell Keith-Magee
Hi Mary, The Django-Developers mailing list is for managing the development of Django itself. If you have a job offer/RFP that you want to fill, you should be mailing the Django *Users* mailing list. Yours, Russ Magee %-) On Mon, Dec 31, 2012 at 7:01 AM, wrote: > Hello, > >Cascade Bicycle

Re: Adding configuration to View to dispatch to any methods.

2013-01-02 Thread Russell Keith-Magee
Hi Hiroki, Thanks for the suggestion, but I'm afraid I don't see the benefit of doing this as configuration, rather than something in the dispatched method itself. Using your gist as an example -- why should this be something defined in a custom dispatching configuration format, rather than simply

Re: Adding configuration to View to dispatch to any methods.

2013-01-02 Thread Russell Keith-Magee
On Thu, Jan 3, 2013 at 2:46 AM, Hiroki Kiyohara wrote: > Hi, Russ. > > Thanks for your reply.That makes sense.I notice that the configuration of > my suggestion is complex. > We need to know what the configuration to take the value.It is necessary > to re-consider the implementation. > > Advantag

Re: Minor feature: Make TestCase pass the testcase instance to self.client's constructor

2013-01-02 Thread Russell Keith-Magee
On Thu, Jan 3, 2013 at 1:56 AM, Malcolm Box wrote: > Hi, > > When creating self.client in TestCase, it would be very useful if the > testcase instance was passed to the client. > > I'm using a replacement client class that does various validation checks, > so wants to use assert* functions on Tes

Re: runserver stdout and stderr piping problems

2013-01-09 Thread Russell Keith-Magee
I'm not aware of a ticket for this issue, and I couldn't find one from a quick search, so feel free to open one. The approach described by the OP seems reasonable, so if you want to provide a patch as well, feel free. Yours, Russ Magee %-) On Wed, Jan 9, 2013 at 11:37 PM, Chris Proto wrote: > D

Re: serializers.serialize on a single object

2013-01-09 Thread Russell Keith-Magee
Sure - sounds like a reasonable suggestion to me. Feel free to open a ticket and provide a patch! Yours, Russ Magee %-) On Thu, Jan 10, 2013 at 3:21 AM, Gabriel Warshauer-Baker wrote: > As Luke Plant pointed out a few years ago, you *can* just do: > > def serialize_one_object_to_json(**obj): >

<    8   9   10   11   12   13   14   15   16   17   >