Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,209,491 members, 8,006,258 topics. Date: Monday, 18 November 2024 at 07:55 PM

Send All Django-python Bug Or Problems Here.(django Mentorship Class) - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Send All Django-python Bug Or Problems Here.(django Mentorship Class) (792 Views)

ASK For Solutions On Your (php,css,c,c++,python) Problems Here / Post Your Wordpress Problems Here / I Am Django / Python Developer (2) (3) (4)

(1) (Reply) (Go Down)

Send All Django-python Bug Or Problems Here.(django Mentorship Class) by OLisaMacaulay(m): 12:20pm On Oct 10, 2021
Good Morning Afternoon, I started my python journey a few years ago. Since then I have done a couple of projects, so earlier last year I decided  to go into web programming using python,  then I did a couple of research regards to the best framework  to use, and I found out about  this powerful python web development Django 

Since I started my journey on Django it has been challenging, and tough as a newbie, but now I have perfected all the techniques and I am capable of developing any kind of web application using a powerful framework Django.

Here is a list of 8 popular websites built with Django

Django, instagram,SpotifyYouTube,The Washington Post, The Guardian, and The New York Post
BitBucket,DropBox,Mozilla,Pinterest

I wouldn't want any newbies to go through  the same problem while learning this framework, so I decided to create this tread to mentor and  guide others.

drop your problem and bug  on the comment section or send me an email to djangoissue@gmail.com
i will try everything possible to reply  to your emails and comment

Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by Rictech: 2:43pm On Oct 10, 2021
Olisamacaulay ! Nice one , I discovered Django & fell in love. It's good to know there's an experienced django programmer here willing to help.
One of my biggest challenges is knowing when to use class based view & function based view. An explanation in a layman's language will do

1 Like

Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by OLisaMacaulay(m): 3:08pm On Oct 10, 2021
There is no when to use class base or function base,

Class base was introduce in 3.0 version of django,to easy programming process and to avoid repeating your self,

Class base almost do everything thing for you, with few line of code you are good to go,

But some people are not used to it.

If you want to develop task with class base, I will help you in doing that.


I use both class base and function base.
Because there are program you are writing that need function base cos it make it easier and faster than class base view
Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by Ajibel(m): 12:39am On Oct 11, 2021
OLisaMacaulay:
There is no when to use class base or function base,

Class base was introduce in 3.0 version of django,to easy programming process and to avoid repeating your self,


lipsrsealed shocked lipsrsealed shocked

Hmmm
Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by bedfordng(m): 11:24am On Oct 11, 2021
OLisaMacaulay:

 
Nice to see this. Want to ask. Do you have idea on adding sms OTP to Django admin login. Any idea is welcome. Note that there is google Auth package but that is not what I needed. So if you have an idea on this, you can mention

1 Like

Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by chinex11(m): 2:05am On Oct 12, 2021
Good morning, please how can I deploy a django website. I really need help
Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by Chigstar: 3:03am On Oct 12, 2021
chinex11:
Good morning, please how can I deploy a django website. I really need help
Try heroku or pythonanywhere if you don't understand their instructions, check out youtube tutorials on that.

1 Like 1 Share

Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by DeLaker(m): 11:05am On Oct 12, 2021
bedfordng:
Nice to see this. Want to ask. Do you have idea on adding sms OTP to Django admin login. Any idea is welcome. Note that there is google Auth package but that is not what I needed. So if you have an idea on this, you can mention

You can use Django user_logged_in signals and create app to generate OTP then call the create or update model in the signal then send the instance OTP via twilio or email…
Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by bedfordng(m): 11:39am On Oct 12, 2021
DeLaker:


You can use Django user_logged_in signals and create app to generate OTP then call the create or update model in the signal then send the instance OTP via twilio or email…
please note that the OTP setup will only be for admin login panel. Not all user. So how can this be implemented for just the admin URL so admin gets the OTP which must be inserted before login will be accepted.
Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by DeLaker(m): 12:29pm On Oct 12, 2021
bedfordng:
please note that the OTP setup will only be for admin login panel. Not all user. So how can this be implemented for just the admin URL so admin gets the OTP which must be inserted before login will be accepted.

In the user_logged_in signals, you can filter the user instance if it’s is_superuser then send OTP, and also you’ll have to override the admin login view to redirect to the OTP form on successful login instead of redirecting to the admin page… this should work.
Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by bedfordng(m): 2:24pm On Oct 12, 2021
DeLaker:


In the user_logged_in signals, you can filter the user instance if it’s is_superuser then send OTP, and also you’ll have to override the admin login view to redirect to the OTP form on successful login instead of redirecting to the admin page… this should work.
now I get the point. The issue here is messing around with the admin login view.

I am finding it hard to locate this admin login view in Django files. That is where the problem is right now.

Also, you made mentioned of redirecting to OTP form on successful login. Doesn't this create a bug in the system if the user is giving a login session before displaying the form.

They can easily just revisit the admin URL if they noticed they have login session already.
Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by DeLaker(m): 4:16pm On Oct 12, 2021
bedfordng:
now I get the point. The issue here is messing around with the admin login view.

I am finding it hard to locate this admin login view in Django files. That is where the problem is right now.

Also, you made mentioned of redirecting to OTP form on successful login. Doesn't this create a bug in the system if the user is giving a login session before displaying the form.

They can easily just revisit the admin URL if they noticed they have login session already.

You can write a view to override the login view search how to, on the OTP models they’ll be a Boolean field set to false by default so it’s after the OTP has been verified before redirect can be triggered successfully else revisiting admin URL should redirect back to the OTP form page.
Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by bedfordng(m): 10:27pm On Oct 12, 2021
DeLaker:


You can write a view to override the login view search how to, on the OTP models they’ll be a Boolean field set to false by default so it’s after the OTP has been verified before redirect can be triggered successfully else revisiting admin URL should redirect back to the OTP form page.
oh, I get it.

Although still can't find reasonable resource on overiding the admin login view as most of the write-up is only talking about the form. No details on overiding the view file.
Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by DeLaker(m): 11:14pm On Oct 12, 2021
bedfordng:
oh, I get it.

Although still can't find reasonable resource on overiding the admin login view as most of the write-up is only talking about the form. No details on overiding the view file.

I haven’t tried overriding and admin login view before but I know it’s possible, I’ve only used the OTP concept on a Django and ReactJs project and it works fine.
Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by bedfordng(m): 9:12am On Oct 13, 2021
DeLaker:


I haven’t tried overriding and admin login view before but I know it’s possible, I’ve only used the OTP concept on a Django and ReactJs project and it works fine.
I guess via normal custom login view for all users. I just needed it for admin panel.

Anyway, I will dig deeper to find a way around this. Thanks for your input. Really appreciate.
Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by monikulapo: 7:56pm On Oct 14, 2021
Hello all,
How long would you advise to spend on learning Python basics before diving into Django ?
Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by OLisaMacaulay(m): 8:55pm On Oct 14, 2021
you need to understand python syntax and know how to use them, such as dictionary, list, functions, class, conditional statement
and etc., this will take you at list 1 month that depend on your speed of understanding.
NOTE that Django has it own deferent language as well, so i will not advice to spend time learning python .
Re: Send All Django-python Bug Or Problems Here.(django Mentorship Class) by OLisaMacaulay(m): 8:56pm On Oct 14, 2021
you need to understand python syntax and know how to use them, such as dictionary, list, functions, class, conditional statement
and etc., this will take you at list 1 month that depend on your speed of understanding.
NOTE that Django has it own deferent language as well, so i will not advice to spend time learning python .



monikulapo:
Hello all,
How long would you advise to spend on learning Python basics before diving into Django ?

(1) (Reply)

Free School Result Management System / Join My Team / Where Can One Physically Learn AI Engineering & Data Science

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 27
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.