Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fortunes manager written in Django.
Python
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
django_fortunes
django_fortunes_example
docs
extras/graphics
.gitignore
LICENSE
README.markdown
setup.py

README.markdown

Djortunes (django_fortunes app)

django_fortunes's a Django application to store fortunes (snippets of quotes, eg. IRC/IM ones). Originally inspired by the « Fortunes » application, by Maurice Svay.

screenshot

I'm discovering and learning both Python and Django while coding it, so don't expect too much reliability, but I would warmly welcome any code review against the code :)

If you're curious enough, you might check out the Symfony version of this app.

Prerequisites

  • Django 1.2 or more recent
  • django-registration 0.7
  • Eventually, the django-debug-toolbar if you plan to use the provided sample settings_local.py.sample file for a standard dev environment

Installation

Djortunes ship as a standalone application (located in the django_fortunes directory), and a sample Django project is also provided as an example of use (in the django_fortunes_example directory).

The better way to install dependencies (using a virtualenv is highly encouraged) is by using the provided pip requirements file:

$ pip install -r requirements.txt

You can adjust and override the project settings by configuring a custom settings file: a sample settings_local.py.sample file is provided within the example project directory. You can safely rename it settings_local.py and tweak its values.

Then, just run the ./manage.py runserver within the django_fortunes_example directory:

$ cd django_fortunes_example
$ ./manage.py runserver --settings=settings_local

Configuration

Several settings are available in the django_fortunes application, and you can override their defaults in your project's settings.py configuration file:

# Maximum number of fortunes to be shown in lists
FORTUNES_MAX_PER_PAGE = 10

# Maximum number of top fortune authors to display in the sidebar
FORTUNES_MAX_TOP_CONTRIBUTORS = 5

License

This work is released under the terms of the MIT license.

Authors

Something went wrong with that request. Please try again.