My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 3: Allow configurable URLs
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Oct 2007


 
Reported by jshaffer...@gmail.com, Jun 3, 2007
Allow users to host the forums at any URL they choose. This patch requires
FORUM_BASE to be set to something like '/forum' or ''.
forum_base.diff
2.7 KB   Download
Oct 7, 2007
#1 javinie...@gmail.com
I have modified the source to use the reverse urls and i18n, so it is now pluggable
into any url with no need of source modification. And also allows to define some
languages to be used.
forum_base.diff
2.7 KB   View   Download
Oct 11, 2007
#2 mand...@gmail.com
url.py: forum_regex = '^' + settings.FORUM_BASE[1:] + '/'

This line confused me because it includes a trailing slash.  All other paths in my
settings.py have a trailing slash so my settings.FORUM_BASE = '/forum/'.  Maybe you
should alter the regex or just specify a trailing slash is needed to maintain what
seems to be a convention.
Oct 11, 2007
#3 jshaffer...@gmail.com
javinievas: You seem to have uploaded the wrong file.
Oct 11, 2007
Project Member #5 rwpoul...@gmail.com
I like the idea of having this configurable, however I don't think it needs a new
urls.py. As this is an application, your master urls.py would have something like:

    (r'^my/path/to/forum/', include('djangoforum.urls')),

djangoforum.urls then only has to have relative URI's. We therefore only need to
update models.py to use settings.FORUM_BASE rather than assuming /forum/.

Status: Accepted
Oct 11, 2007
Project Member #6 rwpoul...@gmail.com
Latest revision uses settings.FORUM_BASE in get_absolute_url(). Readme updated.
Status: Fixed

Powered by Google Project Hosting