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
Close
Hashes for django-simple-attachments-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f210b87bcc2951ddf926b560a8a209a511dda64344166e32581fabc7584f9a6b |
|
MD5 | 4a5d577b8034a7e3c015093f0e19dc53 |
|
BLAKE2b-256 | c44f7a378a7905f36055725f6806da710d235fedf3292a0f0983da994161ec9e |
Close
Hashes for django_simple_attachments-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72e92b89fe72943fdaa9509a9647ddba051192f3ee9761cc9403404fcdc47e23 |
|
MD5 | 38d6d9ac28a85e74ae66f066306a9554 |
|
BLAKE2b-256 | 9aa7630744d95b68d1c43d21420fd91445ad52219cb9534d9ade4cb818467fb6 |