Am Mittwoch, 14. Februar 2018 14:45:49 UTC+1 schrieb Adler Neves:
> You can have an OneToOneField in the profile referencing Django's User 
> model with `related_name='profile'`, 

Well, i know this and the related entry is accessible even without 
explicitly defining the related_name. You can change defaults defining the 
related_name, tho. 
But still trying to add a UserInline to the ProfileAdmin wont work due to 
the missing FK on the user model.


> About the admin interface changing the model, I guess you're somehow 
> editing `` files. Are you making the migrations, applying them to 
> the database and reloading the server? If you're not persisting changes 
> that way, how do you patch models in memory every startup and ensure 
> database schema is compatible with your models?

Just for clarification, i dont do any mysterious magic: the property works 
like this:

def username(self):
    return self.user.username
username.fget.short_description = "Username"

def username(self, username):
    self.user.username = username

So with everything else failing .. although i only want to be able to edit 
this one field of the actual user, it looks like i have to show a useradmin 
with a profile inline admin?
AFAIK this can only be done with a separate admin site, because there can 
only be one Admin for any model thats why i wanted to have some other 

Maybe someone knows a better solution?


You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

Reply via email to