Comments (14)
Awesome, good to hear! No worries - happy to help. I will update the docs to make it a bit clearer.
from chiefonboarding.
I had to user email
instead of username to reset password
def reset_password(mail, password):
try:
user = get_user_model().objects.get(email=mail)
except:
return "User could not be found"
user.set_password(password)
user.save()
return "Password has been changed successfully"
from chiefonboarding.
Generally, a 400 error means that Django doesn't recognize the ALLOWED_HOSTS
. Can you check if the ALLOWED_HOST
variable is set to your URL in the Django environment variables? That's in back/back/.env
.
from chiefonboarding.
Generally, a 400 error means that Django doesn't recognize the
ALLOWED_HOSTS
. Can you check if theALLOWED_HOST
variable is set to your URL in the Django environment variables? That's inback/back/.env
.
Allowed host value is '*' in back/back/.env
@GDay
from chiefonboarding.
Oh wait, I think I misread your first message. Sorry. The login part loads, but you just cannot login, is that correct?
A 400 error in that case means that your username and password are not correct. Please note that the username (which needs to be an email address) and password are both case-sensitive. Also make sure that you didn't add a space after your username.
from chiefonboarding.
Oh wait, I think I misread your first message. Sorry. The login part loads, but you just cannot login, is that correct?
A 400 error in that case means that your username and password are not correct. Please note that the username (which needs to be an email address) and password are both case-sensitive. Also make sure that you didn't add a space after your username.
Email address and password both are correct created another user with same password and same error for that too @GDay
from chiefonboarding.
Very strange. Were you able to log in previously or have you never been able to log in? When you make the login request, what does it respond with? When I type in a wrong username and password, it responds with this:
from chiefonboarding.
Very strange. Were you able to log in previously or have you never been able to log in? When you make the login request, what does it respond with? When I type in a wrong username and password, it responds with this:
Not been able to login @GDay
My application is externally running on non standard SSL port 6443
from chiefonboarding.
When you make the login request, what does it respond with? Rightmouseclick on the screen -> inspect element -> open the network tab -> make the login request and then click on 'response'. Does it give the same error that I showed in the screenshot?
from chiefonboarding.
Okay, so yeah, your username and password are probably not correct. Let's try this, just to be sure:
When you have SSH access, do this:
docker-compose run web python3 manage.py shell
Then do this:
from django.contrib.auth import get_user_model
list(get_user_model().objects.all().values_list('email', flat=True))
That should give you a list with users that are in the system right now. Then do this:
def reset_password(u, password):
try:
user = get_user_model().objects.get(username=u)
except:
return "User could not be found"
user.set_password(password)
user.save()
return "Password has been changed successfully"
That adds a function that we can use to change the password.
Up next, we will change the password. Do the following, but change username
with any of the values that are shown in the list and then password
with something super easy. Avoid using special characters in this case. We just want to get logging in working right now. You should change it once you are logged in to something that is more complicated.
reset_password(username, password)
By the way, you might want to remove the screenshot as it shows your domain name.
from chiefonboarding.
This function code doesn't allowing me to change password @GDay
from chiefonboarding.
I think I see where it went wrong. So.. when creating a user, it says on the page to do
User.objects.create_admin("<first name>", "<last name>", "<email>", "<password>")
You probably included the <
>
. That's not correct. Here is an actual example of adding a new user:
User.objects.create_admin("Stan", "Doe", "[email protected]", "Somethingsupersecret")
So please remove your users:
get_user_model().objects.all().delete()
and add a new user again but then don't use <
and >
.
Makes sense?
from chiefonboarding.
I think I see where it went wrong. So.. when creating a user, it says on the page to do
User.objects.create_admin("<first name>", "<last name>", "<email>", "<password>")
You probably included the
<
>
. That's not correct. Here is an actual example of adding a new user:User.objects.create_admin("Stan", "Doe", "[email protected]", "Somethingsupersecret")
So please remove your users:
get_user_model().objects.all().delete()
and add a new user again but then don't use
<
and>
.Makes sense?
Yes , I had used < > while creating user , I will remove users and create one and let you know if the issue will resolve @GDay
from chiefonboarding.
Yes, it worked
Thanks for your help and support it worked like a charm and sorry for the trouble you can close the issue @GDay
from chiefonboarding.
Related Issues (20)
- Progress bar in onboarding sequence only showed in english HOT 3
- integration manifest problem with choice with items HOT 1
- recruiter role for analytics and system access HOT 2
- Trigger strings translation in spanish HOT 1
- unable to show a video embed from url HOT 6
- Add PDF embed viewer HOT 2
- Course resource automatic retry attemps
- Add custom field to new hire information
- Analytics Dashboard
- Revoking third party access HOT 2
- Changing third party access for employee
- CSRF verification failed. Request aborted. HOT 11
- Vacancy builder and applicant tracker
- OIDC Role mapping with Azure registration app HOT 3
- Offboarding sequences
- How to Debug Integrations? HOT 3
- Integrations: module 'django.forms' has no attribute 'TextField' HOT 3
- Notification - Couldn't deliver email message: provider error HOT 1
- Bug with SSO and email case sensitivity HOT 1
- Item edit window closes when dropdown is clicked outside the window HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chiefonboarding.