relativizing the urls

  • 2
  • 20 Aug '14

I found the Spirit software about a week ago. It's very attractive and elegant, and I'm trying to integrate it into an existing Django site. A few questions came up. Sorry, they are questions from a novice. Here is the first of them.

For integration into the existing site, it would be simpler for the forum-related urls to appear not at

but at something like

It just about worked to put

url(r'^teaching/forum', include('spirit.urls', namespace="spirit", app_name="spirit"))

in the site's main .urls file. But in a couple of places, apparently urls related to authentication, this gives a 404. For example, when the user isn't logged in, then clicking on "create topic" sends the browser to

But after changing the .url configuration, the login page is at

Perhaps I'm overlooking a simple way to fix this.



Esteban C Borsani
  • 20 Aug '14


url(r'^teaching/forum', include('spirit.urls', namespace="spirit", app_name="spirit"))

That should work just fine. You are probably overwriting LOGIN_URL in your
There is a example that extends the Spirit settings, you should use it as your base. If you need to set any Django setting, you should check first the Spirit settings so you don't break things.

There is also a local settings sample file you can use to define common settings such as database config. You can't extend Spirit settings here, only overwrite them. Rename it to and it will be imported by your

  • 20 Aug '14

Oh, thankyou! Yes, that was exactly it.