Feature request: make django.contrib a namespace package

2012-02-04 Thread bhuztez
When trying to fix ticket #14087, I got an idea on how to separate out all contrib apps. Make django.contrib a namespace package. Every django release just ship one more package which does not bundle any contrib apps. The other one just bundle latest stable versions of contrib apps. Thus contrib a

Re: call_command; add *.pyc and *.pyo files to commands list

2012-02-29 Thread bhuztez
> I'm extremely strongly -1 on this. .pycs are a) an implementation detail, > b) not even remotely a security tool, c) really just ship your source, > having extra support for them is a waste of time IMO. agreed. > having extra support for them is a waste of time IMO. IMHO, no extra support for

Re: auth.User: The abstract base class idea

2012-03-22 Thread bhuztez
Maybe we could make every model pluggable. so User model could be defined like this: class User(models.Model): __mixins__ = load_available_mixins(settings.AUTH_MODEL_MIXINS) But AFAICS, Django will suffer from the same issue as PHP register_globals / Rails mass-assignment, because of ModelFo

add support for PEP 302 importers

2012-03-26 Thread bhuztez
I am working on fixing #14087. I think the biggest problem is that django do not support PEP 302 importers. Also, because of this, tickets are marked as won't fix or fixed by introducing much more implementation detail. It is not hard to find many of them, #582 #596 #8238 #8280 #12206 #13587 #1671

Re: auth.user refactor: the profile aproach

2012-04-04 Thread bhuztez
django.contrib.auth.get_user already uses BACKEND_SESSION_KEY to decide from which backend to get user object. To support multiple user models, we can just change the AUTHENTICATION_BACKENDS setting to a dict just as DATABASES. AUTHENTICATION_BACKENDS = { 'default': { 'BACKEND': 'djan

Re: auth.user refactor: the profile aproach

2012-04-04 Thread bhuztez
LazyForeignKey will not solve any problem that can't be solved now, and we have to introduce a new concept. It sounds like, when we encounted a hard problem, we give it a new name, instead of trying to solve it. Moreover, to support multiple user models, each app should be able to link to a differe

Re: auth.user refactor: the profile aproach

2012-04-05 Thread bhuztez
I think we need three different kinds of models, Identity, Profile and Authentication Info. * The Identity model should have all fields shared by many apps. * Each app can have its own Profile model. If a field is not shared with other apps, just put it in the Profile model. * Since password is

Re: Django is not a serious framework, really

2012-04-11 Thread bhuztez
The document clearly states that "You'll see a message for each database table it creates". I guess Jason Ma had a hard time reading the document because it is written in English. Native Chinese speakers who are not quite familiar with English will feel desperate when they had to read serveral pag

Proposal: Add support for PEP 302 importers

2012-06-29 Thread bhuztez
ms in the past few months, and have all but 2 related regression tests passed, and code is now available on Github: https://github.com/bhuztez/django/compare/master...pep-302 How many tickets should I open on trac? a single ticket for all, or one ticket for each problem, or one ticket for each re

Re: Breaking out localflavor

2012-08-16 Thread bhuztez
> So for a namespace at django.contrib.localflavor.* I *think* that django > and django.contrib would both need to be namespace packages as well. > If i'm right about that > thenhttps://github.com/django/django/blob/master/django/__init__.py > will need to be moved to somewhere else as well. Yes,