Appearance
Cài đặt & Thiết lập
Yêu cầu hệ thống
- Frappe Framework v15+
- Frappe Helpdesk (bản chính thức từ Frappe)
- Python 3.10+
- MariaDB 10.6+
- Frappe Cloud hoặc Bench tự host
Cài đặt trên Frappe Cloud
Bước 1: Thêm app vào Frappe Cloud
- Đăng nhập Frappe Cloud Dashboard
- Vào Apps → Add App
- Nhập repository:
https://github.com/tody-agent/login_with_haravan - Branch:
main
Bước 2: Cài app lên site
- Vào Sites → chọn site cần cài
- Install App → chọn
login_with_haravan - Chờ app cài đặt hoàn tất
Bước 3: Chạy setup tự động
App sẽ tự động chạy after_install hook để:
- Tạo
Social Login Keycho Haravan - Tạo DocType
Haravan Account Link - Cấu hình OAuth provider
Cài đặt trên Bench (tự host)
bash
# Từ thư mục bench
bench get-app https://github.com/tody-agent/login_with_haravan.git
bench --site your-site.local install-app login_with_haravan
bench --site your-site.local migrate
bench restartXác minh cài đặt
bash
# Kiểm tra app đã cài
bench --site your-site.local list-apps
# Kiểm tra compile
python3 -m compileall -q login_with_haravan
# Chạy test
PYTHONPATH=. python3 -m unittest discover -s login_with_haravan/tests -vCấu trúc package bắt buộc
Để Frappe Cloud nhận diện đúng, app phải có các file sau:
login_with_haravan/
├── hooks.py # Required
├── modules.txt # Required
├── patches.txt # Required
├── __init__.py
├── login_with_haravan/
│ └── doctype/ # DocType schemas
├── engines/ # Business logic
├── oauth.py # OAuth callback
├── setup/
│ └── install.py # After-install setup
└── tests/ # Tests (PHẢI trong package, không ở root)Lưu ý quan trọng
- Package name phải là
login_with_haravan(underscore), KHÔNG phảilogin-with-haravan(hyphen) - Tests phải nằm trong
login_with_haravan/tests/, không phải roottests/ - Frappe Cloud sẽ báo lỗi
imported module not foundnếu tên sai
Bước tiếp theo
Sau khi cài đặt thành công: