Before going to use this code u need to do some modifications in your settings.py file such as you need to provide your database credentials instead of my database credentials and u have to enter your email ID and password in settings.py files
So the easy way to run this project in your environment is the watch my Django CRM project video atleast one time so u will get clear Idea where u need to do what changes
👍2
Forwarded from Gridi Show
In this video we are going to see how we can reset the password of user in django
for source code:https://t.me/pythonmoms
settings.py-------------------------
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_POST = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER ='Enter your email id'
EMAIL_HOST_PASSWORD ='Enter your password'
urls.py------------------
from django.contrib.auth import views as auth_views
path('password_reset/', auth_views.PasswordResetView.as_view(template_name='password_reset_form.html'), name='password_reset'),
path('password_reset_done/', auth_views.PasswordResetDoneView.as_view(template_name='password_reset_done.html'), name='password_reset_done'),
path('password_reset_confirm/<uidb64>/<token>/',auth_views.PasswordResetConfirmView.as_view(template_name='password_reset_confirm.html'), name='password_reset_confirm'),
path('password_reset_complete/', auth_views.PasswordResetCompleteView.as_view(template_name='password_reset_complete.html'), name='password_reset_complete'),
password_reset_complete.html----------------
{% extends 'base.html' %}
{% block content %}
<p>
Your password has been set. You may go ahead and <a href="{% url 'home' %}">sign in</a> now.
</p>
{% endblock %}
password_reset_confirm.html------------
{% extends 'base.html' %}
{% block content %}
{% if validlink %}
<h3>Change password</h3>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Change password</button>
</form>
{% else %}
<p>
The password reset link was invalid, possibly because it has already been used.
Please request a new password reset.
</p>
{% endif %}
{% endblock %}
password_reset_done.html------------------
{% extends 'base.html' %}
{% block content %}
<p>
We've emailed you instructions for setting your password, if an account exists with the email you entered.
You should receive them shortly.
</p>
<p>
If you don't receive an email, please make sure you've entered the address you registered with,
and check your spam folder.
</p>
{% endblock %}
password_reset_form.html-----------------
{% extends 'base.html' %}
{% block content %}
<h3>Forgot password</h3>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Submit</button>
</form>
{% endblock %}
django documentation tutorial,
how to create django project in python,
how to add satic files in django,
django project for resume,
how to add html template in django,
django latest version tutorial,
how to create django project in visual studio code,
django project with source code,
django project for freshers,
how to host django project,
how to add html and css in django,
how to create project in django Session Time Out in django project|your session has expired please login again@gridi_durgesh
django framework Play list
django crash course
django project
for source code:https://t.me/pythonmoms
settings.py-------------------------
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_POST = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER ='Enter your email id'
EMAIL_HOST_PASSWORD ='Enter your password'
urls.py------------------
from django.contrib.auth import views as auth_views
path('password_reset/', auth_views.PasswordResetView.as_view(template_name='password_reset_form.html'), name='password_reset'),
path('password_reset_done/', auth_views.PasswordResetDoneView.as_view(template_name='password_reset_done.html'), name='password_reset_done'),
path('password_reset_confirm/<uidb64>/<token>/',auth_views.PasswordResetConfirmView.as_view(template_name='password_reset_confirm.html'), name='password_reset_confirm'),
path('password_reset_complete/', auth_views.PasswordResetCompleteView.as_view(template_name='password_reset_complete.html'), name='password_reset_complete'),
password_reset_complete.html----------------
{% extends 'base.html' %}
{% block content %}
<p>
Your password has been set. You may go ahead and <a href="{% url 'home' %}">sign in</a> now.
</p>
{% endblock %}
password_reset_confirm.html------------
{% extends 'base.html' %}
{% block content %}
{% if validlink %}
<h3>Change password</h3>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Change password</button>
</form>
{% else %}
<p>
The password reset link was invalid, possibly because it has already been used.
Please request a new password reset.
</p>
{% endif %}
{% endblock %}
password_reset_done.html------------------
{% extends 'base.html' %}
{% block content %}
<p>
We've emailed you instructions for setting your password, if an account exists with the email you entered.
You should receive them shortly.
</p>
<p>
If you don't receive an email, please make sure you've entered the address you registered with,
and check your spam folder.
</p>
{% endblock %}
password_reset_form.html-----------------
{% extends 'base.html' %}
{% block content %}
<h3>Forgot password</h3>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Submit</button>
</form>
{% endblock %}
django documentation tutorial,
how to create django project in python,
how to add satic files in django,
django project for resume,
how to add html template in django,
django latest version tutorial,
how to create django project in visual studio code,
django project with source code,
django project for freshers,
how to host django project,
how to add html and css in django,
how to create project in django Session Time Out in django project|your session has expired please login again@gridi_durgesh
django framework Play list
django crash course
django project
❤2
In this video we are going see what is python,
what are features of python, advantages of python and
scope of python.
what are features of python, advantages of python and
scope of python.
Hi in this video we are going to see how we can install python 3 in windows operating system.
Hi in this video we are going see how we can download and install visual studio code and how we can run python code in vs code.
so thank you so much for watching my videos.
so thank you so much for watching my videos.
Hi in this video we are going to learn what are identifier and keywords in Python.
Hi in this video we are going learn what is variable and comment in python language.
Hi in this video we are going to learn what are data types in python and built-in function of python.