Chris
Chris

Reputation: 223

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.

Upvotes: 0

Views: 32

Answers (1)

Ritesh Agrawal
Ritesh Agrawal

Reputation: 821

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

Upvotes: 1

Related Questions