374: users/ - URL should be configurable

karl%ach*********@gtempacc******** (Google Code) (Is this you? Claim this profile.)
Jan. 24, 2008
I am trying to run another django-app alongside reviewboard.
To avoid collision, I want to change some of reviewboards URLs, most
notably the /users URL.

I changed the base in urls.py , BUT the following problem ensues:
clicking on any user in the list of /newbase/users/ leads to /users/<name>
, i.e. the wrong place !

I found this is because ReviewRequestDataGrid uses
link_funk=DataGrid.link_to_value , which calls User.get_absolute_url ,
defined in  django.contrib.auth.models as /users/%s/ 

Now, I can install a second copy of django and change
django/contrib/auth/models.py, but should't reviewboard derive from User
and override get_absolute_url to fit in the general scheme ?


What's the URL of the page containing the problem?
  /newbase/users/

What steps will reproduce the problem?
1. in urls.py, add a prefix to the users/ urls
2. go to /newbase/users/ and click on a user
3.

What is the expected output? What do you see instead?
   Expected: redirect to /newbase/users/<username>
   Actual  : redirect to /users/<username>

What operating system are you using? What browser?
  Linux/Firefox

Please provide any additional information below.
chipx86
#1 chipx86
We're doing it correctly. The problem is that Django doesn't allow for modifying the
User URL. It should and probably will in the future (as the new URL stuff maps the
object to its first matching view in the URLs list).

We don't subclass User because that would cause problems and the Django guys really
recommend against it. This really is a third party problem and I'd recommend asking
the Django guys if they could update User to use the new URL stuff or at least make
it configurable. I'm sure they'd welcome a patch.
chipx86
#2 chipx86
  • +ThirdParty