简体   繁体   中英

github. Is importing enough?

If I wanted to incorporate a password strength meter from this page https://github.com/aj-may/django-password-strength , do I need to copy the 'django_password_strength' folder and paste it into my project or will doing the 'pip install django-password-strength' and then 'from django_password_strength.widgets import PasswordStrengthInput, PasswordConfirmationInput' take care of it? Sorry I'm a noob. The instructions don't make this clear, and I've never done something like this from github. I spent half hour trying both ways and couldn't get it either way, so was wondering what the right path is.

Executing pip install django-password-strength will install the package in your environment. In general, you do not require to copy the source from github. But since you need to use it in django forms, it is required to add django-password-strength in installed apps of project (as mentioned in the documentation). For adding in installed apps, look for INSTALLED_APPS variable in the settings.py file located at /path/to/project/<project_name>/<project_name>/settings.py

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM