mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Added to profile template
This commit is contained in:
@@ -142,6 +142,8 @@ setup.</p>
|
|||||||
<p>
|
<p>
|
||||||
<a href="{% url reddit.views.reddit_add %}" class="button">Add a Reddit account</a>
|
<a href="{% url reddit.views.reddit_add %}" class="button">Add a Reddit account</a>
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
Reddit account tagging is {% if user.profile.tag_reddit_accounts %}Enabled{% else %}Disabled{% endif %}. <a href="{% url sso.views.toggle_reddit_tagging %}">{% if user.profile.tag_reddit_accounts %}Disable{% else %}Enable{% endif %}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -294,6 +294,7 @@ def primarychar_change(request):
|
|||||||
def toggle_reddit_tagging(request):
|
def toggle_reddit_tagging(request):
|
||||||
profile = request.user.get_profile()
|
profile = request.user.get_profile()
|
||||||
profile.tag_reddit_accounts = not profile.tag_reddit_accounts
|
profile.tag_reddit_accounts = not profile.tag_reddit_accounts
|
||||||
|
profile.save()
|
||||||
if profile.tag_reddit_accounts:
|
if profile.tag_reddit_accounts:
|
||||||
tag = 'Enabled'
|
tag = 'Enabled'
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user