Merge lp://staging/~gepatino/ubuntu-accomplishments-web/userprofile_username into lp://staging/ubuntu-accomplishments-web
Status: | Merged |
---|---|
Merged at revision: | 181 |
Proposed branch: | lp://staging/~gepatino/ubuntu-accomplishments-web/userprofile_username |
Merge into: | lp://staging/ubuntu-accomplishments-web |
Diff against target: |
144 lines (+26/-33) 3 files modified
common/utils.py (+1/-0) gallery/urls.py (+8/-9) gallery/views.py (+17/-24) |
To merge this branch: | bzr merge lp://staging/~gepatino/ubuntu-accomplishments-web/userprofile_username |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
ubuntu-accomplishments-web-editor-drivers | Pending | ||
Review via email: mp+112258@code.staging.launchpad.net |
Description of the change
Now uses UserProfile.
By using django.
By doing this, the urls for trophies in gallery/urls.py now works with /w in the username part.
Before this changes, all of these urls where valid:
- /gallery/
- /gallery/
- /gallery/
- /gallery/trophies/ - all trophies for the logged user
The problem with the last two ones is that if no user was logged, it failed to get the UserProfile because request.user was an AnonymousUser, so it didn't make any sense to have those.
Anyway, I left the code to detect if the user from the url is the same as the logged in user, and in that case some messages are different in the response.