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

============ Django Forum

This is a very basic forum application that can plug into any existing Django installation and use it's existing templates, users, and admin interface.

It's perfect for adding forum functionality to an existing website.

Development was done on Django SVN rev. 5007. YMMV on other revisions.

Please send comments/suggestions to me directly, ross at rossp dot org.

Google Code Page / SVN: http://code.google.com/p/django-forum/ My Home Page: http://www.rossp.org

Current Status

[1] http://code.google.com/p/django-registration/

Getting Started

  1. Checkout code via SVN into your python path. svn co http://django-forum.googlecode.com/svn/trunk/ forum
  2. Add 'forum' to your INSTALLED_APPS in settings.py. Also add 'django.contrib.markup' if you haven't already got it there.
  3. ./manage.py syncdb
  4. Update urls.py: (r'^forum/', include('forum.urls')),
  5. Go to your site admin, add a forum
  6. Browse to yoursite.com/forum/
  7. Enjoy :)

Note: The forum software can be at any URI you like, just change the relevant urls.py entry. EG replace 'forum/' with '/' to have your forum at the root URI, or 'mysite/community/forum/' - whatever you need.

Note: You can include the forum sitemaps in your main sitemap index. Example:

from forum.urls import sitemap_dict as forum_sitemap

yoursitemap_dict.update(forum_sitemap)

urlpatterns = patterns('',
    (r'^sitemap.xml$', 'django.contrib.sitemaps.views.index', {'sitemaps': yoursitemap_dict}),
    (r'^sitemap-(?P<section>.+)\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': yoursitemap_dict}),
)

Upgrading

If you've upgraded from an SVN revision prior to r51, you will need to update your database using the following commands:

MySQL:

ALTER TABLE forum_post ADD COLUMN body_html longtext; ALTER TABLE "forum_forum" ADD COLUMN "ordering" integer NULL;

Or, PostgreSQL:

ALTER TABLE "forum_post" ADD COLUMN "body_html" text; # PostgreSQL ALTER TABLE "forum_forum" ADD COLUMN "ordering" integer NULL;

Then, from a Python shell:

from markdown import markdown from forum.models import Post for post in Post.objects.all(): ... post.body_html = '' ... post.save() ... exit()

Thanks

The following people have contributed code or ideas to this project. Thank you for all of your efforts: