Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> Python

Django – Quản lý file dựa trên Admin (Admin-based File Management)


django-filer cung cấp giao diện quản lý file/ảnh trong Django Admin: upload, thư mục, thumbnail, canonical URL.

Cài đặt

  1. pip install django-filer

  2. Settings: thêm 'easy_thumbnails', 'filer', 'mptt', cấu hình thumbnail processors.

  3. URL: path('filer/', include('filer.urls'))

Tính năng

  • Drag-drop upload, tạo thư mục, tìm kiếm.

  • Tự động tạo thumbnail nhiều kích cỡ.

  • Canonical URL cho từng file (dùng trong template).