Re: [Django] #14390: set_password functionality outside of the User model

2011-06-26 Thread Django
#14390: set_password functionality outside of the User model
---+--
   Reporter:  kent@…   |  Owner:  lrekucki
   Type:  New feature  | Status:  closed
  Milestone:   |  Component:  contrib.auth
Version:  1.2  |   Severity:  Normal
 Resolution:  fixed|   Keywords:
   Triage Stage:  Accepted |  Has patch:  1
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  1|  Easy pickings:  0
---+--
Changes (by jezdez):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [16456]:
 {{{
 #!CommitTicketReference repository="" revision="16456"
 Fixed #14390 and #16262 -- Moved password related functions from auth
 models to utils module and stopped check_password from throwing an
 exception. Thanks, subsume and lrekucki.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14390: set_password functionality outside of the User model

2011-05-05 Thread Django
#14390: set_password functionality outside of the User model
-+--
   Reporter:  kent@… |  Owner:  lrekucki
   Type:  Uncategorized  | Status:  new
  Milestone: |  Component:  contrib.auth
Version:  1.2|   Severity:  Normal
 Resolution: |   Keywords:
   Triage Stage:  Accepted   |  Has patch:  1
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  1  |  Easy pickings:  0
-+--
Changes (by patchhammer):

 * needs_better_patch:  0 => 1
 * type:   => Uncategorized
 * severity:   => Normal
 * easy:   => 0


Comment:

 patch_ticket14390.diff fails to apply cleanly on to trunk

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14390: set_password functionality outside of the User model

2010-10-13 Thread Django
#14390: set_password functionality outside of the User model
--+-
  Reporter:  k...@lysator.liu.se  | Owner:  lrekucki
Status:  new  | Milestone:  
 Component:  Authentication   |   Version:  1.2 
Resolution:   |  Keywords:  
 Stage:  Accepted | Has_patch:  1   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  0|  
--+-
Changes (by subsume):

  * owner:  subsume => lrekucki
  * status:  assigned => new

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14390: set_password functionality outside of the User model

2010-10-13 Thread Django
#14390: set_password functionality outside of the User model
--+-
  Reporter:  k...@lysator.liu.se  | Owner:  subsume
Status:  assigned | Milestone: 
 Component:  Authentication   |   Version:  1.2
Resolution:   |  Keywords: 
 Stage:  Accepted | Has_patch:  1  
Needs_docs:  0|   Needs_tests:  0  
Needs_better_patch:  0|  
--+-
Changes (by subsume):

  * owner:  lrekucki => subsume
  * status:  new => assigned
  * has_patch:  0 => 1

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14390: set_password functionality outside of the User model

2010-10-08 Thread Django
#14390: set_password functionality outside of the User model
--+-
  Reporter:  k...@lysator.liu.se  | Owner:  lrekucki
Status:  new  | Milestone:  
 Component:  Authentication   |   Version:  1.2 
Resolution:   |  Keywords:  
 Stage:  Accepted | Has_patch:  0   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  0|  
--+-
Changes (by druidjai...@gmail.com):

 * cc: druidjai...@gmail.com (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14390: set_password functionality outside of the User model

2010-10-07 Thread Django
#14390: set_password functionality outside of the User model
--+-
  Reporter:  k...@lysator.liu.se  | Owner:  lrekucki
Status:  new  | Milestone:  
 Component:  Authentication   |   Version:  1.2 
Resolution:   |  Keywords:  
 Stage:  Accepted | Has_patch:  0   
Needs_docs:  0|   Needs_tests:  0   
Needs_better_patch:  0|  
--+-
Changes (by lrekucki):

  * owner:  nobody => lrekucki
  * status:  reopened => new
  * stage:  Unreviewed => Accepted

Comment:

 I'll try to redeem myself ;)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14390: set_password functionality outside of the User model

2010-10-06 Thread Django
#14390: set_password functionality outside of the User model
--+-
  Reporter:  k...@lysator.liu.se  | Owner:  nobody
Status:  reopened | Milestone:
 Component:  Authentication   |   Version:  1.2   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by adrian):

 I would fully support separating this out into a module-level function. It
 doesn't feel right to have it in {{{models.py}}}, so let's make a
 {{{utils.py}}} with that function in there. Can somebody make a patch?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14390: set_password functionality outside of the User model

2010-10-04 Thread Django
#14390: set_password functionality outside of the User model
--+-
  Reporter:  k...@lysator.liu.se  | Owner:  nobody
Status:  reopened | Milestone:
 Component:  Authentication   |   Version:  1.2   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by lrekucki):

 Actually, you can... in Python 3. Sorry for the confusion.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14390: set_password functionality outside of the User model

2010-10-04 Thread Django
#14390: set_password functionality outside of the User model
--+-
  Reporter:  k...@lysator.liu.se  | Owner:  nobody
Status:  reopened | Milestone:
 Component:  Authentication   |   Version:  1.2   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by Alex):

  * status:  closed => reopened
  * resolution:  worksforme =>

Comment:

 No, you really can't use that:

 {{{
 >>> class A(object):
 ... def m(self):
 ...return 3
 ...
 >>> class B(object):
 ... pass
 ...
 >>> A.m(B())
 Traceback (most recent call last):
   File "", line 1, in 
 TypeError: unbound method m() must be called with A instance as first
 argument (got B instance instead)
 >>>
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #14390: set_password functionality outside of the User model

2010-10-04 Thread Django
#14390: set_password functionality outside of the User model
--+-
  Reporter:  k...@lysator.liu.se  | Owner:  nobody
Status:  closed   | Milestone:
 Component:  Authentication   |   Version:  1.2   
Resolution:  worksforme   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by lrekucki):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => worksforme
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 You don't have to create a User model. If your custom model also has a
 password field, you can just use:
 {{{
 x = MyModel()
 User.set_password(x, "foo")
 }}}

 Alternatively, you can user an anonymous object:
 {{{
 salt_and_hash = User.set_password(object(), "foo").password
 }}}

 If the later is too cumbersome for you, just copy those 2 lines from User
 model.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #14390: set_password functionality outside of the User model

2010-10-04 Thread Django
#14390: set_password functionality outside of the User model
-+--
 Reporter:  k...@lysator.liu.se  |   Owner:  nobody
   Status:  new  |   Milestone:
Component:  Authentication   | Version:  1.2   
 Keywords:   |   Stage:  Unreviewed
Has_patch:  0|  
-+--
 Today I wanted to use a hashed, salted password in a custom model. Instead
 of reinventing the wheel or looking for it in other places, I tried to use
 the Django implementation from contrib.auth. Checking a password was fine
 as django.contrib.auth.models.check_password is not tied to the User
 model, but creating it was harder as set_password is a method on the
 User model. I had to choose between copying the implementation from
 set_password or calling set_password on a throwaway User object.

 Perhaps the salt-and-hash action from set_password could be placed in a
 separate public, documented function (make_password? hash_password?) that
 set_password then uses?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.