django-uuid-upload
Library for Django that automatically stores uploaded files as mydir/{uuid}.jpg or mydir/{uuid}/original.jpg.
Installation
pip install django-uuid-upload
Usage
from django.db import models
from django_uuid_upload import upload_to_uuid
class Post(models.Model):
# Store uploaded files as posts/{uuid}.jpg
image = models.ImageField(upload_to=upload_to_uuid('posts'))
# Or, store uploaded files as posts/{uuid}/original.jpg
image = models.ImageField(upload_to=upload_to_uuid('posts', make_dir=True))
Metadata
Release files for django-uuid-upload 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-uuid-upload-1.0.0.tar.gz | 1.5 kB | Details |
Release files / django-uuid-upload-1.0.0.tar.gz
| Download URL | django-uuid-upload-1.0.0.tar.gz |
|---|---|
| Size | 1.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c62fd45bbff90e0f4444f8ff0b5fafb4b51d725f26d5ff749263db33f04934e
|
|
BLAKE2b-256 checksum How to use checksums |
6976e65b50e15b4f96215ad67bf4e3d63afc6bbe2fb8a21b8902163e60169405
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|