Django : How can I implement a remember me key on my login page
up vote
-2
down vote
favorite
Actually rather than just code , I want to know all the topics I have to study for making a remember me key on my login page.
Its a inbuilt django login page and i have a bit knowledge of sessions and cache but not enough for making a remember me key and havent user caching yet.
If you can supply me with a answer or a source , that will be helpful
python django caching login web-deployment
add a comment |
up vote
-2
down vote
favorite
Actually rather than just code , I want to know all the topics I have to study for making a remember me key on my login page.
Its a inbuilt django login page and i have a bit knowledge of sessions and cache but not enough for making a remember me key and havent user caching yet.
If you can supply me with a answer or a source , that will be helpful
python django caching login web-deployment
add a comment |
up vote
-2
down vote
favorite
up vote
-2
down vote
favorite
Actually rather than just code , I want to know all the topics I have to study for making a remember me key on my login page.
Its a inbuilt django login page and i have a bit knowledge of sessions and cache but not enough for making a remember me key and havent user caching yet.
If you can supply me with a answer or a source , that will be helpful
python django caching login web-deployment
Actually rather than just code , I want to know all the topics I have to study for making a remember me key on my login page.
Its a inbuilt django login page and i have a bit knowledge of sessions and cache but not enough for making a remember me key and havent user caching yet.
If you can supply me with a answer or a source , that will be helpful
python django caching login web-deployment
python django caching login web-deployment
asked Nov 22 at 12:52
Jidnyesh
75
75
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
Just add a new field in your form like this:
class LoginForm(forms.Form):
username = forms.CharField()
password = forms.CharField(widget= forms.PasswordInput)
remember_me = forms.BoolenField()
And update the view
def login(request):
if request.method == "POST":
form = LoginForm(request.POST)
if form.is_valid():
username = form.cleaned_data['username']
password = form.cleaned_data['password']
remember_me = form.cleaned_data['remember_me']
user = authenticated(username=username, password=password)
if user:
login(request, user)
if not remember_me:
request.session.set_expiry(0) # <-- Here if the remember me is False, that is why expiry is set to 0 seconds. So it will automatically close the session after the browser is closed.
# else browser session will be as long as the session cookie time "SESSION_COOKIE_AGE"
return redirect('/some/success/url')
else:
form = LoginForm()
render(request, 'name.html', {'form': form})
Update
If you are using AuthenticationForm, then sub-class it like this:
class LoginForm(AuthenticationForm):
remember_me = forms.BooleanField() # and add the remember_me field
And also sub-class your new view from LoginView. Also override the form_valid
method inside the View.
from django.contrib.auth import login as auth_login,
class UpdatedLoginView(LoginView):
form_class = LoginForm
def form_valid(self, form):
remember_me = form.cleaned_data['remember_me'] # get remember me data from cleaned_data of form
if not remember_me:
self.request.session.set_expiry(0) # if remember me is
self.request.session.modified = True
return super(UpdatedLoginView, self).form_valid(form)
Rather than creating a whole new login view, can you tell me to extend the existingAuthenticationForm
present indjango.contrib.auth.forms
in forms.py
– Jidnyesh
Nov 22 at 13:57
@Jidnyesh please see my updated answer.
– ruddra
Nov 22 at 14:21
And does this need to make changes in urls.py cause the login url contains views.login i.e default login , do i need to change all the redirects in my templates to UpdatedLoginView
– Jidnyesh
Nov 22 at 14:26
yes, you need to do that.
– ruddra
Nov 22 at 14:30
I implemented everything everyone suggested , i got a remember me key too and login is getting successful , Can you tell me how can i know if it is actully remembering me.
– Jidnyesh
Nov 22 at 15:05
|
show 17 more comments
up vote
0
down vote
You can reference from this remember-me project:
https://github.com/jimfmunro/django-remember-me
and also a similar issue was solved in:
Create 'remember me' feature in default django login view
You need to set session expiry period:
request.session.set_expiry(1209600) # 2 weeks
Django sessions are set to 2 weeks (SESSION_COOKIE_AGE defaults to 1209600 seconds) and will not expire when the browser is closed (SESSION_EXPIRE_AT_BROWSER_CLOSE defaults to False)
But if it's a must you set a remember me checkbox option with backend functions, then you can do the following on your Login custom form.
remember_me = forms.BooleanField(required=False, widget=forms.CheckboxInput())
if not self.cleaned_data.get('remember_me'):
self.request.session.set_expiry(0)
Actually i wanted to ask what changes to make in code to make remember me key works , like session and cache in detail.
– Jidnyesh
Nov 22 at 13:26
Im quite a starter therefore wanted prerequisites to do before adding remember me
– Jidnyesh
Nov 22 at 13:27
You will need to add the session expiry period for it to work after successful login credentials validation or when you are starting the user session
– Mark Ochieng
Nov 22 at 13:34
But i dont have a login view at all , where do you expect me to put this code , im just using built in django authentication , any way to extend the built in login django form
– Jidnyesh
Nov 22 at 13:59
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– hivert
Nov 22 at 14:02
|
show 3 more comments
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Just add a new field in your form like this:
class LoginForm(forms.Form):
username = forms.CharField()
password = forms.CharField(widget= forms.PasswordInput)
remember_me = forms.BoolenField()
And update the view
def login(request):
if request.method == "POST":
form = LoginForm(request.POST)
if form.is_valid():
username = form.cleaned_data['username']
password = form.cleaned_data['password']
remember_me = form.cleaned_data['remember_me']
user = authenticated(username=username, password=password)
if user:
login(request, user)
if not remember_me:
request.session.set_expiry(0) # <-- Here if the remember me is False, that is why expiry is set to 0 seconds. So it will automatically close the session after the browser is closed.
# else browser session will be as long as the session cookie time "SESSION_COOKIE_AGE"
return redirect('/some/success/url')
else:
form = LoginForm()
render(request, 'name.html', {'form': form})
Update
If you are using AuthenticationForm, then sub-class it like this:
class LoginForm(AuthenticationForm):
remember_me = forms.BooleanField() # and add the remember_me field
And also sub-class your new view from LoginView. Also override the form_valid
method inside the View.
from django.contrib.auth import login as auth_login,
class UpdatedLoginView(LoginView):
form_class = LoginForm
def form_valid(self, form):
remember_me = form.cleaned_data['remember_me'] # get remember me data from cleaned_data of form
if not remember_me:
self.request.session.set_expiry(0) # if remember me is
self.request.session.modified = True
return super(UpdatedLoginView, self).form_valid(form)
Rather than creating a whole new login view, can you tell me to extend the existingAuthenticationForm
present indjango.contrib.auth.forms
in forms.py
– Jidnyesh
Nov 22 at 13:57
@Jidnyesh please see my updated answer.
– ruddra
Nov 22 at 14:21
And does this need to make changes in urls.py cause the login url contains views.login i.e default login , do i need to change all the redirects in my templates to UpdatedLoginView
– Jidnyesh
Nov 22 at 14:26
yes, you need to do that.
– ruddra
Nov 22 at 14:30
I implemented everything everyone suggested , i got a remember me key too and login is getting successful , Can you tell me how can i know if it is actully remembering me.
– Jidnyesh
Nov 22 at 15:05
|
show 17 more comments
up vote
1
down vote
Just add a new field in your form like this:
class LoginForm(forms.Form):
username = forms.CharField()
password = forms.CharField(widget= forms.PasswordInput)
remember_me = forms.BoolenField()
And update the view
def login(request):
if request.method == "POST":
form = LoginForm(request.POST)
if form.is_valid():
username = form.cleaned_data['username']
password = form.cleaned_data['password']
remember_me = form.cleaned_data['remember_me']
user = authenticated(username=username, password=password)
if user:
login(request, user)
if not remember_me:
request.session.set_expiry(0) # <-- Here if the remember me is False, that is why expiry is set to 0 seconds. So it will automatically close the session after the browser is closed.
# else browser session will be as long as the session cookie time "SESSION_COOKIE_AGE"
return redirect('/some/success/url')
else:
form = LoginForm()
render(request, 'name.html', {'form': form})
Update
If you are using AuthenticationForm, then sub-class it like this:
class LoginForm(AuthenticationForm):
remember_me = forms.BooleanField() # and add the remember_me field
And also sub-class your new view from LoginView. Also override the form_valid
method inside the View.
from django.contrib.auth import login as auth_login,
class UpdatedLoginView(LoginView):
form_class = LoginForm
def form_valid(self, form):
remember_me = form.cleaned_data['remember_me'] # get remember me data from cleaned_data of form
if not remember_me:
self.request.session.set_expiry(0) # if remember me is
self.request.session.modified = True
return super(UpdatedLoginView, self).form_valid(form)
Rather than creating a whole new login view, can you tell me to extend the existingAuthenticationForm
present indjango.contrib.auth.forms
in forms.py
– Jidnyesh
Nov 22 at 13:57
@Jidnyesh please see my updated answer.
– ruddra
Nov 22 at 14:21
And does this need to make changes in urls.py cause the login url contains views.login i.e default login , do i need to change all the redirects in my templates to UpdatedLoginView
– Jidnyesh
Nov 22 at 14:26
yes, you need to do that.
– ruddra
Nov 22 at 14:30
I implemented everything everyone suggested , i got a remember me key too and login is getting successful , Can you tell me how can i know if it is actully remembering me.
– Jidnyesh
Nov 22 at 15:05
|
show 17 more comments
up vote
1
down vote
up vote
1
down vote
Just add a new field in your form like this:
class LoginForm(forms.Form):
username = forms.CharField()
password = forms.CharField(widget= forms.PasswordInput)
remember_me = forms.BoolenField()
And update the view
def login(request):
if request.method == "POST":
form = LoginForm(request.POST)
if form.is_valid():
username = form.cleaned_data['username']
password = form.cleaned_data['password']
remember_me = form.cleaned_data['remember_me']
user = authenticated(username=username, password=password)
if user:
login(request, user)
if not remember_me:
request.session.set_expiry(0) # <-- Here if the remember me is False, that is why expiry is set to 0 seconds. So it will automatically close the session after the browser is closed.
# else browser session will be as long as the session cookie time "SESSION_COOKIE_AGE"
return redirect('/some/success/url')
else:
form = LoginForm()
render(request, 'name.html', {'form': form})
Update
If you are using AuthenticationForm, then sub-class it like this:
class LoginForm(AuthenticationForm):
remember_me = forms.BooleanField() # and add the remember_me field
And also sub-class your new view from LoginView. Also override the form_valid
method inside the View.
from django.contrib.auth import login as auth_login,
class UpdatedLoginView(LoginView):
form_class = LoginForm
def form_valid(self, form):
remember_me = form.cleaned_data['remember_me'] # get remember me data from cleaned_data of form
if not remember_me:
self.request.session.set_expiry(0) # if remember me is
self.request.session.modified = True
return super(UpdatedLoginView, self).form_valid(form)
Just add a new field in your form like this:
class LoginForm(forms.Form):
username = forms.CharField()
password = forms.CharField(widget= forms.PasswordInput)
remember_me = forms.BoolenField()
And update the view
def login(request):
if request.method == "POST":
form = LoginForm(request.POST)
if form.is_valid():
username = form.cleaned_data['username']
password = form.cleaned_data['password']
remember_me = form.cleaned_data['remember_me']
user = authenticated(username=username, password=password)
if user:
login(request, user)
if not remember_me:
request.session.set_expiry(0) # <-- Here if the remember me is False, that is why expiry is set to 0 seconds. So it will automatically close the session after the browser is closed.
# else browser session will be as long as the session cookie time "SESSION_COOKIE_AGE"
return redirect('/some/success/url')
else:
form = LoginForm()
render(request, 'name.html', {'form': form})
Update
If you are using AuthenticationForm, then sub-class it like this:
class LoginForm(AuthenticationForm):
remember_me = forms.BooleanField() # and add the remember_me field
And also sub-class your new view from LoginView. Also override the form_valid
method inside the View.
from django.contrib.auth import login as auth_login,
class UpdatedLoginView(LoginView):
form_class = LoginForm
def form_valid(self, form):
remember_me = form.cleaned_data['remember_me'] # get remember me data from cleaned_data of form
if not remember_me:
self.request.session.set_expiry(0) # if remember me is
self.request.session.modified = True
return super(UpdatedLoginView, self).form_valid(form)
edited Nov 24 at 14:42
answered Nov 22 at 13:24
ruddra
10.5k32547
10.5k32547
Rather than creating a whole new login view, can you tell me to extend the existingAuthenticationForm
present indjango.contrib.auth.forms
in forms.py
– Jidnyesh
Nov 22 at 13:57
@Jidnyesh please see my updated answer.
– ruddra
Nov 22 at 14:21
And does this need to make changes in urls.py cause the login url contains views.login i.e default login , do i need to change all the redirects in my templates to UpdatedLoginView
– Jidnyesh
Nov 22 at 14:26
yes, you need to do that.
– ruddra
Nov 22 at 14:30
I implemented everything everyone suggested , i got a remember me key too and login is getting successful , Can you tell me how can i know if it is actully remembering me.
– Jidnyesh
Nov 22 at 15:05
|
show 17 more comments
Rather than creating a whole new login view, can you tell me to extend the existingAuthenticationForm
present indjango.contrib.auth.forms
in forms.py
– Jidnyesh
Nov 22 at 13:57
@Jidnyesh please see my updated answer.
– ruddra
Nov 22 at 14:21
And does this need to make changes in urls.py cause the login url contains views.login i.e default login , do i need to change all the redirects in my templates to UpdatedLoginView
– Jidnyesh
Nov 22 at 14:26
yes, you need to do that.
– ruddra
Nov 22 at 14:30
I implemented everything everyone suggested , i got a remember me key too and login is getting successful , Can you tell me how can i know if it is actully remembering me.
– Jidnyesh
Nov 22 at 15:05
Rather than creating a whole new login view, can you tell me to extend the existing
AuthenticationForm
present in django.contrib.auth.forms
in forms.py– Jidnyesh
Nov 22 at 13:57
Rather than creating a whole new login view, can you tell me to extend the existing
AuthenticationForm
present in django.contrib.auth.forms
in forms.py– Jidnyesh
Nov 22 at 13:57
@Jidnyesh please see my updated answer.
– ruddra
Nov 22 at 14:21
@Jidnyesh please see my updated answer.
– ruddra
Nov 22 at 14:21
And does this need to make changes in urls.py cause the login url contains views.login i.e default login , do i need to change all the redirects in my templates to UpdatedLoginView
– Jidnyesh
Nov 22 at 14:26
And does this need to make changes in urls.py cause the login url contains views.login i.e default login , do i need to change all the redirects in my templates to UpdatedLoginView
– Jidnyesh
Nov 22 at 14:26
yes, you need to do that.
– ruddra
Nov 22 at 14:30
yes, you need to do that.
– ruddra
Nov 22 at 14:30
I implemented everything everyone suggested , i got a remember me key too and login is getting successful , Can you tell me how can i know if it is actully remembering me.
– Jidnyesh
Nov 22 at 15:05
I implemented everything everyone suggested , i got a remember me key too and login is getting successful , Can you tell me how can i know if it is actully remembering me.
– Jidnyesh
Nov 22 at 15:05
|
show 17 more comments
up vote
0
down vote
You can reference from this remember-me project:
https://github.com/jimfmunro/django-remember-me
and also a similar issue was solved in:
Create 'remember me' feature in default django login view
You need to set session expiry period:
request.session.set_expiry(1209600) # 2 weeks
Django sessions are set to 2 weeks (SESSION_COOKIE_AGE defaults to 1209600 seconds) and will not expire when the browser is closed (SESSION_EXPIRE_AT_BROWSER_CLOSE defaults to False)
But if it's a must you set a remember me checkbox option with backend functions, then you can do the following on your Login custom form.
remember_me = forms.BooleanField(required=False, widget=forms.CheckboxInput())
if not self.cleaned_data.get('remember_me'):
self.request.session.set_expiry(0)
Actually i wanted to ask what changes to make in code to make remember me key works , like session and cache in detail.
– Jidnyesh
Nov 22 at 13:26
Im quite a starter therefore wanted prerequisites to do before adding remember me
– Jidnyesh
Nov 22 at 13:27
You will need to add the session expiry period for it to work after successful login credentials validation or when you are starting the user session
– Mark Ochieng
Nov 22 at 13:34
But i dont have a login view at all , where do you expect me to put this code , im just using built in django authentication , any way to extend the built in login django form
– Jidnyesh
Nov 22 at 13:59
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– hivert
Nov 22 at 14:02
|
show 3 more comments
up vote
0
down vote
You can reference from this remember-me project:
https://github.com/jimfmunro/django-remember-me
and also a similar issue was solved in:
Create 'remember me' feature in default django login view
You need to set session expiry period:
request.session.set_expiry(1209600) # 2 weeks
Django sessions are set to 2 weeks (SESSION_COOKIE_AGE defaults to 1209600 seconds) and will not expire when the browser is closed (SESSION_EXPIRE_AT_BROWSER_CLOSE defaults to False)
But if it's a must you set a remember me checkbox option with backend functions, then you can do the following on your Login custom form.
remember_me = forms.BooleanField(required=False, widget=forms.CheckboxInput())
if not self.cleaned_data.get('remember_me'):
self.request.session.set_expiry(0)
Actually i wanted to ask what changes to make in code to make remember me key works , like session and cache in detail.
– Jidnyesh
Nov 22 at 13:26
Im quite a starter therefore wanted prerequisites to do before adding remember me
– Jidnyesh
Nov 22 at 13:27
You will need to add the session expiry period for it to work after successful login credentials validation or when you are starting the user session
– Mark Ochieng
Nov 22 at 13:34
But i dont have a login view at all , where do you expect me to put this code , im just using built in django authentication , any way to extend the built in login django form
– Jidnyesh
Nov 22 at 13:59
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– hivert
Nov 22 at 14:02
|
show 3 more comments
up vote
0
down vote
up vote
0
down vote
You can reference from this remember-me project:
https://github.com/jimfmunro/django-remember-me
and also a similar issue was solved in:
Create 'remember me' feature in default django login view
You need to set session expiry period:
request.session.set_expiry(1209600) # 2 weeks
Django sessions are set to 2 weeks (SESSION_COOKIE_AGE defaults to 1209600 seconds) and will not expire when the browser is closed (SESSION_EXPIRE_AT_BROWSER_CLOSE defaults to False)
But if it's a must you set a remember me checkbox option with backend functions, then you can do the following on your Login custom form.
remember_me = forms.BooleanField(required=False, widget=forms.CheckboxInput())
if not self.cleaned_data.get('remember_me'):
self.request.session.set_expiry(0)
You can reference from this remember-me project:
https://github.com/jimfmunro/django-remember-me
and also a similar issue was solved in:
Create 'remember me' feature in default django login view
You need to set session expiry period:
request.session.set_expiry(1209600) # 2 weeks
Django sessions are set to 2 weeks (SESSION_COOKIE_AGE defaults to 1209600 seconds) and will not expire when the browser is closed (SESSION_EXPIRE_AT_BROWSER_CLOSE defaults to False)
But if it's a must you set a remember me checkbox option with backend functions, then you can do the following on your Login custom form.
remember_me = forms.BooleanField(required=False, widget=forms.CheckboxInput())
if not self.cleaned_data.get('remember_me'):
self.request.session.set_expiry(0)
edited Nov 22 at 14:13
answered Nov 22 at 13:14
Mark Ochieng
12
12
Actually i wanted to ask what changes to make in code to make remember me key works , like session and cache in detail.
– Jidnyesh
Nov 22 at 13:26
Im quite a starter therefore wanted prerequisites to do before adding remember me
– Jidnyesh
Nov 22 at 13:27
You will need to add the session expiry period for it to work after successful login credentials validation or when you are starting the user session
– Mark Ochieng
Nov 22 at 13:34
But i dont have a login view at all , where do you expect me to put this code , im just using built in django authentication , any way to extend the built in login django form
– Jidnyesh
Nov 22 at 13:59
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– hivert
Nov 22 at 14:02
|
show 3 more comments
Actually i wanted to ask what changes to make in code to make remember me key works , like session and cache in detail.
– Jidnyesh
Nov 22 at 13:26
Im quite a starter therefore wanted prerequisites to do before adding remember me
– Jidnyesh
Nov 22 at 13:27
You will need to add the session expiry period for it to work after successful login credentials validation or when you are starting the user session
– Mark Ochieng
Nov 22 at 13:34
But i dont have a login view at all , where do you expect me to put this code , im just using built in django authentication , any way to extend the built in login django form
– Jidnyesh
Nov 22 at 13:59
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– hivert
Nov 22 at 14:02
Actually i wanted to ask what changes to make in code to make remember me key works , like session and cache in detail.
– Jidnyesh
Nov 22 at 13:26
Actually i wanted to ask what changes to make in code to make remember me key works , like session and cache in detail.
– Jidnyesh
Nov 22 at 13:26
Im quite a starter therefore wanted prerequisites to do before adding remember me
– Jidnyesh
Nov 22 at 13:27
Im quite a starter therefore wanted prerequisites to do before adding remember me
– Jidnyesh
Nov 22 at 13:27
You will need to add the session expiry period for it to work after successful login credentials validation or when you are starting the user session
– Mark Ochieng
Nov 22 at 13:34
You will need to add the session expiry period for it to work after successful login credentials validation or when you are starting the user session
– Mark Ochieng
Nov 22 at 13:34
But i dont have a login view at all , where do you expect me to put this code , im just using built in django authentication , any way to extend the built in login django form
– Jidnyesh
Nov 22 at 13:59
But i dont have a login view at all , where do you expect me to put this code , im just using built in django authentication , any way to extend the built in login django form
– Jidnyesh
Nov 22 at 13:59
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– hivert
Nov 22 at 14:02
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
– hivert
Nov 22 at 14:02
|
show 3 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53431476%2fdjango-how-can-i-implement-a-remember-me-key-on-my-login-page%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown