django-doccloud

Provides a reusable document app which interfaces with DocumentCloud
Download

django-doccloud Ranking & Summary

Advertisement

  • Rating:
  • License:
  • The Apache License 2.0
  • Price:
  • FREE
  • Publisher Name:
  • Bay Citizen & Texas Tribune
  • Publisher web site:
  • http://armstrongcms.org

django-doccloud Tags


django-doccloud Description

django-doccloud is a Django app created to facilitate uploads and display of documents hosted on the DocumentCloud service.pip install this project: pip install django-doccloudExamples of how to use this package can be found in doccloud/views.py and doccloud/templates/*Getting StartedYou're settings.py file needs three variablesProvide credentials and a path to save the document locally DOCUMENTS_PATH = os.path.join(MEDIA_ROOT, 'documents') DOCUMENTCLOUD_USERNAME='****' DOCUMENTCLOUD_PASS='****'Add the urls to your project's urls.py file: (r'^docs/', include('doccloud.urls')),The example templates assume you have the following template loader 'django.template.loaders.app_directories.Loader',Add 'doccloud' to your installed apps list in settings.pyStart your server and navigate to host:port/docs/A few notesDocuments deleted using the admin interface will attempt to remove themselves from documentcloud but in the case of a failure, the documentcloud doc will be orphaneddoccloud/admin.py contains the admin formdoccloud/forms.py has a model form you can use on any pagedoccloud/views.py contains an example using the model formdoccloud.models.Document.connect_dc_doc() uploads the doc to documentcloud. For larger documents that can take some time upload, this function should be run async with celery/rabbitmq or the likePrivate documents and large documents that have not finished processing in documentcloud will not appear on the templates/detail.html page unless the user is logged in to documentcloud. Some JS code could test to see if the document's doccloud url exist otherwise fall back on the locally stored document.More on this package at: http://www.baycitizen.org/blogs/sandbox/djangodocumentcloud-integration-theres/Product's homepage


django-doccloud Related Software