My favorites | Sign in
Project Logo
                
Code license: New BSD License
Labels: django, blogs
Feeds:
People details
Project owners:
  jack.hsu
Project committers:
coopgeoff

Welcome to Grappelli - a Django app that supports multiple blogs. It is currently compatible with Django 0.97 pre.

I'm making some changes to the code for Django 1.0 compatibility. Stay tuned!

By the way, this app is currently being used by The Globe and Mail's new education website, GlobeCampus.ca -- http://www.globecampus.ca/blogs/freshman-life/. Check it out!

About This Document

This document includes instructions on installing the django-blogs app. The goal is to provide everything you need to know to get started on using django-blogs.

Note: This is an unfinished document. Holes are actively being filled. Please check back for regular updates.

Dependencies

The templates provided requires two Django apps to be loaded: django.contrib.humanize and django.contrib.markup.

Add the following to the INSTALLED_APPS variable in your project's settings.py module.

INSTALLED_APPS = (
    // ...
    'django.contrib.humanize',
    'django.contrib.markup',
)

The markup module is to enable Markdown formatting syntax in the comments. In order for it to work you need to make sure the markdown module is available in your PYTHONPATH. If you don't have markdown already, please visit this website.

Of course, markdown is totally optional. If you don't want to include it feel free to leave it out of the INSTALL_APPS list. Just make sure you make corresponding changes to your templates or else you'll get exceptions.

JavaScript Libraries

The JavaScript used by django-blogs relies on the jQuery library. You can download it from their website. The latest tested version is jQuery 1.2.6 -- newer version should work as well.

The dashboard interface uses tiny_mce for the advanced HTML editor. You can grab it from their website: http://tinymce.moxiecode.com/download.php. The latest version that has been tested to work is 3.0.4.1, but newer versions will most likely work as well. If something breaks please let me know!

Getting Started

These are the steps to start using django-blogs in your project.

Grab The App

Currently you can only obtain a copy of the code by checking out the trunk from SVN. I'll provide easier installation methods as this project matures.

To checkout from trunk, execute the following command:

svn checkout https://django-blogs.googlecode.com/svn/trunk/ django-blogs

You can change the folder name to your liking, it is named django-blogs here. Inside the checked-out folder will be a sub-folder called blogs. This folder contains the actual application.

Make sure the blogs application is located somewhere in your PYTHONPATH envrionment variable. Usually you'll just have it residing in your project path. The easiest way to do this is to create a symbolic link inside your <project path>.

ln -s <path to django-blogs>/blogs <project path>/blogs

Add New Settings

You need to define a few variables in your project's settings.py file.

BLOGS_MEDIA_PREFIX
JQUERY_PREFIX
TINY_MCE_PREFIX
BLOG_ADMIN_NUM_ITEMS
DEFAULT_CACHE_TIME
POST_EDITOR_MODE
BLOG_EDITOR_MODE
RECAPTCHA_SETTINGS 
RECAPTCHA_PUB_KEY
RECAPTCHA_PRIVATE_KEY

There's an example file here for reference. You can copy and paste the contents of that file in your settings.py. The five things that you really need to change are: BLOGS_MEDIA_PREFIX, JQUERY_PREFIX, TINY_MCE_PREFIX, RECAPTCHA_PUB_KEY, and RECAPTCHA_PRIVATE_KEY.

to be continued...

Help

Any questions or comments are welcome. E-mail me at <jack.hsu@gmail.com>.









Hosted by Google Code