auth.User: The abstract base class idea

2012-03-20 Thread Alex Ogier
e to break, etc. Anyways, asides for circular dependency edge cases I think the rest of the downsides can be mitigated by good docs. What do you guys think? -Alex Ogier P.S. I hear you are accepting GSOC applications. -- You received this message because you are subscribed to the Google Groups &qu

Re: auth.User: The abstract base class idea

2012-03-20 Thread Alex Ogier
ctly necessary, and can wait until explicitly overriding fields has proper support in core (something I think will be generally useful). -Alex Ogier -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, se

Re: auth.User refactor: reboot

2012-03-20 Thread Alex Ogier
> Would something like the following alleviate that problem? > > class User(models.Model): >if settings.USE_LONG_USER_FIELDS: >username = models.CharField(max_length=255, unique=True, ...) >else: >username = models.CharField(max_length=30, unique=True, ...) >... Maybe,

Re: auth.User refactor: reboot

2012-03-20 Thread Alex Ogier
backends. You basically hack them on in a per-project fashion, wherever you define your profile. Pluggable user field mixins would let people take advantage of auth backends in a whole new way: distribute an auth backend and associated fields in an app, and people can install it by changing settings and

Re: [GSOC 2012] Customizable serialization

2012-03-20 Thread Alex Ogier
I like the project and am +1 on Łukasz's points #1 and #3. Meta.fk_level looks very useful though. For example if models have parent/sibling relationships or otherwise relate to themselves and you can't guarantee the relationships are acyclic. Definitely a worthy project. -Alex Ogie

Re: [GSOC 2012] Customizable serialization

2012-03-20 Thread Alex Ogier
the same parameter that throws at time of serialization. -Alex Ogier -- 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 this group, sen

Re: [GSOC 2012] Customizable serialization

2012-03-20 Thread Alex Ogier
nsidering the first phase to be serializing a model instance into python primitive types, before serializing it to a textual format. -Alex Ogier -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email t

Re: auth.User refactor: reboot

2012-03-21 Thread Alex Ogier
mmonly, would basically dictate a high-level architecture that consists of a lot of meta-programming expressed through lazy references and class attributes, resolving as the first requests make their way through the project. -Alex Ogier -- You received this message because you are subscribed to the

Re: auth.User: The abstract base class idea

2012-03-21 Thread Alex Ogier
to expose pieces of auth.User for people to reuse and/or depend on. https://github.com/ogier/django/tree/auth-mixins Does anyone have any opinions? -Alex Ogier -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this

Re: auth.User: The abstract base class idea

2012-03-22 Thread Alex Ogier
south.aeracode.org/docs/settings.html#south-migration-modules>setting to handle this. -Alex Ogier -- 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

Contrib backwards-compatibility question

2012-03-22 Thread Alex Ogier
at in turn imports django.contrib.admin.models in their settings file. It's not a common situation, probably, and it's an unfortunate restriction for many reasons. So if I were to propose a patch that did so, would it get shut down for that reason? -Alex Ogier -- You received this message

Re: auth.User refactor: reboot

2012-03-22 Thread Alex Ogier
th, off-topic, or non-objective comments will be cut -- or at > least heavily edited. > > Yours, > Russ Magee %-) I hope you don't mind, I added solution 2a. It's basically solution 2 minus the monkey-patching and resultant circular dependency issues, and correspondingly requir

Re: auth.User refactor: reboot

2012-03-22 Thread Alex Ogier
n the wiki as a limitation. Alex Ogier -- 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 this group, send email to django-developers+un

Re: auth.User refactor: reboot

2012-03-22 Thread Alex Ogier
each field you remove is an unknown risk. Alex Ogier -- 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 this group, send email to django-deve

Re: gsoc proposal, dynamic list form field

2012-03-23 Thread Alex Ogier
Why does the demo require Facebook integration? -- 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 this group, send email to django-developers+unsubs

Re: gsoc proposal, dynamic list form field

2012-03-23 Thread Alex Ogier
n't necessarily match your conception. -Alex Ogier -- 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 this group, send email

Re: make the source code of the django tutorial available ?

2012-03-26 Thread Alex Ogier
you want the tutorial code as a reference, the tutorial itself is an excellent textual description of all the changes made, so why not just refer to that? Best, Alex Ogier -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post t

Re: suggestion: Don't make the tag "url" dirty in Django1.5

2012-03-27 Thread Alex Ogier
{% url "app_views.client" %} But this change definitely doesn't make things "dirty," in fact it cleans up the tag to have consistent syntax with nearly every other tag, such as {% block %} and {% extends %} Best, Alex Ogier -- You received this message because yo

Re: Making the EmailField RFC-compliant: proposals here!

2012-03-27 Thread Alex Ogier
t for the email field is important, arguably a 1.5 release blocker, but so long as there is a good chance that migration support will be 1.5's poster-child feature then I think email support should be our poster child's poster child. Best, Alex Ogier -- You received this message because yo

Re: suggestion: Don't make the tag "url" dirty in Django1.5

2012-03-27 Thread Alex Ogier
> Well yes, it's not widespread: It's currently impossible. And it's only three lines if you want to explicitly create a context variable inside a template (which you will note is done with a quoted string constant). What your example demonstrates is how to create a constant variab

Re: Making the EmailField RFC-compliant: proposals here!

2012-03-27 Thread Alex Ogier
x27;t know the usual timeframe on controversial decisions like this, so if it is unlikely that a BDFL will put their foot down significantly before the deadline then that is also good to know. I could then apply with a looser definition of the project contingent on an eventual decision. Ciao,

Re: Django should not use `force_unicode(..., errors='replace')` when parsing POST data.

2012-03-29 Thread Alex Ogier
t. The question is why force_encoding(..., errors='replace') is giving you a string that PostgreSQL can't handle. Best, Alex Ogier -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email

Re: Dropping django.utils.simplejson

2012-03-29 Thread Alex Ogier
son (possibly with C extensions) whenever available. Therefore I am in favor of option #1, unless the shim is so trivial as to warrant asking any developers who use it to rewrite it themselves. Best, Alex Ogier On Thu, Mar 29, 2012 at 7:43 PM, Russell Keith-Magee wrote: > > Option 2 looks be

Re: Dropping django.utils.simplejson

2012-03-29 Thread Alex Ogier
lejson. I don't know how common that is, most alternate json modules appear pretty inactive but you never know. Also, whether or not that is common, it turns out there has been a bug that looks like it was added last October that means that no one has been using the system json module at all.

Re: Dropping django.utils.simplejson

2012-03-30 Thread Alex Ogier
Best, Alex Ogier On Fri, Mar 30, 2012 at 4:13 AM, Florian Apolloner wrote: > Hi, > > I am for number 2 too, but don't forget that's deprecation in 1.5 and 1.6 > and removal in 1.7 > > Cheers, > Florian > > -- > You received this message because you are subscr

Re: Dropping django.utils.simplejson

2012-03-30 Thread Alex Ogier
t's just not worth worrying about. Best, Alex Ogier On Fri, Mar 30, 2012 at 2:02 PM, Łukasz Rekucki wrote: > On 30 March 2012 13:04, Alex Ogier wrote: > > At the same time, I want to reiterate my support for option #1: not > deprecating the > > module and leaving t

Re: auth.user refactor: the profile aproach

2012-04-02 Thread Alex Ogier
ns (and hence, what your login forms look like), add in whatever authentication mechanisms you like, add in whatever authorization mechanisms you need (with specific instructions on what contrib.admin demands from your model), and run with that. Sorry for the rant, hopefully I'm not burning

Re: auth.user refactor: the profile aproach

2012-04-02 Thread Alex Ogier
n #2?" Then as soon as everyone does that and facebook, twitter, browserid, and plain emails all share the same namespace, we open up the same whole can of worms that we get with cache keys, except now failures to manage things properly manifest themselves as security holes in basic authentication i

Re: auth.user refactor: the profile aproach

2012-04-03 Thread Alex Ogier
x27;s proposal. You can find it at https://gist.github.com/2289395 Best, Alex Ogier On Mon, Apr 2, 2012 at 8:35 PM, Jacob Kaplan-Moss wrote: > Hi folks -- > > I've written up a proposal for how *I* would like to address refactoring > auth.user: https://gist.github.com/2245327. >

Re: auth.user refactor: the profile aproach

2012-04-03 Thread Alex Ogier
e chunks into a ticket on trac? I think it makes sense to merge no matter what we decide on for specific settings and access mechanisms to developer-defined users. Best, Alex Ogier -- You received this message because you are subscribed to the Google Groups "Django developers" group. T

[GSoC 2012] auth.User replacement proposal

2012-04-04 Thread Alex Ogier
ed on, and they give the project enough direction that it will rapidly become obvious if and when I am derailing your conception of what needs to be done, so I hope you will consider letting it be done as a GSoC project. Best, Alex Ogier -- You received this message because you are subscribed to th

Re: [GSoC 2012] auth.User replacement proposal

2012-04-04 Thread Alex Ogier
Fair enough. My goal was never to shut down collaboration, and if GSoC will do that then I am happy to drop it. The money was never my motivation, and I will definitely still contribute what I can. Best, Alex Ogier On Wed, Apr 4, 2012 at 2:46 PM, Jacob Kaplan-Moss wrote: > On Wednesday, Apri

Re: Proposal: upgrading the choices machinery for Django

2012-04-04 Thread Alex Ogier
oesn't restrict you from altering display values for internationalization. It seems to me like this is really a documentation problem, where distilling the wisdom of developers like Adrian into a little best practices paragraph in the choices argument reference would go very far in making the awk

Re: Ticket for Docs improvement Was: Proposal: upgrading the choices machinery for Django

2012-04-05 Thread Alex Ogier
ined MALE/FEMALE as globals too :) Otherwise you'll get > a NameError. > > -- > Łukasz Rekucki As attributes of the class object I'm pretty sure they are in scope. No NameErrors there. Best, Alex Ogier -- You received this message because you are subscribed to the

Re: Ticket for Docs improvement Was: Proposal: upgrading the choices machinery for Django

2012-04-05 Thread Alex Ogier
Interesting, you are right. It's still a little strange to me to be accessing class attributes via the self object, but I suppose it is more flexible than accessing them as User.MALE etc. which would make renaming the class awkward. Best, Alex Ogier On Apr 5, 2012 2:16 PM, "Łukasz Rekuc

Re: auth.user refactor: the profile aproach

2012-04-05 Thread Alex Ogier
force decisions on them. So, stop thinking just in terms of contrib.auth.models.User. If you're already using that with a profile and it's all working fine, then this change isn't for you. This is for everyone who just wishes auth.User would go away without totally borking admin. Respectfully, Alex O

Re: auth.user refactor: the profile aproach

2012-04-06 Thread Alex Ogier
Tai, read https://gist.github.com/2289395 for a summary of many reasons why I think profiles are a bad idea, and unifying multiple profiles is an even worse idea. Best, Alex Ogier On Fri, Apr 6, 2012 at 6:15 AM, Tai Lee wrote: > Alex Ogier, > > Is it really better to require users

Re: auth.user refactor: the profile aproach

2012-04-10 Thread Alex Ogier
could roll your own proxy attributes to app fields, after all you control the entire user class. Best, Alex Ogier On Apr 10, 2012 5:47 AM, "Tom Evans" wrote: > On Fri, Apr 6, 2012 at 7:31 PM, Alex Ogier wrote: > > Tai, read https://gist.github.com/2289395 for a summary of many

Re: auth.user refactor: the profile aproach

2012-04-10 Thread Alex Ogier
are a bunch of standard ways to relate to a model that don't invasively change it. They are all still available, and in fact preferred because no matter how easy it is to use a mixin, doing nothing is even easier. Best, Alex Ogier On Apr 10, 2012 10:58 AM, "Tom Evans" wrote: > On

Re: auth.user refactor: the profile aproach

2012-04-10 Thread Alex Ogier
Tai, I think you are overestimating the importance of a "pluggable" user model. If 100 apps all try to add fields to the User model then of course bloat and performance issues and field name conflicts will be a problem. But I don't think that will happen. There are very good reasons for an app *no

Re: Admin site: Appropriateness of HTTP 500 when using non-allowed query strings

2012-04-11 Thread Alex Ogier
every other unhandled exception. It's not a code path you should ever reach in normal use, only when someone is getting crafty with the admin URLs. A 400 response suggests that there is a fixable error somewhere, and there isn't. Best, Alex Ogier On Apr 11, 2012 2:44 PM, "3point2&q

Re: extra files in startproject (was: Django is not a serious framework, really)

2012-04-12 Thread Alex Ogier
Maybe it would be worth experimenting with various combinations of django 1.x django-admin.py executables with django 1.4 libraries? Maybe if django-admin.py is a symlink into a 1.3 tree but django 1.4 is on the search path this stuff could crop up? Best, Alex Ogier On Apr 12, 2012 2:32 PM, "

Re: #18094: signals, model inheritance, and proxy models

2012-04-12 Thread Alex Ogier
can be done at load time to avoid performance hits from isinstance calls. Best, Alex Ogier On Apr 12, 2012 2:59 PM, "Carl Meyer" wrote: > On 04/12/2012 12:43 PM, Anssi Kääriäinen wrote: > > It is important that pre/post init signals will not get more expensive > > than

Re: extra files in startproject

2012-04-12 Thread Alex Ogier
;t happen. It's a bit hacky but it would work. Best, Alex Ogier On Thu, Apr 12, 2012 at 5:16 PM, Aymeric Augustin < aymeric.augus...@polytechnique.org> wrote: > On 12 avr. 2012, at 21:16, Carl Meyer wrote: > > > The open question is just how this situation occurs in the fi

Re: extra files in startproject

2012-04-12 Thread Alex Ogier
27;distutils.dir_util.remove_tree'. Adding that for our specific directory that needs to be clean should work, yes? Best, Alex Ogier -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to dj

Re: extra files in startproject

2012-04-12 Thread Alex Ogier
On Thu, Apr 12, 2012 at 11:56 PM, Ben Finney wrote: > > Alex Ogier writes: > > > That seems like too much to ask. "setup.py install" should Just > > Work(tm), > > In the absence of a proper package management system (as implemented in > operating syst

Re: extra files in startproject

2012-04-13 Thread Alex Ogier
So, this "import django" will import relative to current directory and will work. > And in fact, this behavior is relied upon. Django's setup.py imports the relative django to get the version number. Best, Alex Ogier -- You received this message because you are subscribed

Re: GitHub migration planning

2012-04-18 Thread Alex Ogier
le create issues on github is to > disable it for the > official repository. This is possible through the Github's Admin interface. > Err, I think the point was that Trac is less accessible than Github so Django *should* be using Github Issues instead. Best, Alex Ogier -- You re

Re: GitHub migration planning

2012-04-19 Thread Alex Ogier
everal successful projects that use git that use patch-based workflows rather than merging. The advantage of that is a linear history with each feature packaged into a neat commit. The extra detail is great for developing, but not so great for a mainline history (it breaks 'git bisect' for ex

Re: GitHub migration planning

2012-04-20 Thread Alex Ogier
fits, and all the same drawbacks, so I don't think anyone would seriously advocate moving there. Best, Alex Ogier -- 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@googlegroup

A quick primer on how to move feature branches to the new Git repository

2012-04-29 Thread Alex Ogier
I have posted instructions on how to easily and safely rebase feature branches from an old fork of Django's SVN mirror onto Django's official git repository. I hope this helps. Let me know if you need help or the instructions are unclear or incorrect. https://gist.github.com/2549844

Re: Application init inconsistent

2012-05-08 Thread Alex Ogier
ust a theory, but it explains the behavior you are seeing if you are importing a different name when you do the native import. Best, Alex Ogier On May 7, 2012 4:34 PM, "Scott Sadler" wrote: > Hi all, > > I'm making some extensions to the Django AdminSite for dashboard I'

Re: Django git guidelines

2012-05-18 Thread Alex Ogier
clean up commit messages for posterity. Best, Alex Ogier On Fri, May 18, 2012 at 12:48 PM, Donald Stufft wrote: > On Friday, May 18, 2012 at 12:30 PM, Anssi Kääriäinen wrote: > > On May 18, 6:08 pm, Donald Stufft wrote: > > I personally prefer doing normal merges with --no-ff. While

Re: Django git guidelines

2012-05-22 Thread Alex Ogier
Git actually has native support for this workflow. Each commit has an "author" and a "committer" which are typically the same, but in the case of a squash merge or patch are different. For example, http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=72c04a

Re: Django's CVB - Roadmap?

2012-06-01 Thread Alex Ogier
form, you rely on the internals executing something for you, which makes understanding preconditions for various methods difficult to understand without extensive docs. Anyways, this is a deeper problem than "There are two things we can fix, let's get on that." Best, Alex Ogier --

Re: Proposed Field API additions

2012-06-07 Thread Alex Ogier
el Foo has an unknown field: `field_name` of type: `project.app.CustomField`. Please register this field with `django.db.migrations.register_field()` before creating migrations on the Foo model." Also, you can support third-party fields by registering them in your own modules if you need

Re: json vs simplejson

2012-06-11 Thread Alex Ogier
On Mon, Jun 11, 2012 at 5:51 PM, Luke Plant wrote: > > i.e. simplejson returns bytestrings if the string is ASCII (it returns > unicode objects otherwise), while json returns unicode objects always. > This seemed strange to me because the standard library json shipping with python 2.7.3 is in fac

Re: json vs simplejson

2012-06-12 Thread Alex Ogier
#x27;} >>> from django.utils import simplejson >>> simplejson.loads('{"a":"b"}') {u'a': u'b'} >>> json.loads == simplejson.loads True Best, Alex Ogier -- You received this message because you are subscribed to the Google G

Re: json vs simplejson

2012-06-12 Thread Alex Ogier
eady on systems without simplejson. If Django depends on optimized behavior, then it is a bug, and a ticket should be filed. Best, Alex Ogier -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send e

Re: json vs simplejson

2012-06-12 Thread Alex Ogier
subtle problems when switching to json, recommend that people switch to simplejson instead, or undeprecate django.utils.simplejson as a necessary wart (we can still stop vendoring simplejson though). Best, Alex Ogier -- You received this message because you are subscribed to the Google Groups &quo

Re: ModelForms and the Rails input handling vulnerability

2012-06-12 Thread Alex Ogier
fields other than primary keys use hidden input widgets by default, so it's rather obvious when something changes. We don't have the Rails problem where one dev makes a scaffold form for an insecure model and another one adds a secure field to the model opening up a security ho

Re: ModelForms and the Rails input handling vulnerability

2012-06-12 Thread Alex Ogier
On Tue, Jun 12, 2012 at 11:43 PM, Karen Tracey wrote: > On Tue, Jun 12, 2012 at 10:10 PM, Alex Ogier wrote: >> >> No one can sneak extra unexpected fields past a developer by editing HTML >> client side, because if the field wasn't rendered to HTML it's not >>

Re: ModelForms and the Rails input handling vulnerability

2012-06-13 Thread Alex Ogier
ry: +0 on option 1. Making a ModelForm is already a choice to expose a model directly. -1 on option 2. Default is still insecure, and Meta.exclude has use cases. +0 on option 3. It's like my option 4, but requires [for field in Model._meta.fields] hackery to work around. +1 on option 4. Auto-g

Re: ModelForms and the Rails input handling vulnerability

2012-06-13 Thread Alex Ogier
r examples see " It's an easy thing to justify turning on in an opt-out fashion, Meta.allow_partial_submissions or something. Best, Alex Ogier -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, se

Re: ModelForms and the Rails input handling vulnerability

2012-06-13 Thread Alex Ogier
e all our forms are explicit, it is feasible to catch that scenario and throw an error, which I think we should do. Best, Alex Ogier -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develo

Re: ModelForms and the Rails input handling vulnerability

2012-06-13 Thread Alex Ogier
en they are unchecked. Kind of throws a wrench in my plan. Best, Alex Ogier -- 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 this group, s

Re: XSS and string interpolation

2012-06-28 Thread Alex Ogier
hon 3 and more idiomatic python, I would implement the function as: def html_mark_safe(format_string, *args): return mark_safe(format_string.format(*map(conditional_escape, args))) Best, Alex Ogier -- You received this message because you are subscribed to the Google Groups "Django developers&q

Re: XSS and string interpolation

2012-06-28 Thread Alex Ogier
On Thu, Jun 28, 2012 at 11:18 AM, Alex Ogier wrote: > > Also, to be compatible with python 3 and more idiomatic python, I > would implement the function as: > >    def html_mark_safe(format_string, *args): >        return mark_safe(format_string.format(*map(conditional_escape, a

Re: XSS and string interpolation

2012-06-28 Thread Alex Ogier
On Thu, Jun 28, 2012 at 1:14 PM, Luke Plant wrote: > > Some other alternatives: build_html, build_html_safe, format_html > +1 for format_html. Best, Alex Ogier -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post

Re: Upcoming sprint to update Django's tutorial

2012-07-17 Thread Alex Ogier
They are also dated and appropriately transient: a blog post from 2008 can be forgiven for missing some latest best practices, whereas a tutorial enshrined in Django's official documentation cannot. Best, Alex Ogier -- You received this message because you are subscribed to the Google

Re: GSoC Check-in: Security Enhancements

2012-07-25 Thread Alex Ogier
hanisms if possible, and should be able to explicitly opt out if necessary. Almost everyone should be using every single protection Django offers on all their requests, and therefore it should be verbose and discouraged to turn off these protections. Best, Alex Ogier -- You received this message

Re: Streaming HttpResponse revisted. Any core devs, please take a look if you can :)

2012-08-20 Thread Alex Ogier
est practice to create new HttpResponses would *really* break this. Best, Alex Ogier -- 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 thi

Re: Python 3 str.format()

2012-08-24 Thread Alex Ogier
> Until the Python developers announce an actual timeline for removal > (if they ever do), I can't see any reason for Django to be concerned > about which formatting approach to use, apart from the immediate > concerns of style and efficiency. I don't think Python will ever remove %-style formatti

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

2012-08-29 Thread Alex Ogier
On Wed, Aug 29, 2012 at 3:44 AM, Russell Keith-Magee wrote: > > I suppose you could see it as a semantic nuance. However, to my mind, > there is a different. A skipped test is something that could -- or > even *should* be run -- but can't due to missing some optional > prerequisite. In this case,

Re: iPython behaves strangely only with Django shell

2012-08-29 Thread Alex Ogier
declaration. > > IPython 0.12.1 > Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) > This is almost certainly related to https://code.djangoproject.com/ticket/18204 I can repro just as Alex Gaynor did, and the patch from the above ticket fixes it. Best, Alex Ogier -- You

Re: Model inheritance extended.

2012-09-25 Thread Alex Ogier
django-model-blueprint without even requiring any changes to INSTALLED_APPS, which means the only benefit to being in core is canonicalizing the pattern. Best, Alex Ogier -- You received this message because you are subscribed to the Google Groups "Django developers" group. To pos

Re: A bit of Django history

2012-10-05 Thread Alex Ogier
go’s admin will blow your mind There are a lot of other good python frameworks nowadays with lots of nice features, but this is the one that keeps me coming back to Django. Best, Alex Ogier -- You received this message because you are subscribed to the Google Groups "Django developers&

Re: Feature request: collectstatic shouldn't recopy files that already exist in destination

2012-10-08 Thread Alex Ogier
ng from local disk and writing to S3, this is a big win, and doesn't require cooperation from any other backends, or standardizing on md5 as a fingerprint method. Best, Alex Ogier -- You received this message because you are subscribed to the Google Groups "Django developers" group. T

Re: URL dispatcher slow?

2012-10-10 Thread Alex Ogier
t "Fix it yourself" is a hackneyed open-source truism, and "Speed doesn't matter" is more or less self-evidently false -- especially to someone evaluating frameworks, who may not yet have a strong opinion on what features are game-changers for his application. Best, Alex Og

Re: Proposal - ``Model.reset_state``

2012-10-15 Thread Alex Ogier
t to core. Hopefully it addresses your use case though. Here's an example of a similar snippet someone has written, though obviously you want to keep the same PK instead of auto-generating a new one: http://djangosnippets.org/snippets/904/ Best, Alex Ogier -- You received this message beca

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

2012-11-06 Thread Alex Ogier
tractBaseUser + UsernameMixin + PermissionsMixin. I might try that on my branch, and see how it works out. My guess is it will work just fine albeit with an absurdly deep inheritance tree. Best, Alex Ogier On Tue, Nov 6, 2012 at 1:11 AM, Ryan Kaskel wrote: > I implemented a custom User model in

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

2012-11-06 Thread Alex Ogier
OK limitation. Forms will still have to be overridden, but that was always inevitable. On Tue, Nov 6, 2012 at 5:02 PM, Anssi Kääriäinen wrote: > On 6 marras, 23:05, Alex Ogier wrote: > > > ... Since you can't actually override or change the fields of an > abstract model

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

2012-11-08 Thread Alex Ogier
27;t to go mixin-crazy, it's to find the best way to expose permissions-checking (the most boilerplate-heavy of the requirements of an admin-compatible user). The other contracts are probably better exposed as tests in contrib.admin than as little piece-wise mixins. Best, Alex Ogier On Thu,

Re: Perimission field name on the new Custom User Model

2012-11-08 Thread Alex Ogier
jango's ModelBackend. Best, Alex Ogier On Thu, Nov 8, 2012 at 3:27 PM, Christian Jensen wrote: > I was tweaking around with making an email address only User model (sans > username) while still retaining the permissions stuff and ran into a small > issue. I can fix it but it might need

Re: Perimission field name on the new Custom User Model

2012-11-08 Thread Alex Ogier
Oh, my apologies, the proper argument to set the name of the table that is created for a ManyToManyField is db_table instead of db_column (which just controls the column on the user table itself). Entirely my mistake. Best, Alex Ogier On Thu, Nov 8, 2012 at 8:10 PM, Christian Jensen wrote

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

2012-11-14 Thread Alex Ogier
For example, you miss Http404 and other error responses, which are implemented as exceptional control flow. In addition, you can't do any preprocessing of the request; for example, you can't set up any invariants before your actual view method is called. Best, Alex Ogier On Wed, Nov 1

Re: Yet another __ne not equal discussion

2012-11-30 Thread Alex Ogier
To be fair, the query you describe is significantly more expensive than Marek's query. On Fri, Nov 30, 2012 at 10:20 AM, Tom Evans wrote: > On Fri, Nov 30, 2012 at 2:51 PM, Marek Brzóska > wrote: > > > > > > > > 2012/11/30 Tom Evans > >> > >> On Fri, Nov 30, 2012 at 1:29 PM, Marek Brzóska > >

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

2012-12-19 Thread Alex Ogier
Well, most GNU command line utilities have an option --color=always|auto|never that defaults to auto. Seems like it works for them, so replicating it for management commands makes more sense than an environment variable to me. Best, Alex Ogier On Wed, Dec 19, 2012 at 4:09 PM, Alex Gaynor wrote

Re: Shouldn't Textarea be CamelCased as TextArea?

2013-01-19 Thread Alex Ogier
letter and no "Input" suffix. So the naming is consistent, and agrees with the HTML tags, even though it looks a little weird without that knowledge. Best, Alex Ogier On Sat, Jan 19, 2013 at 3:26 AM, Wim Feijen wrote: > Hi guys, > > I was just wondering, and maybe my Eng

Re: Form.set_data method

2013-01-31 Thread Alex Ogier
Your new method will bypass their customizations. Best, Alex Ogier On Thu, Jan 31, 2013 at 8:51 AM, Byron Ruth wrote: > I don't understand your argument regarding overriding `__init__`. Nothing > has changed in __init__, the logic for setting `data` and `files` is simply > mov

Re: Form.set_data method

2013-01-31 Thread Alex Ogier
see unexpected things if they override it). So I'm -0 due to the additional complexity for something which is already possible and has a widely used idiom, even if it is more verbose. Best, Alex Ogier On Thu, Jan 31, 2013 at 12:13 PM, Byron Ruth wrote: > I don't want to belabor our di

Re: TIMEZONE default

2013-02-09 Thread Alex Ogier
e on the server is a better way of handling times. As a result, if the settings module doesn't contain a TIME_ZONE setting, then you get 'America/Chicago' in order to be backwards compatible, but when you make a new project you get the current best-practice setting which is UTC. Be

Re: Moving from PIL to Pillow

2013-02-27 Thread Alex Ogier
ss you manually check for it, you shouldn't even notice that you are getting Pillow libraries instead of PIL libraries. Which means that supporting pillow *should* be as easy as Marijonas suggests, unless there actually are real regressions. Just install it instead of or in addition to PIL when t

Re: Transforming django-admin.py to a shell script

2013-03-01 Thread Alex Ogier
fix. Besides, it does have some merit as it is consistent with `./manage.py somecommand`, which is the recommended way to run pretty much every command except "startproject". Best, Alex Ogier -- You received this message because you are subscribed to the Google Groups "Dja

Re: Proposal: deprecate and remove django.contrib.comments

2013-03-07 Thread Alex Ogier
n stay modern outside of core, then it will die, but we should make it a trivial matter to fork and adopt for whoever needs it. Anyways, +1 from me. Best, Alex Ogier On Thu, Mar 7, 2013 at 12:41 PM, Luke Granger-Brown wrote: > +1 from me too - I've only tried using django.contrib.commen

Re: Moving database backends out of the core

2013-03-07 Thread Alex Ogier
for them. [1]: http://pytools.codeplex.com/ [2]: http://www.windowsazure.com/en-us/develop/python/tutorials/django-with-visual-studio/ [3]: http://www.windowsazure.com/en-us/develop/python/tutorials/web-app-with-django-and-mysql/ Best, Alex Ogier On Thu, Mar 7, 2013 at 12:46 PM, Jacob Kaplan-Moss wro

Re: Moving database backends out of the core

2013-03-07 Thread Alex Ogier
to passing most tests. So I see no reason to split off backends unless the maintenance burden is such that they are chronically broken in every Django release. And every reason to add MSSQL unless the maintenance burden is too high. Best, Alex Ogier On Thu, Mar 7, 2013 at 4:03 PM, Erik Romijn

Re: Changes to django's settings module

2013-03-13 Thread Alex Ogier
ults. If you want to modularize them, you are free to do so yourself. I think composing settings internally is just added complexity for little benefit. Best, Alex Ogier On Wed, Mar 13, 2013 at 12:27 PM, Omer Katz wrote: > Lately I implemented some changes for django's settings module . >

Re: Changes to django's settings module

2013-03-14 Thread Alex Ogier
ow-tos on deployment we could write up some good practices for managing settings in multiple contexts -- that would be more welcome than code in Django core, I think. Midterms end today for me, so maybe I will try writing up some of the practices that make managing settings easier for me later tonigh

Re: Changes to django's settings module

2013-03-14 Thread Alex Ogier
ems like a bad idea, versus "Install django-configurations, and now you have a new tool in your toolbox to put in settings.py that imports from the environment!" Best, Alex Ogier On Thu, Mar 14, 2013 at 3:42 PM, Omer Katz wrote: > You haven't referred to the pull request

  1   2   >