Attachments management app for django
Project description
Django application to manage attached files to any django model.
Install
pip install django_attachments_management
Configure
Add ‘django_attachments’ to INSTALLED_APPS.
Usage
Add GalleryField or LibraryField to django model.
from django.db import models
from django_attachments.fields import LibraryField, GalleryField
class Article(models.Model):
title = models.CharField(max_length=100)
attachments = LibraryField(related_name='articles_with_attachment', on_delete=models.CASCADE)
gallery = GalleryField(related_name='articles_with_gallery', on_delete=models.CASCADE)
Use AttachmentsAdminMixin to enable attachments in admin interface.
from django.contrib import admin
from .models import Article
from django_attachments.admin import AttachmentsAdminMixin
class ArticleAdmin(AttachmentsAdminMixin, admin.ModelAdmin):
pass
admin.site.register(Article, ArticleAdmin)
Screenshots
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_attachments_management-1.2.4.tar.gz.
File metadata
- Download URL: django_attachments_management-1.2.4.tar.gz
- Upload date:
- Size: 58.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d6d46c8f9353f9ed496eb7aefd2c7d5fd9ba2e88f29793b93b68b44bfa594a7
|
|
| MD5 |
1f488976ff20baa7da460d3793dd3463
|
|
| BLAKE2b-256 |
6f815d17bf4b1b8e48181a45c92ef529a6d50314c8ccc2ffa47f54d56c4eaf36
|
File details
Details for the file django_attachments_management-1.2.4-py3-none-any.whl.
File metadata
- Download URL: django_attachments_management-1.2.4-py3-none-any.whl
- Upload date:
- Size: 60.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb80ab11286546586204593be7f145b0652f52cbf46ebd6517fcac8bf85ffaed
|
|
| MD5 |
26462d74450150c7a5b7c3bed489f113
|
|
| BLAKE2b-256 |
e31824b55f4846481f61b5a13c26b4fdbbf3c95eaac8d2a133ca963ad5cb5412
|