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.tar.gz (60.2 kB view hashes)

Uploaded Source

Supported by

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