Merge lp://staging/~cjohnston/qa-dashboard/user-edit-profile into lp://staging/qa-dashboard

Proposed by Chris Johnston
Status: Merged
Approved by: Chris Johnston
Approved revision: 646
Merged at revision: 645
Proposed branch: lp://staging/~cjohnston/qa-dashboard/user-edit-profile
Merge into: lp://staging/qa-dashboard
Diff against target: 369 lines (+285/-6)
8 files modified
common/forms.py (+24/-0)
common/static/css/new-style.css (+84/-0)
common/templates/form.html (+26/-0)
common/templates/layout.html (+2/-1)
common/tests/__init__.py (+1/-0)
common/tests/test_profile.py (+116/-0)
common/views.py (+31/-5)
qa_dashboard/urls.py (+1/-0)
To merge this branch: bzr merge lp://staging/~cjohnston/qa-dashboard/user-edit-profile
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve
PS Jenkins bot continuous-integration Approve
Chris Johnston Needs Resubmitting
Review via email: mp+192043@code.staging.launchpad.net

Commit message

Adds the ability for a user to edit their profile

To post a comment you must log in.
Revision history for this message
Andy Doan (doanac) wrote :

1) This looks a little shady:
216 + try:
217 + profile = UserProfile.objects.get(user=request.user)
218 + except UserProfile.DoesNotExist:
219 + profile = UserProfile(user=request.user)
Why would request.user not exist?

2) This seems too verbose:
165 - <li>Logged in as: <a href="http://launchpad.net/~{{ user.username }}">{{ user.username }}</a></li>
166 + <li>Logged in as: <strong><a href="http://launchpad.net/~{{ user.username }}">{{ user.username }}</a></strong></li>
167 + <li><a href="{% url 'edit_profile' %}">Edit profile</a>

Why not just have the logged-in link take you to your profile. ie:

  <li>Logged in as: <a href="{% url 'edit_profile' %}">{{ user.username }}</a></li>

Revision history for this message
Chris Johnston (cjohnston) wrote :

> 1) This looks a little shady:
> 216 + try:
> 217 + profile = UserProfile.objects.get(user=request.user)
> 218 + except UserProfile.DoesNotExist:
> 219 + profile = UserProfile(user=request.user)
> Why would request.user not exist?
>

It isn't trying request.user, it's trying the UserProfile, which a user may or may not have.

> 2) This seems too verbose:
> 165 - <li>Logged in as: <a href="http://launchpad.net/~{{ user.username
> }}">{{ user.username }}</a></li>
> 166 + <li>Logged in as: <strong><a href="http://launchpad.net/~{{
> user.username }}">{{ user.username }}</a></strong></li>
> 167 + <li><a href="{% url 'edit_profile' %}">Edit profile</a>
>
> Why not just have the logged-in link take you to your profile. ie:
>
> <li>Logged in as: <a href="{% url 'edit_profile' %}">{{ user.username
> }}</a></li>

Is that obvious enough? Would people know that they can click it to change their settings?

645. By Chris Johnston

Add ability for a user to edit their profile

Revision history for this message
Andy Doan (doanac) wrote :

> > 2) This seems too verbose:
> > 165 - <li>Logged in as: <a href="http://launchpad.net/~{{ user.username
> > }}">{{ user.username }}</a></li>
> > 166 + <li>Logged in as: <strong><a href="http://launchpad.net/~{{
> > user.username }}">{{ user.username }}</a></strong></li>
> > 167 + <li><a href="{% url 'edit_profile' %}">Edit profile</a>
> >
> > Why not just have the logged-in link take you to your profile. ie:
> >
> > <li>Logged in as: <a href="{% url 'edit_profile' %}">{{ user.username
> > }}</a></li>
>
> Is that obvious enough? Would people know that they can click it to change
> their settings?

Seemed so to me. Maybe we should ask a few other people though. I guess I just didn't see the point in a link that takes you to launchpad (and off our site)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:645
http://10.97.0.26:8080/job/dashboard-ci/210/
Executed test runs:

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/dashboard-ci/210/rebuild

review: Approve (continuous-integration)
Revision history for this message
Joe Talbott (joetalbott) wrote :

On Mon, Oct 21, 2013 at 08:09:21PM -0000, Andy Doan wrote:
> > > 2) This seems too verbose:
> > > 165 - <li>Logged in as: <a href="http://launchpad.net/~{{ user.username
> > > }}">{{ user.username }}</a></li>
> > > 166 + <li>Logged in as: <strong><a href="http://launchpad.net/~{{
> > > user.username }}">{{ user.username }}</a></strong></li>
> > > 167 + <li><a href="{% url 'edit_profile' %}">Edit profile</a>
> > >
> > > Why not just have the logged-in link take you to your profile. ie:
> > >
> > > <li>Logged in as: <a href="{% url 'edit_profile' %}">{{ user.username
> > > }}</a></li>
> >
> > Is that obvious enough? Would people know that they can click it to change
> > their settings?
>
> Seemed so to me. Maybe we should ask a few other people though. I guess I just didn't see the point in a link that takes you to launchpad (and off our site)

I'm +1 for staying on our site.

646. By Chris Johnston

Update per review

Revision history for this message
Chris Johnston (cjohnston) :
review: Needs Resubmitting
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:646
http://10.97.0.26:8080/job/dashboard-ci/211/
Executed test runs:

Click here to trigger a rebuild:
http://10.97.0.26:8080/job/dashboard-ci/211/rebuild

review: Approve (continuous-integration)
Revision history for this message
Andy Doan (doanac) wrote :

+1 by me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches