mirror of
https://github.com/Mistake35/Cedar-Django.git
synced 2026-07-17 16:11:14 +10:00
Some cleanup
- Removed CLOSEDVERSE_PROD. - Removed duplicate settings in settings.py. - Removed static exclusion when forcing the user to log in. Nginx should handle this anyways... - Removed old unused HTML pages. - Changed the way time is shown on profiles and in my_data. - Additional HTML changes.
This commit is contained in:
@@ -158,14 +158,14 @@
|
||||
<div class="data-content">
|
||||
<h4><span>Date Joined</span></h4>
|
||||
<div class="note">
|
||||
<span>{% time user.created True %}</span>
|
||||
<span>{% time user.created %}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% if not user.hide_online %}
|
||||
<div class="data-content">
|
||||
<h4><span>Last Seen</span></h4>
|
||||
<div class="note">
|
||||
<span>{% time user.last_login True %}</span>
|
||||
<span>{% time user.last_login %}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
{% extends "closedverse_main/layout.html" %}
|
||||
{% block main-body %}{% load closedverse_user %}
|
||||
{% user_sidebar request user user.profile 0 True %}
|
||||
<div class="main-column" id="help">
|
||||
<!--
|
||||
{% if user.is_staff and user.is_authenticated %}
|
||||
<div class="notice" style="border: 1px solid #75ff7b;background-color: #c0ffc2;">
|
||||
<p><b>Notice</b>: You are a staff member, you have permission to view redacted URLs.
|
||||
</p></div>
|
||||
{% endif %}
|
||||
-->
|
||||
|
||||
<div class="notice">
|
||||
<p><b>Notice</b>: Your IP and email are both viewable in MySQL. Use caution when using clones that are hosted by untrusted users.
|
||||
</div>
|
||||
|
||||
<div class="post-list-outline">
|
||||
<h2 class="label">Active clones</h2>
|
||||
<div id="guide" class="help-content">
|
||||
<div class="faq">
|
||||
<h1>this clone</h1>
|
||||
<p>uhh uhh youre using it now and its good enough</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,14 +0,0 @@
|
||||
{% extends "closedverse_main/layout.html" %}
|
||||
{% block main-body %}{% load closedverse_user %}
|
||||
{% user_sidebar request user user.profile 0 True %}
|
||||
<div class="main-column" id="help">
|
||||
<div class="post-list-outline">
|
||||
<h2 class="label">Our new approval system</h2>
|
||||
<div id="guide" class="help-content">
|
||||
<div class="faq">
|
||||
<p>Placeholder</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -11,7 +11,7 @@
|
||||
<p>Signup IP address: <span>{% if user.signup_addr %}{{ user.signup_addr }}{% else %}Data missing{% endif %}</p>
|
||||
<p>Rank: <span>{% if user.staff %}You are a staff member.{% elif not user.level <= 0 %}You are a moderator. (Level {{ user.level }}){% else %}You are a regular user.{% endif %}
|
||||
<h3>My content:</h3>
|
||||
<p>Your account has existed for {{ age }} days! During that time, we've collected:</p>
|
||||
<p>Your account has existed for {{ user.created|timesince }}! During that time, we've collected:</p>
|
||||
<ul>
|
||||
<li>My posts: <span> {{ posts }}
|
||||
<li>My comments: <span> {{ comments }}
|
||||
@@ -33,18 +33,18 @@
|
||||
<h3>Collected data:</h3>
|
||||
<div class="user-data">
|
||||
<p class="label">Account login history:</p>
|
||||
<p>Each time you try and sign in to your account, we grab the <strong>IP</strong> and <strong>User agent</strong> from the device used. If you see any login attempts that you don't recognize as your own, you may want to change your password.</p>
|
||||
<p>Each time you sign in to your account, we grab the <strong>IP</strong> and <strong>User agent</strong> from the device used. If you see any login attempts that you don't recognize as your own, you may want to change your password.</p>
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
<th>Success</th>
|
||||
<!--<th>Success</th> not working right now -->
|
||||
<th class="ip">IP</th>
|
||||
<th>User agent</th>
|
||||
</tr>
|
||||
{% for log_attempt in log_attempt %}
|
||||
<tr>
|
||||
<td>{{ log_attempt.created }}</td>
|
||||
<td{% if not log_attempt.success %} style="border: #f44336 2px solid;"{% endif %}>{{ log_attempt.success }}</td>
|
||||
<!--<td{% if not log_attempt.success %} style="border: #f44336 2px solid;"{% endif %}>{{ log_attempt.success }}</td>-->
|
||||
<td class="ip">{% if log_attempt.success %}{{ log_attempt.addr }}{% else %}REDACTED{% endif %}</td>
|
||||
<td>{{ log_attempt.user_agent }}
|
||||
</tr>
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
<form class="setting-form" method="post" action={% url "main:user-tools-bans" user.username %}>
|
||||
{% if not banned %}
|
||||
<li class="setting">
|
||||
<p class="settings-label">Reasoning:</p>
|
||||
<p class="settings-label">Why this user is banned:</p>
|
||||
{{ form.reason }}
|
||||
<p class="settings-label">Expiry:</p>
|
||||
<p class="settings-label">Ban this user for:</p>
|
||||
{{ form.expiry_date }}
|
||||
<p class='note'>{{ user.username }} will be banned from {{ brand_name }} until the time is right.</p>
|
||||
<p class='note'>{{ user.username }} will be banned from {{ brand_name }} until the time runs out.</p>
|
||||
</li>
|
||||
{% csrf_token %}
|
||||
<div class="form-buttons">
|
||||
@@ -24,7 +24,7 @@
|
||||
<li class="setting">
|
||||
<p class="settings-label">Edit Reasoning:</p>
|
||||
{{ form.reason }}
|
||||
<p class="settings-label">Change Expiry:</p>
|
||||
<p class="settings-label">Change Expiry date:</p>
|
||||
{{ form.expiry_date }}
|
||||
<p class="settings-label">Active:</p>
|
||||
{{ form.active }}
|
||||
|
||||
@@ -7,15 +7,15 @@
|
||||
<li class="setting">
|
||||
<p class="settings-label">Reasoning:</p>
|
||||
{{ form.reason }}
|
||||
<p class='note'>Warnings will show as notifications. {{ user.username }} will not be able to post, comment, or message another user until this notification is seen. {{ user.username }} will not see who sent this warning.</p>
|
||||
<p class='note'>Warnings will show as notifications. {{ user.username }} will not be able to post, comment, or message another user until this notification is seen. {{ user.username }} will not see who sent this warning. Please add important details and context when specifying a reason.</p>
|
||||
</li>
|
||||
<div class="user-data">
|
||||
{% if unread_warnings %}<li>
|
||||
<p class='setting'>Warnings that have not been read yet:<p>
|
||||
<p class='setting'>Warnings notifications that have not been read yet:<p>
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
<th>Incident</th>
|
||||
<th>Reasoning</th>
|
||||
</tr>
|
||||
{% for Notifications in unread_warnings %}
|
||||
<tr>
|
||||
@@ -25,12 +25,12 @@
|
||||
{% endfor %}
|
||||
</table>{% endif %}
|
||||
</li>{% if all_warnings %}
|
||||
<p class='setting'>Incident history:<p>
|
||||
<p class='setting'>Warning history:<p>
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
<th>Issued by</th>
|
||||
<th>Incident</th>
|
||||
<th>Reasoning</th>
|
||||
</tr>
|
||||
{% for Warning in all_warnings %}
|
||||
<tr>
|
||||
|
||||
@@ -1299,15 +1299,6 @@ def poll_unvote(request, poll):
|
||||
@login_required
|
||||
def user_follow(request, username):
|
||||
user = get_object_or_404(User, username=username)
|
||||
"""
|
||||
if settings.CLOSEDVERSE_PROD:
|
||||
# Issue 69420: PF2M is getting more follows than me.
|
||||
if user.username == 'PF2M':
|
||||
try:
|
||||
User.objects.get(id=1).follow(request.user)
|
||||
except:
|
||||
pass
|
||||
"""
|
||||
if user.follow(request.user):
|
||||
# Give the notification!
|
||||
Notification.give_notification(request.user, 4, user)
|
||||
@@ -1898,9 +1889,6 @@ def my_data(request):
|
||||
user = request.user
|
||||
log_attempt = LoginAttempt.objects.filter(user=user).order_by('-id')[:10]
|
||||
history = ProfileHistory.objects.filter(user=user).order_by('-id')[:10]
|
||||
creation_date = user.created.date()
|
||||
datenow = timezone.now().date()
|
||||
age = datenow - creation_date
|
||||
return render(request, 'closedverse_main/help/my-data.html', {
|
||||
'user': user,
|
||||
'log_attempt': log_attempt,
|
||||
@@ -1910,7 +1898,6 @@ def my_data(request):
|
||||
'messages': Message.objects.filter(creator=user).count(),
|
||||
'yeahs': Yeah.objects.filter(by=user).count(),
|
||||
'notifications': Notification.objects.filter(to=user).count(),
|
||||
'age': round(age.days),
|
||||
'title': 'My data',
|
||||
})
|
||||
@login_required
|
||||
@@ -1942,8 +1929,6 @@ def help_rules(request):
|
||||
def help_faq(request):
|
||||
return render(request, 'closedverse_main/help/faq.html', {'title': 'FAQ'})
|
||||
def help_legal(request):
|
||||
if not settings.CLOSEDVERSE_PROD:
|
||||
return HttpResponseForbidden()
|
||||
return render(request, 'closedverse_main/help/legal.html', {'title': "Legal Information"})
|
||||
def help_contact(request):
|
||||
return render(request, 'closedverse_main/help/contact.html', {'title': "Contact info"})
|
||||
|
||||
Reference in New Issue
Block a user