Re: design Q: where to put peoples names

2007-11-16 Thread justquick


> Can the username be Null?
>From the help text on username attr:
"Required. 30 characters or fewer. Alphanumeric characters only
(letters, digits and underscores)."

> What if it was 1,000,000 names, like if I was publishing a phone book?
Then using the user model, which does keep track of a lot more
information than you need (username,email,etc.) and does not keep
track of information you do need (phone,address,etc.). You should
probably come up with your own model/storage mechanism for keeping
track of this data.


On Nov 16, 9:54 am, Carl Karsten <[EMAIL PROTECTED]> wrote:
> Marty Alchin wrote:
> > My first question would be: Are you absolutely certain that none of
> > those 1000 other people will ever need a login?
>
> anything is possible.
>
> I would think at some point it isn't a good idea to use the User table.  What 
> if
> it was 1,000,000 names, like if I was publishing a phone book?
>
>
>
> > Basically, if any of those users would ever need to be promoted to
> > login status, the User model is your best bet. As Samuel mentioned,
> > just set "is_active" to False and probably set the password field to
> > "!" since they wouldn't be expected to supply a password. As for
> > username, you can probably just make a slug out of their real name and
> > use that.
>

>
> Carl K
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: design Q: where to put peoples names

2007-11-16 Thread Marty Alchin

My first question would be: Are you absolutely certain that none of
those 1000 other people will ever need a login?

Basically, if any of those users would ever need to be promoted to
login status, the User model is your best bet. As Samuel mentioned,
just set "is_active" to False and probably set the password field to
"!" since they wouldn't be expected to supply a password. As for
username, you can probably just make a slug out of their real name and
use that.

Then, if/when they get promoted to full users, you just have to prompt
for a username and password, update those fields and set is_active to
True and you're all set.

-Gul

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: design Q: where to put peoples names

2007-11-16 Thread Samuel Adam

Want more info ?

Create a profile model and tie it to the user in settings.py:
AUTH_PROFILE_MODULE = 'profile.UserProfile'

Then you can use
user.get_profile().phone_number for example.

http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/

When i started using Django i made the mistake of wanting to go my
way.
Now, i compromise and go Django's Way.

If you use Django, you are tied to Django's rules and the guys that
made those are very clever.

Now that i understood that, my code is way cleaner and easier to
extend.


On Nov 16, 4:02 pm, justquick <[EMAIL PROTECTED]> wrote:
> > Can the username be Null?
>
> From the help text on username attr:
> "Required. 30 characters or fewer. Alphanumeric characters only
> (letters, digits and underscores)."
>
> > What if it was 1,000,000 names, like if I was publishing a phone book?
>
> Then using the user model, which does keep track of a lot more
> information than you need (username,email,etc.) and does not keep
> track of information you do need (phone,address,etc.). You should
> probably come up with your own model/storage mechanism for keeping
> track of this data.
>
> On Nov 16, 9:54 am, Carl Karsten <[EMAIL PROTECTED]> wrote:
>
> > Marty Alchin wrote:
> > > My first question would be: Are you absolutely certain that none of
> > > those 1000 other people will ever need a login?
>
> > anything is possible.
>
> > I would think at some point it isn't a good idea to use the User table.  
> > What if
> > it was 1,000,000 names, like if I was publishing a phone book?
>
> > > Basically, if any of those users would ever need to be promoted to
> > > login status, the User model is your best bet. As Samuel mentioned,
> > > just set "is_active" to False and probably set the password field to
> > > "!" since they wouldn't be expected to supply a password. As for
> > > username, you can probably just make a slug out of their real name and
> > > use that.
>
> > Carl K
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: design Q: where to put peoples names

2007-11-16 Thread Carl Karsten

Marty Alchin wrote:
> My first question would be: Are you absolutely certain that none of
> those 1000 other people will ever need a login?

anything is possible.

I would think at some point it isn't a good idea to use the User table.  What 
if 
it was 1,000,000 names, like if I was publishing a phone book?

> 
> Basically, if any of those users would ever need to be promoted to
> login status, the User model is your best bet. As Samuel mentioned,
> just set "is_active" to False and probably set the password field to
> "!" since they wouldn't be expected to supply a password. As for
> username, you can probably just make a slug out of their real name and
> use that.
> 

Can the username be Null?

Carl K

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~--~~~~--~~--~--~---



design Q: where to put peoples names

2007-11-16 Thread Carl Karsten

The user table has first/last name.  great.  I need to manage about 1500 
people, 
and only 500 will have any need for a site login.  So where should I store the 
1000 names that don't need to be a user record?

  I can think of:

Everyone gets a User record.  (given this is the easiest, what problems could 
it 
cause?)

2nd table for the extras.  all code that needs to work with the super set will 
have to work with both tables.  (yuck)

2nd table for all people.  don't use the name fields in the User table.  figure 
out how to use it to edit a User's Real Name (not the username) in the Admin 
UI. 
  (This seems best.  if you agree, how would I fix the Admin UI?)

Thanks, Carl

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: design Q: where to put peoples names

2007-11-16 Thread Samuel Adam

Have the "is_active" field of the User model set to False for the
users that don't need a login.

The auth login will raise an error if an inactive user tries to log
in.

Always try to use what is there.

On Nov 16, 3:02 pm, Carl Karsten <[EMAIL PROTECTED]> wrote:
> The user table has first/last name.  great.  I need to manage about 1500 
> people,
> and only 500 will have any need for a site login.  So where should I store the
> 1000 names that don't need to be a user record?
>
>   I can think of:
>
> Everyone gets a User record.  (given this is the easiest, what problems could 
> it
> cause?)
>
> 2nd table for the extras.  all code that needs to work with the super set will
> have to work with both tables.  (yuck)
>
> 2nd table for all people.  don't use the name fields in the User table.  
> figure
> out how to use it to edit a User's Real Name (not the username) in the Admin 
> UI.
>   (This seems best.  if you agree, how would I fix the Admin UI?)
>
> Thanks, Carl
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~--~~~~--~~--~--~---