Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
=== Cab === Cab (named for the jazz bandleader and scat singer Cab Calloway) is a Django application which allows users to post and share useful "snippets" of code. Installation notes ================== Cab has a couple of external dependencies: * `Pygments`_ for code highlighting. Additionally, the default setup requires a few applications which are bundled with Django itself: * ``django.contrib.comments`` to enable commenting. * ``django.contrib.markup`` to handle Markdown formatting of comments. * ``django.contrib.syndication`` to enable feeds. It's also recommended that you have ``django.contrib.admin`` installed for ease of site maintenance. Once you've got those taken care of, do a Git checkout of Cab from somewhere on your Python path:: git clone git://github.com/girasquid/cab.git python cab/setup.py install Then add ``cab`` to the ``INSTALLED_APPS`` setting of your Django project, run ``manage.py syncdb``, and either put a call to ``include('cab.urls')`` somewhere inn your root URLConf or copy over the URL patterns from Cab that you want to use. Note that the ``get_absolute_url`` methods of the ``Language``, ``Snippet`` and ``Tag`` models assume that they will live under the URLs ``/languages/``, ``/snippets/`` and ``/tags/``, so if you want them to go elsewhere you'll need to edit those methods or ovveride them with Django's ``ABSOLUTE_URL_OVERRIDES`` setting. .. _Pygments: http://pygments.org/ Templates ========= The Git checkout will get you a set of example templates matching those currently in use on `djangosnippets.org`_, but they assume the existence of base project-wide templates used by that site; you'll need to either create templates with the same names to extend, or edit the included templates to suit your site's layout. If you choose to simply create the appropriate base templates, you shouldn't need to do anything special to have Django pick up Cab's built-in templates; Django's "app directories" template loader should notice them and use them. .. _djangosnippets.org: http://www.djangosnippets.org/