Usage

django-periodicals integrates a couple other applications to provide it’s features.

settings.py

Add periodicals and the other applications it uses to INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'haystack',
    'tagging',
    'captcha',
    'periodicals',
)

Configure your Haystack backend. Here is an example using Whoosh:

HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
        'PATH': os.path.join(os.path.abspath(os.path.dirname(__file__)), 'whoosh_periodicals_index'),
        'STORAGE': 'file',
        'POST_LIMIT': 128 * 1024 * 1024,
        'INCLUDE_SPELLING': True,
        'BATCH_SIZE': 100,
    },
}

Configure your reCAPTCHA keys - only used when users add links to Articles or Issues (this feature can be disabled):

RECAPTCHA_PRIVATE_KEY = "your-recaptcha-private-key"
RECAPTCHA_PUBLIC_KEY = "your-recaptcha-public-key"

Configure you Site in the Django Site application - only used when users add links to Articles or Issues and when you haven’t disabled email notifications.

urls.py

Choose a URL prefix at which to base the application:

...
import periodicals

urlpatterns = patterns('',
    ...
    url(r'^admin/', include(admin.site.urls)),
    url(r'^periodicals/', include(periodicals.urls)),
)

Database Setup

$ python manage.py syncdb

Optional Settings

You can control the display format for Author, Periodical, and Issue instances and their URL slugs through the following settings.py values. The default values are shown below:

PERIODICALS_AUTHOR_FORMAT = "%(last_name)s, %(first_name)s %(middle_name)s %(postnomial)s"
PERIODICALS_AUTHOR_SLUG_FORMAT = "%(last_name)s %(first_name)s %(middle_name)s %(postnomial)s"

PERIODICALS_PERIODICAL_FORMAT = "%(name)s"
PERIODICALS_PERIODICAL_SLUG_FORMAT = "%(name)s"

PERIODICALS_ISSUE_FORMAT = "Vol. %(volume)s No. %(issue)s"
PERIODICALS_ISSUE_SLUG_FORMAT = "%(volume)s %(issue)s"
Read the Docs v: latest
Versions
latest
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.