Search code examples
pythondjangoosqa

Django URLs: changing the default "/questions/" in OSQA URLs to something else


I am trying to mod OSQA to not use /questions anywhere in URLs, and change it to some other string, say /thisinstead.

Some examples

When the user clicks on the questions tab, instead of linking to mydomain.com/questions/, it should link to mydomain.com/somethingelse/.

Likewise, instead of mydomain.com/questions/3/Q3Title/, it should link to mydomain.com/somethingelse/3/Q3Title/.

And so forth.

What would be the most elegant approach to accomplishing this?


Solution

  • I took a very quick glance at the OSQA source code, and all of their urls are translated. So, you can just modify https://github.com/OSQA/osqa/blob/master/locale/en/LC_MESSAGES/django.po line 398, run django-admin compilemessages and done.

    For more info on customization, look at section D in https://github.com/OSQA/osqa/blob/master/INSTALL