google-code-export / django-forum

Automatically exported from code.google.com/p/django-forum
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Allow configurable URLs #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Allow users to host the forums at any URL they choose. This patch requires
FORUM_BASE to be set to something like '/forum' or ''.

Original issue reported on code.google.com by jshaffer...@gmail.com on 4 Jun 2007 at 2:08

Attachments:

GoogleCodeExporter commented 9 years ago
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.

Original comment by javinie...@gmail.com on 7 Oct 2007 at 8:57

Attachments:

GoogleCodeExporter commented 9 years ago
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.

Original comment by mand...@gmail.com on 11 Oct 2007 at 9:37

GoogleCodeExporter commented 9 years ago
javinievas: You seem to have uploaded the wrong file.

Original comment by jshaffer...@gmail.com on 11 Oct 2007 at 10:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
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/.

Original comment by rwpoul...@gmail.com on 12 Oct 2007 at 12:52

GoogleCodeExporter commented 9 years ago
Latest revision uses settings.FORUM_BASE in get_absolute_url(). Readme updated.

Original comment by rwpoul...@gmail.com on 12 Oct 2007 at 1:03