- Return form errors as JSON from
add_attachment()
view when theX-Return-Form-Errors
request header is present. Response code is 400 - BAD REQUEST because this is a client error.
- Support custom form validators via
AppConfig.attachment_validators
- Remove quotes from "attachment_list" (Aaron C. de Bruyn)
- Add a URL for matching objects with a UUID4 primary key. Fix Issue #94 (Aaron C. de Bruyn)
- Document settings supported by django-attachments
- Document how to make a new release. Closes Issue #78
- Start testing with GitHub Actions
- Drop testing with end-of-life versions of Django
- Add testing with Django 4.0 and 4.1, Python 3.9 and 3.10 and switch the default Python version used to 3.10
- Add testing w/ Python 3.11 - supported only on Django 4.1 for now
- Rebuild the previous version but don't ship a left-over migration file
- Configure PK explicitly to AutoField for Django 3.2+, see https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys
- Start testing with Django 3.2
- Fix typo in README (Jesaja Everling)
- Enable syntax highlighting in README (Basil S)
- Alter
object_id
fromTextField()
toCharField(max_length=64)
, and keep the db_index argument. This resolves the issues on MariaDB/MySQL.
- Add DB index to
object_id
,created
andmodified
fields. - Add
delete_stale_attachments
command to remove attachments for which the corresponding object has been deleted. - Add
Attachment.attach_to()
method for moving attachments between different objects. - Django 3.1 compatibility and tests.
- Primary keys of related objects other than Integers (such as UUIDs) are now supported.
- Dropped support for Python 3.4.
- Added suport for Python 3.8.
- Django 3.0 compatibility and tests.
- Django 2.2 compatibility and tests.
- The templatetags now allow an optional next parameter.
- Dropped Support for Django <=1.10.
- Fixed 'next' URL argument redirect.
- Django 2.1 and Python 3.7 support.
- General code cleanup.
- Added a missing database migration.
- New templatetag
attachments_count
. - New setting
DELETE_ATTACHMENTS_FROM_DISK
to delete attachment files if the attachment model is deleted. - New setting
FILE_UPLOAD_MAX_SIZE
to deny file uploads exceeding this value.
- Django 1.11 and 2.0 compatibility and tests.
- Django 1.10 compatibility and tests.
- Python 3.6 compatibility and tests.
- Fixes problems where models have a foreign key named something other than "id".
- Added finnish translation.
- Minor test suite improvements.
General code cleanup to keep compatibility with the latest Django (currently 1.8 upwards) as well as Python3. Introduced full testsuite.
Backwards incompatible: The attachment views now use a urlpattern
namespace
so you need to adjust the urlpattern:url(r'^attachments/', include('attachments.urls', namespace='attachments')),
- Backwards incompatible: The quotes around the
as
variable name must be removed:
{% get_attachments_for entry as "my_entry_attachments" %} becomes {% get_attachments_for entry as my_entry_attachments %}
- Backwards incompatible: The quotes around the
- Possibly backwards incompatible: The old version had bugs around
permissions and were not enforcing it in all places. From now on the related permissions
add_attachment
anddelete_attachment
must been applied to all related users.
- Added a note to the README that you should secure your static files.
This version adds more granular control about user permissons. You need to explicitly add permissions to users who should been able to upload, delete or delete foreign attachments.
This might be backwards incompatible as you did not need to assign add/delete permissions before!