aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2023-05-31 11:13:24 -0400
committerBobby <[email protected]>2023-05-31 11:13:24 -0400
commitdae5a88c63a0531c0119e9f25b7b99b483fc8be2 (patch)
treee13aa93ad9c8f5662c2d14db94b5866cfb842c63
parent343115fbceceb2e7eb9e5743c06ed5bc9f7f45a2 (diff)
downloadthatcomputerscientist-dae5a88c63a0531c0119e9f25b7b99b483fc8be2.tar.xz
thatcomputerscientist-dae5a88c63a0531c0119e9f25b7b99b483fc8be2.zip
Site policy updates and general updates
-rw-r--r--static/css/phone_compatibility.css2
-rw-r--r--static/css/styles.css1
-rw-r--r--templates/blog/account.html2
-rw-r--r--templates/blog/activity.html2
-rw-r--r--templates/blog/partials/base.html2
-rw-r--r--templates/blog/site_policy.html12
-rw-r--r--users/forms.py14
7 files changed, 27 insertions, 8 deletions
diff --git a/static/css/phone_compatibility.css b/static/css/phone_compatibility.css
index f86ca6e1..becbdf93 100644
--- a/static/css/phone_compatibility.css
+++ b/static/css/phone_compatibility.css
@@ -10,7 +10,7 @@ and readable on phones. Some features might need to be disabled for phones,
I am not sure yet.
*/
-@media only screen and (max-width: 450px) {
+@media only screen and (max-width: 480px) {
body {
max-width: 100vw !important;
font-size: 12px !important;
diff --git a/static/css/styles.css b/static/css/styles.css
index afef43c0..c8ddd549 100644
--- a/static/css/styles.css
+++ b/static/css/styles.css
@@ -253,6 +253,7 @@ blockquote {
.highlight {
background: none !important;
text-align: left !important;
+ overflow-x: scroll;
}
.comment {
diff --git a/templates/blog/account.html b/templates/blog/account.html
index 281bdaf7..7af89675 100644
--- a/templates/blog/account.html
+++ b/templates/blog/account.html
@@ -1,6 +1,6 @@
{% extends 'blog/partials/base.html' %} {% block content %}
{% load static %}
-<h2 style="margin-top: 0;">My Account</h2>
+<h2 class="mtctitem">My Account</h2>
<div id="profile-area">
<div style="width: 200px; height: 100%; display: inline; float: left;">
<div id="avatar-area" style="padding: 10px; margin-bottom: 10px;">
diff --git a/templates/blog/activity.html b/templates/blog/activity.html
index 8f1c9976..d8f11073 100644
--- a/templates/blog/activity.html
+++ b/templates/blog/activity.html
@@ -1,6 +1,6 @@
{% extends 'blog/partials/base.html' %} {% block content %}
{% load static %}
-<div style="background: #0c2c50;margin-bottom: 20px;padding: 10px 20px;border-radius: 8px;">
+<div style="background: #0c2c50;margin-bottom: 20px;padding: 10px 20px;border-radius: 8px;" class="mtctitem">
<table>
<tr>
<td>
diff --git a/templates/blog/partials/base.html b/templates/blog/partials/base.html
index ab10b6c4..5e56c95a 100644
--- a/templates/blog/partials/base.html
+++ b/templates/blog/partials/base.html
@@ -133,7 +133,7 @@
<p style="text-align: center; margin-top: 1rem">
&copy; {% now "Y" %} That Computer Scientist. Source code available on
<a href="https://github.com/luciferreeves/thatcomputerscientist"
- >GitHub </a
+ >GitHub</a
>. All rights reserved.
</p>
<p style="text-align: center">
diff --git a/templates/blog/site_policy.html b/templates/blog/site_policy.html
index 49d71bec..ac1ebaf9 100644
--- a/templates/blog/site_policy.html
+++ b/templates/blog/site_policy.html
@@ -1,7 +1,8 @@
{% extends 'blog/partials/base.html' %} {% block content %}
-<h2 style="margin-top:0px;">I see cookies! Wait, Do you track me?</h2>
+<h2 class="mtctitem">I see cookies! Wait, Do you track me?</h2>
<p>This site uses cookies to store information on your computer. These cookies are required to enable the login functionality of the site. They are not used for tracking purposes.</p>
+<p><b>Update:</b> W.E.F May 27, 2023, this site will employ <a href="https://analytics.google.com/analytics/web/">Google Analytics</a> to track user activity. Also Cloudflare's Browser Insights will be used to track performance metrics.</p>
<h2 class="mtsbitem">Also, do not sell my data!</h2>
<p>Any personal information you provide here will be kept confidential and will not be sold, rented, loaned, or otherwise disclosed. Any information you provide will be held with the utmost care, and will not be used in ways that you have not consented to. If you have any questions, please feel free to contact me at <a href="mailto:[email protected]">[email protected]</a>.</p>
@@ -55,6 +56,15 @@
<p>You are free to use and share the content on this site as long as you give credit to the author and link back to the original content. You may not use the content for commercial purposes. If you remix, transform, or build upon the source code, you must distribute your contributions under the same license as the original.</p>
+<h2 class="mtsbitem">Username Restrictions W.E.F May 27, 2023</h2>
+<p>A certain number of restrictions have been placed on usernames. Here's what you need to know:</p>
+<ul style="margin: 0px; padding-left: 30px;">
+<li><b>Length Restrictions:</b> 4-30 characters, alphanumeric only. (Unchanged)</li>
+<li><b>Protected Usernames:</b> Certain usernames like <i>admin</i>, <i>administrator</i>, <i>root</i>, <i>moderator</i>, etc. (non-exhaustive list) are protected and cannot be used for registering an account. (New)</li>
+<li><b>Changing Username:</b> Right now, this site does not allow username changes. (Unchanged) There are plans to allow username changes in the future, but it will be limited to once every 30 days. (New)</li>
+<li><b>Username Purging:</b> Accounts which have registered and haven't verified their email within 72 hours will be purged and the username will be available for registration again. (New) (Not yet implemented)</li>
+</ul>
+
<h2 class="mtsbitem">Is all the information on this site accurate?</h2>
<p>The information contained in this website is for general information purposes only. The information is provided by <a href="http://www.thatcomputerscientist.com">thatcomputerscientist.com</a> and while I endeavour to keep the information up to date and correct, I make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or the information, products, services, or related graphics contained on the website for any purpose. Any reliance you place on such information is therefore strictly at your own risk.</p>
diff --git a/users/forms.py b/users/forms.py
index e10da9f7..2a1be649 100644
--- a/users/forms.py
+++ b/users/forms.py
@@ -37,6 +37,14 @@ class RegisterForm(forms.Form):
'hostmaster',
'info',
'support',
+ 'anonymous',
+ 'guest',
+ 'nobody',
+ 'someone',
+ 'moderator',
+ 'moderators',
+ 'mods',
+ 'crvs'
]
allowed_chars = string.ascii_letters + string.digits
@@ -58,14 +66,14 @@ class RegisterForm(forms.Form):
if str.lower(captcha) != str.lower(self.expected_captcha):
raise forms.ValidationError('Captcha does not match.')
if User.objects.filter(username=cleaned_data.get('username')).exists():
- raise forms.ValidationError('Username already exists.')
+ raise forms.ValidationError('Username not available. Please choose another.')
if cleaned_data.get('username').lower() in self.protected_usernames:
- raise forms.ValidationError('Username not allowed. Please choose another.')
+ raise forms.ValidationError('Username not available. Please choose another.')
for char in cleaned_data.get('username'):
if char not in self.allowed_chars:
raise forms.ValidationError('Username contains invalid characters. Only A-Z, a-z, and 0-9 are allowed.')
if User.objects.filter(email=cleaned_data.get('email')).exists():
- raise forms.ValidationError('Email already exists.')
+ raise forms.ValidationError('Email already exists. Please login if this account is yours.')
return cleaned_data
def save(self, request):