Opened 13 years ago

Last modified 13 years ago

#115 closed defect (FIXED)

Redirect and show message after editing profile

Reported by: Jef van Schendel Owned by: Caleb Davis
Priority: minor Milestone: 0.0.4
Component: programming Keywords:
Cc: Parent Tickets:

Description

After you edit your profile, you are redirected to the root page.

What should happen: the site goes to your profile page and shows a
notification on top using our shiny new messaging system.



Change History (9)

comment:1 by Caleb Davis, 13 years ago

Milestone: 0.0.3
Owner: set to Caleb Davis
ooh, ooh, lemme do it.



comment:2 by Caleb Davis, 13 years ago

ok, shiny happy successful edit profile message appears without
extra navigation. This was a change of route name and an
add\_message(...)

[https://gitorious.org/\ :sub:`cfdv/mediagoblin/cfdvs-mediagoblin/commit/d9ed098e74617916de85142400b00af973a49b76](https://gitorious.org/`\ cfdv/mediagoblin/cfdvs-mediagoblin/commit/d9ed098e74617916de85142400b00af973a49b76)



comment:3 by Christopher Allan Webber, 13 years ago

Status: NewClosed
Merged!



comment:4 by Elrond, 13 years ago

Milestone: 0.0.30.0.4
Status: ClosedIn Progress
Reopening after talking to Celeb:

Jef suggested to redirect to the user's homepage.
The current code redirects to the "edit profile" page. ;)

Should be easy to fix.



comment:5 by Caleb Davis, 13 years ago

I changed the redirect after form validation to point to the user
home page instead of the edit profile page.

when you merge, you'll probably want to


-  user=user['username'])
-  user=edit\_username)

[https://gitorious.org/\ :sub:`cfdv/mediagoblin/cfdvs-mediagoblin/commits/b404\_v2\_redirect\_after\_profile\_edit](https://gitorious.org/`\ cfdv/mediagoblin/cfdvs-mediagoblin/commits/b404\_v2\_redirect\_after\_profile\_edit)



comment:6 by Christopher Allan Webber, 13 years ago

Status: In ProgressClosed
404 merge not found, I mean merged.



comment:7 by Caleb Davis, 13 years ago

I get an error upon submitting the profile edit

::

      File "/home/vdfc/src/mediagoblin/mediagoblin/edit/views.py", line 111, in edit_profile
        username=edit_username)
      File "/home/vdfc/src/mediagoblin/mediagoblin/util.py", line 136, in redirect
        return exc.HTTPFound(location=request.urlgen(*args, **kwargs))
      File "/home/vdfc/src/mediagoblin/eggs/Routes-1.12.3-py2.6.egg/routes/util.py", line 420, in __call__
        (args, kargs))
    GenerationException: Could not generate URL. Called with args: ('mediagoblin.user_pages.user_home',) {'username': u'dev_user2'}

I'm not sure how to re-open the bug. Let's do this

::

    diff --git a/mediagoblin/edit/views.py b/mediagoblin/edit/views.py
    index a3326b2..3bcf788 100644
    --- a/mediagoblin/edit/views.py
    +++ b/mediagoblin/edit/views.py
    @@ -108,7 +108,7 @@ def edit_profile(request):
                                     'Profile edited!')
                 return redirect(request,
                                'mediagoblin.user_pages.user_home',
    -                           username=edit_username)
    +                           user=edit_username)
    
         return render_to_response(
             request,

or,
[https://gitorious.org/\ :sub:`cfdv/mediagoblin/cfdvs-mediagoblin/commits/b404\_v3\_edit\_profile\_submit\_fail](https://gitorious.org/`\ cfdv/mediagoblin/cfdvs-mediagoblin/commits/b404\_v3\_edit\_profile\_submit\_fail)



comment:8 by Christopher Allan Webber, 13 years ago

Added you as manager, you should be able to reopen bugs now.

Anyway, good call, and merged! Thanks!



comment:9 by Will Kahn-Greene, 12 years ago

The original url for this bug was http://bugs.foocorp.net/issues/404 .

Note: See TracTickets for help on using tickets.