Package: dj-timelinejs
dj-timelinejs=============Support for [TimelineJS](http://timeline.verite.co/) served through Django.##Features* Support for TimelineJS title, era and normal slides* Support for markdown in slide content* Media upload and storage on Django site* Import existing TimelineJS Google Spreadsheets* Private/Public and Published/Unpublished timeline states##Basic UsageThis package supplies Django models and Class-Based-Views which make it easy tosave and serve up TimelineJS content from a Django site###Brief Installation Instructions1. pip install dj-timelinejs2. add `timelinejs` to your list of `INSTALLED_APPS` in `settings.py`3. `manage.py syncdb`4. Override urls and templates as noted below.###Adding TimelinesThis package supports two storage methods for Timelines.The preferred method is to store the timeline data directly in your Djangosite. You may do this through the admin interface by creating a Timeline objectin the Timelinejs admin panel. Timeline items are added through this sameinterface. Item content can use markdown syntax for formatting. Media can addedand it will be uploaded and serverd through your site, meaning users do notneed to find a way to host and link their media.The second method is to use the Google Spreadsheet template as documented at[http://timeline.verite.co/#make](http://timeline.verite.co/#make) and simplyset the `data_source` attribute on your Timeline instance to the url for thespreadsheet as indicated in the TimelineJS documentation. This is not preferredas markdown syntax is not implemented and loading a timeline will require anadditional request to fetch data from the Google Spreadsheet.If you have existing timelines in Google Spreadsheets you may import them usingthe `ImportTimelineFromSpreadsheet` view. Input the url of the GoogleSpreadsheet and valid items will be imported into the database and a newtimeline created.###Overriding URLS and TemplatesYou probably want to do your own url and template configuration. Class-Based-Views makes this easy.```python# your urls.pyfrom timelinejs.views import TimelineListView, \TimelineDeTailView, ImportTimelineFromSpreadsheetViewurls = patterns(''(r'^/$',TimelineListView.as_view(template_name='list_template_name.html'),name='timelines',),(r'^import/$',ImportTimelineFromSpreadsheetView.as_view(template_name='import_template_name.html'),name='import_timeline',),(r'^(?P<slug>[a-zA-Z0-9-_]+)/$',TimelineView.as_view(template_name='detail_template_name.html'),name='timeline',),)```Use the included templates as a sample and adjust based on your template setup.There is no templatetag support since the configuration of TimelineJS iscomplicated and you may want to use tools such as django_compressor for staticassets. A `Timeline` instance does have a `source` property which prints theGoogle Spreadsheet URL if your timeline is linked to a Google Spreadsheet, oroutputs the appropriate JSON generated from the corresponding Django models.Use `timeline.html` as a reference, but many more config options are available,see the TimelineJS documentation.###PermissionsOn top of the default permissions (add, change, remove which apply through theDjango admin) dj-timelinejs includes a `view_private_timelines` permission thattoggles whether or not a user sees private timelines.Users with the `add_timeline` permission will also be allowed to use the importfunction, and a `user_can_add_timelines` context variable is passed to the`TimlineListView` if you wish to include a link to the admin page for addingtimelines. See the timelines.html template as an example.