django-mega-drive-1.6
توضیحات
mega drive storage for django implemented with mega.py package
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | django-mega-drive-1.6 |
| نام | django-mega-drive |
| نسخه کتابخانه | 1.6 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Rahul Singh |
| ایمیل نویسنده | rahulsingh32929@gmail.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/django-mega-drive/ |
| مجوز | MIT |
settins.py
```
MEGA_ACCOUNTS = {
'default': {
'email': 'mega drive account email here',
'password': "mega drive account password"
},
# define another account with anothers alias
}
```
models.py
```
from mega_drive.storage import MegaDriveStorage
from django.db import model
drive_storage = MegaDriveStorage(account_alias='default')
second_drive_storage = MegaDriveStorage(
account_alias="another_mega_drive_alias")
class Profile(models.Model):
image = models.ImageField(
upload_to='upload_destination', storage=drive_storage)
image = models.FileField(
upload_to='upload_destination', storage=second_drive_storage)
...
```
نحوه نصب
نصب پکیج whl django-mega-drive-1.6:
pip install django-mega-drive-1.6.whl
نصب پکیج tar.gz django-mega-drive-1.6:
pip install django-mega-drive-1.6.tar.gz