Skip to main content

Attach files to Django models

Project description

Paperclip

Add attachments to Django models, used MapEntity.

INSTALL

pip install paperclip

USAGE

  • Add paperclip to INSTALLED_APPS

  • Include urls

urlpatterns = patterns(
    '',
    ...
    url(r'^paperclip/', include('paperclip.urls')),
    ...
)
  • Include scripts in template

::

<script src=”{% static “paperclip/bootstrap-confirm.js” %}” type=”text/javascript”></script> <script src=”{% static “paperclip/spin.min.js” %}” type=”text/javascript”></script> <script src=”{% static “paperclip/paperclip.js” %}” type=”text/javascript”></script>

If you use bootstrap 3, please include paperclip/bootstrap-3-confirm.js instead of paperclip/bootstrap-confirm.js.

  • Include list and form in template

{% include 'paperclip/attachment_list.html' with attachment_form_next=object.get_detail_url %}

AUTHORS

makinacom

LICENSE

  • LGPL

CHANGELOG

0.2.3 (2014-12-15)

  • Handle swappable User model

  • Embed spinner, bootstrap-confirm and add a bootstrap-3-confirm

  • Remove crispy_forms dependency

0.2.2 (2014-11-14)

  • Fix permission check for attachments

0.2.0 (2014-11-12)

  • Allow to override file types from request.

0.1.3 (2014-11-07)

  • Fix packaging of locale files

0.1.2 (2014-11-07)

  • Fix upload regular expressions for author and legend

0.1.1 (2014-11-03)

  • Fix missing SVG media in package

0.1.0 (2014-10-23)

  • Initial working version

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

paperclip-0.2.3.dev0.tar.gz (60.2 kB view details)

Uploaded Source

File details

Details for the file paperclip-0.2.3.dev0.tar.gz.

File metadata

File hashes

Hashes for paperclip-0.2.3.dev0.tar.gz
Algorithm Hash digest
SHA256 e1e5e9140ea0934b71f4a6d6491f5de12d725276baeabd65fe3b6ebb39d6d111
MD5 eb0080494aa86ea35b7ccbfba8d6fc83
BLAKE2b-256 0f4f7f3553d8b7d55291b8f9e6812eee7c2a73689a7ad3b9fac9d93c3de27e31

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page