Django Simple Attachment Model
Project description
Django 图片存储
Getting Started
Install Packages
$ pip install sorl-thumbnail
$ pip install django-taggit
$ pip install django-extra-fields
$ pip install djangorestframework
$ pip install django-simple-attachments
Update settings.py
INSTALLED_APPS = [
...
'taggit',
'rest_framework',
'attachments',
...
]
Update urls.py
from attachments.views import media_view
urlpatterns = [
...
path('attachments/', include('attachments.urls')),
re_path(r'^media/attachments/(?P<path>.*)(/?)?', media_view),
...
]
Usage
Realtime resize image source
<img src="/media/attachments/0001.png?width=100&height=100" />
Next
- AutoClean
- Premissions
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
File details
Details for the file django-simple-attachments-0.0.1.tar.gz
.
File metadata
- Download URL: django-simple-attachments-0.0.1.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f210b87bcc2951ddf926b560a8a209a511dda64344166e32581fabc7584f9a6b |
|
MD5 | 4a5d577b8034a7e3c015093f0e19dc53 |
|
BLAKE2b-256 | c44f7a378a7905f36055725f6806da710d235fedf3292a0f0983da994161ec9e |
File details
Details for the file django_simple_attachments-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: django_simple_attachments-0.0.1-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72e92b89fe72943fdaa9509a9647ddba051192f3ee9761cc9403404fcdc47e23 |
|
MD5 | 38d6d9ac28a85e74ae66f066306a9554 |
|
BLAKE2b-256 | 9aa7630744d95b68d1c43d21420fd91445ad52219cb9534d9ade4cb818467fb6 |