Django: adding new field to the admin user in Django -


i need add new char-field the django admin user. have create new model extends modelform models.py

class useradminform(forms.modelform):       class meta:     model = user is_developer = forms.booleanfield(default=false) 

and edit admin.py file.

class useradmin(admin.modeladmin): form = useradminform admin.site.unregister(user) admin.site.register(user, useradmin) 

when try run syncdb command gives error typeerror: __init__() got unexpected keyword argument 'default'. reason that. please tell me how can add new filed django admin user.give me sample code or tutorials link.

depending on django version you're using (<1.5 or 1.5) choose 1 of 2 versions described here: https://docs.djangoproject.com/en/dev/topics/auth/customizing/#extending-the-existing-user-model


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -