Skip to content

password reset functionality,#6

Open
norkans7 wants to merge 9 commits into
nyaruka:masterfrom
norkans7:master
Open

password reset functionality,#6
norkans7 wants to merge 9 commits into
nyaruka:masterfrom
norkans7:master

Conversation

@norkans7
Copy link
Copy Markdown
Contributor

@norkans7 norkans7 commented Nov 6, 2012

No description provided.

Comment thread jukebox/users/views.py Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if you didn't specify anything the field labels would be the same as you are specifying here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to specify a help_text field in the models that is a bit more verbose, ex: "The new password you want to use on your account", "Please verify your new password."

Comment thread jukebox/users/models.py Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get rid of the trailing commas in ForeignKey and DateTimeField. :)

@nicpottier
Copy link
Copy Markdown
Collaborator

Still need to move to using templates for the emails..

@norkans7
Copy link
Copy Markdown
Contributor Author

norkans7 commented Nov 8, 2012

Comment thread jukebox/users/views.py
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this method needed?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks this this is because the inherited version is expecting an object when doing smart_url. There's no object in this view, so this method sidesteps that.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so.. it should only require an object if you are using a URL in the form 'id@users.user_update'

You should be able to set the success URL to @users.user_login as it is in the view above.. if not then we should fix that in Smartmin.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya, I think it's a change required in smartmin.

On Thu, Nov 8, 2012 at 1:33 PM, Nic Pottier notifications@github.comwrote:

In jukebox/users/views.py:

@@ -28,3 +52,47 @@ def post_save(self, obj):
obj.groups.add(group)

         return obj
  • class Forget(SmartFormView):
    
  •      form_class = UserForgetForm
    
  •      permission = None
    
  •      success_message = "An Email has beeen sent to your account."
    
  •      success_url = "users.user_login"
    
  •      fields = ('email', )
    
  •      def get_success_url(self):
    
  •           return reverse(self.success_url)
    

I don't think so.. it should only require an object if you are using a URL
in the form 'id@users.user_update'

You should be able to set the success URL to @users.user_login as it is in
the view above.. if not then we should fix that in Smartmin.


Reply to this email directly or view it on GitHubhttps://github.com//pull/6/files#r2068071.

@nicpottier
Copy link
Copy Markdown
Collaborator

Just those last few tweaks and you are good to go!

@norkans7
Copy link
Copy Markdown
Contributor Author

norkans7 commented Nov 8, 2012

@ericnewcomer @nicpottier @reugene finished the proposed changes... is it now ready?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants