DjangoCMS and two-factor-auth - django

I'm trying to use the django-two-factor-auth on djangoCMS, I saw it can be hooked to views or even called thru request.user but I'm having bad time trying to figure out how I can actually do that given that on djangoCMS, from what I got so far, there are no views I can touch.
I looked at the example app on heroku for the 2-fact-auth but it doesn't give me enough hints.
Anyone has faced this before?
Thanks

Related

Is it possible to upload a django webapp for free

I followed a course where I made a django app like this https://www.studybud.dev/ and always get error when trying to upload it, I don't even have a solid understanding on how to uplaod my django website. I watched lots of videos but all of them were poor as none of them worked.
Tried uploading it for more than a month but with no avail, I tried using heroku,python anywhere and many others but some of them required credit card info and others don't work.
I would appreciate any form of help.

Mongoengine Django Custome User Authentication

I am trying to handle my authentication and user system, with django restframework, using mongodb as my database. I've searched the whole internet for a good sample of code for my purpose to work.
But you may know that any article which is published in this issue doesn't work and you have so many errors while running the code.
does anyone know a good piece of code or an article that may help?

I can't sign into the Django admin login page

I have started multiple Django projects with like four different tutorials. Every single time I try "python manage.py createsuperuser", the admin login page just loads and loads and never goes anywhere. I want to make it absolutely clear that I haven't touched a thing in the code and everything is default code. I migrated everything before login. I've tried deleting the database and re-migrating. None of that works. Can someone help me? I have made around 10-15 accounts and NONE of them work. The page just keeps loading indefinitely and never goes anywhere. I've looked at EVERY stackoverflow post and no answers work. I started a virtualenv, downloaded Django, didn't touch the code, made migrations, I followed every tutorial TOO THE LETTER(!!!) and this is what I keep getting. The current tutorial hasn't changed in default code and he signed in with no problems. I'm assuming if he did, I can...I don't think putting code in is necessary since it's all virgin code, never touched. I didn't even make any apps yet.
I've tried deleting database and re-migrating
changing the password of current superuser
deleting the entire project and following everything the instructor said (TO THE LETTER!!!)
I have made 10-15 superuser accounts and none work
This sounds similar to a problem I was seeing. I wrote a question for it here (no answers yet): Django local dev server hangs with chrome after form submission. Works in firefox
Are you using windows and the chrome browser? Try using firefox to access the admin page and login. That worked for me. I'm still trying to figure out why Chome doesn't work, though. Like you, I created a brand new project from scratch; sometimes Chrome works and most of the time it doesn't. I've also found that hitting the stop button while the browser is sitting there thinking, then refresh, makes the logged in admin page show up.

Django detective spots POST requests

I installed django-detective last night and today there are many weird post requests in it.
It looks like somebody is trying to post stuff like this on my website:
/wp-admin/admin-post.phpnd_stats_value_import_settings=home[nd_stats_option_value]https://dodgylookingsite.com/pret
Please do not go to this link as I think it might be hosting malware !!
What does this mean?
How can I prevent this from happening?
Thank you
Apparently this looks for known WordPress vulnerabilities (wp-admin).

django-social-auth Facebook redirect loop

I've inherited a project, and am trying to make sense of the Facebook authentication.
It's using django-social-auth (0.6.1), and for some reason during Facebook auth, the app enters an endless redirect loop between "/login/facebook/" and "/complete/facebook?code=".
Any help with solving this would be appreciated! I'm not even sure how to got closer to the root of the issue, since I'm new to Django. I am, however, quite experienced with Rails (and thus the general structure of Django, if not the details)
Thanks!
I've found that adding a handler to the "pre_update" signal causes this, as seen here : https://github.com/omab/django-social-auth/issues/234
However, I still require a workaround to execute the code that used to run there...