As part of my sign up process, I don't require that people fill in
their first/last name, and just choose to show the username if no name
is entered.

Unfortunatly, I've come across a bit of code that I can't do this in,
which has got me thinking, I'm doing this all over the show, so there
must be a better way of doing it.

Ideally I'd like to just override the __unicode__ of the User method,
but I've been reading about the kerfuffle involved doing that, so does
anyone have any other bright ideas?

The problem that kicked all this off was that I was trying something
like this:

swap_players_form.fields['side_a'].choices = [(player.player.id,
player.player.first_name == '' ? player.player.username :
player.player.first_name) for player in side_a]

but it was throwing syntax errors on "player.player.first_name == '' ?
player.player.username : player.player.first_name)", if I could get
this method to work for now to let me move on that'd be a start.

Any ideas anyone?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to