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