Hi all!

It is really hard to replace some django.contrib modules on your own now.
I'm have many reason to replace django.contrib.auth on my own module now
in my current project, but in this way I've need to rewrite many others
applications related with django.contrib.auth, if I want to use it. The my
project has no long time and ends before any implementation of ideas from
this message, but I think about future.

Application abstraction is simply collection of models, views and others in
Django Framework now. I propose extend application abstraction with adding
something like application type and adding model relation by application
type.

Example of really reusable application:

auth = get_app('auth')

class MyModel(models.Model):
    user = models.ForeignKey(auth.User)
    ...

get_app can raise AppIsNotInstalled exception, if required application type
is not specified in project settings.

Proposed changes in project settings to register installed applications:

install_applications(
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    ...
    auth = 'django.contrib.auth',
    ...
)

install_applications adds applications to INSTALLED_APPS.



Cheers!

Alex Kamedov

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to