social auth stuff
This commit is contained in:
@ -81,7 +81,7 @@ REVERSE_PROXY_AUTH=0
|
|||||||
# Default settings for spaces, apply per space and can be changed in the admin view
|
# Default settings for spaces, apply per space and can be changed in the admin view
|
||||||
# SPACE_DEFAULT_MAX_RECIPES=0 # 0=unlimited recipes
|
# SPACE_DEFAULT_MAX_RECIPES=0 # 0=unlimited recipes
|
||||||
# SPACE_DEFAULT_MAX_USERS=0 # 0=unlimited users per space
|
# SPACE_DEFAULT_MAX_USERS=0 # 0=unlimited users per space
|
||||||
# SPACE_DEFAULT_FILES=1 # 1=can upload files (images, etc.) NOT IMPLEMENTED YET
|
# SPACE_DEFAULT_MAX_FILES=0 # Maximum file storage for space in MB. 0 for unlimited, -1 to disable file upload.
|
||||||
|
|
||||||
# allow people to create accounts on your application instance (without an invite link)
|
# allow people to create accounts on your application instance (without an invite link)
|
||||||
# when unset: 0 (false)
|
# when unset: 0 (false)
|
||||||
|
17
cookbook/templates/account/password_change.html
Normal file
17
cookbook/templates/account/password_change.html
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% load crispy_forms_filters %}
|
||||||
|
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block head_title %}{% trans "Change Password" %}{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>{% trans "Change Password" %}</h1>
|
||||||
|
|
||||||
|
<form method="POST" action="{% url 'account_change_password' %}" class="password_change">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form | crispy }}
|
||||||
|
<button type="submit" name="action">{% trans "Change Password" %}</button>
|
||||||
|
<a href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
16
cookbook/templates/account/password_set.html
Normal file
16
cookbook/templates/account/password_set.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% load crispy_forms_filters %}
|
||||||
|
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block head_title %}{% trans "Set Password" %}{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>{% trans "Set Password" %}</h1>
|
||||||
|
|
||||||
|
<form method="POST" action="{% url 'account_set_password' %}" class="password_set">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form | crispy }}
|
||||||
|
<input type="submit" class="btn btn-primary" name="action" value="{% trans 'Set Password' %}"/>
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
21
cookbook/templates/socialaccount/signup.html
Normal file
21
cookbook/templates/socialaccount/signup.html
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block head_title %}{% trans "Signup" %}{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>{% trans "Sign Up" %}</h1>
|
||||||
|
|
||||||
|
<p>{% blocktrans with provider_name=account.get_provider.name site_name=site.name %}You are about to use your {{provider_name}} account to login to
|
||||||
|
{{site_name}}. As a final step, please complete the following form:{% endblocktrans %}</p>
|
||||||
|
|
||||||
|
<form class="signup" id="signup_form" method="post" action="{% url 'socialaccount_signup' %}">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form.as_p }}
|
||||||
|
{% if redirect_field_value %}
|
||||||
|
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
||||||
|
{% endif %}
|
||||||
|
<button type="submit">{% trans "Sign Up" %} »</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{% endblock %}
|
@ -114,7 +114,7 @@ def no_space(request):
|
|||||||
created_space = Space.objects.create(
|
created_space = Space.objects.create(
|
||||||
name=create_form.cleaned_data['name'],
|
name=create_form.cleaned_data['name'],
|
||||||
created_by=request.user,
|
created_by=request.user,
|
||||||
allow_files=settings.SPACE_DEFAULT_FILES,
|
max_file_storage_mb=settings.SPACE_DEFAULT_FILES,
|
||||||
max_recipes=settings.SPACE_DEFAULT_MAX_RECIPES,
|
max_recipes=settings.SPACE_DEFAULT_MAX_RECIPES,
|
||||||
max_users=settings.SPACE_DEFAULT_MAX_USERS,
|
max_users=settings.SPACE_DEFAULT_MAX_USERS,
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user