All,

I have the following setup:

--models.py --

from django.db import models
from django.contrib.auth.models import User as DjangoUser

class Business (models.Model):
  ...

class Group (models.Model):
  business = models.ForeignKey(Business)
  ...

class User (DjangoUser):
  group = models.ForeignKey(Group)
  ...

--- proxies.py --

from myapp.models import Business as BusinessModel, Group as
GroupModel, User as UserModel

class Business (BusinessModel):
    class Meta:
        proxy = True

class Group (GroupModel):
    class Meta:
        proxy = True

class User (UserModel):
    class Meta:
        proxy = True

-- admin.py --

from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as DjangoUserAdmin
from myapp.proxies import Business, Group, User

class BusinessAdmin (admin.ModelAdmin):
  ...

class GroupAdmin (admin.ModelAdmin):
  ...

class UserAdmin (DjangoUserAdmin):
  ...

admin.site.register(Business, BusinessAdmin)
admin.site.register(Group, GroupAdmin)
admin.site.register(User, UserAdmin)

As you can see, I'm trying to extend on the
django.contrib.auth.models.User. This modeling works well under the
shell, where a custom user instance would be in both the built-in User
table as well as the app-specific table.

However, the admin interface has issues. Added an instance of
myapp.models.User (via myapp.proxies.User) causes an entry in the
parent table, mapped to django.contirb.auth.models.User. It does not
create a db entry for myapp.models.User.

Any suggestions on how to solve this?

TIA,

Franco

--

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


Reply via email to