Skip to content

kraut/django-configureable-userprofiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

= dajngo-configureable-userprofiles =
Create and customize userprofiles via admin interface.

STILL VERY VERY ALPHA!
So feel free to add issues ;)

project home: https://code.google.com/p/django-configureable-userprofile/


Note: some parts of the code are inspirated by the django-settings project!

== Features ==
 * create userprofiles types(ie: "AuthorProfile", "UserProfile") in admin interface
 * create custom profile fields in admin interface
 * add field to userprofile types in admin interface
 * inline userprofile edit in User admin
 * includes a user create form which replace username with email address (technically 
	the usermodel is the same, form only stores email in username field ,too.).
 * every Group is associated with an userprofile type

=== supported userprofile fields ===
 * String
 * Integer
 * PositiveInteger
 * Zip (for Germany, if you want it other country you have to change the widget only)
 * State (for Germany,  -- " -- )
 * Date
 * Boolean

==== planned ===
 * more generic field like: RegexStringField 
== Usage ==
1. Checkout project and store it in python path or in your django project root.

2. Add it to installed apps:

	INSTALLED_APPS += ('userpofiles',)

Now in admin interface should appear a new box called userprofiles
and you  can add new usprofiles / fields. 
Go to user admin and choose profile, save it and renter the admin page for this user.
There should a inline edit of the former created userprofile.


3. (Optional) Define some default profiles / fields.
  In admin interface you have the ability to add/modify fields.
  So do not worry about this default values ;)

	# some default profile fields to add in DB 
	USER_PROFILE_FIELDS={
		#name    desplayed_name   description         type  is_required
		'bday': ('Geburtstag','Wann bist du geboren?', 'date',1),
		'website_prv': ('Website','Deine private Homepage', 'string',0), 
		'website': ('Website','Ihre Homepage', 'string',0), 
		'plz':('Postleitzahl', '','zip',1),
		'strasse': (u'Straße', u'Straßenname mit Hausnummer', 
		        'string', 1),

		}
	# default profiles an theire fields. (you can modify it in admin interface)
	USER_PROFILES = {
		'Bewerberprofil' : ('bday','website_prv'),
		'Firmenprofil' : ('website','plz'),
		}
	# group <-> profile mapping
	DEFAULT_GROUPS = {  # groupname  profilename 
		    'Firma' : ('Firmenprofil',),
		    'Bewerber': ('Bewerberprofil',),
		    }


Releases

No releases published

Packages

No packages published

Languages