Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created a mechanism for dynamic user handling #65

Merged
merged 3 commits into from Jan 9, 2021

Conversation

UmarGit
Copy link
Contributor

@UmarGit UmarGit commented Dec 24, 2020

Instead of creating a fake user from setting.py ( which is hardcoded ) and we need a dynamic mechanism to create users with a random name and password. So, I created some methods that create a random user, If it does not exist in the current session of the browser.

Changed the URL pattern for accessing the portal.

Updated views.py to check for the user in the current session and also updated the Auth toggle functionality to kick all users at once.

Lastly updated middleware redirections.

That's all, I had done, thank you @enoren5

Best Regards,
Umar Ahmed

Created a mechanism for dynamic user handling
@enoren5
Copy link
Owner

enoren5 commented Dec 27, 2020

Hi @UmarGit! Thanks for the PR. I tested it. It generally works, like when traversing back and forth between gateway.html and portal.html. But when clicking on the "Tarot at Random" or "@FilM" links (on the portal.html page), I encounter this traceback: https://imgur.com/a/8LT3VBY

@UmarGit
Copy link
Contributor Author

UmarGit commented Dec 27, 2020

Okay @enoren5 , let me check brother.

Fixed Sessions
@UmarGit
Copy link
Contributor Author

UmarGit commented Dec 28, 2020

The issue is because I have made some changes to the routings, that's why Django didn't find that URL, now I have updated the generators, about ( page URLs ).

I have also changed some URL routing, then also double-check to migrate the apps as follows:
python manage.py migrate landings
python manage.py migrate essays
python manage.py migrate generators
then python manage.py makemigrations

And that's all I had done

@enoren5
Copy link
Owner

enoren5 commented Dec 29, 2020

Hi @UmarGit: Now tarot keys and the about pages render properly. Thank you for fixing that! But there other locations which are still throwing 'NoReverseMatch' such as: http://127.0.0.1:8000/essay_list and http://127.0.0.1:8000/article/slashdot/. Take a look here (along with the commands and their output in my terminal): https://imgur.com/nrxoJTJ

@UmarGit
Copy link
Contributor Author

UmarGit commented Dec 29, 2020

Okay @enoren5 , I am checking that

@UmarGit
Copy link
Contributor Author

UmarGit commented Dec 31, 2020

Fixed sessions

And that's all I had done

@enoren5
Copy link
Owner

enoren5 commented Jan 3, 2021

Thanks, @UmarGit! I sent you a message on Upwork about a potential next milestone. Check it when you can! :)

@enoren5
Copy link
Owner

enoren5 commented Jan 9, 2021

Issue #60 resolved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants