aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-12-28 09:16:49 -0500
committerBobby <[email protected]>2022-12-28 09:16:49 -0500
commitff1278225a3931432c5d2559ef25116134ea1cf8 (patch)
treec4f85f3ea7d97cb51993ccb3f008372d3ef10c35
parent0173cde15dc587acb7c6014f19ff06381d0b72ca (diff)
downloadthatcomputerscientist-ff1278225a3931432c5d2559ef25116134ea1cf8.tar.xz
thatcomputerscientist-ff1278225a3931432c5d2559ef25116134ea1cf8.zip
Register form fixed many times till now. This is another attempt
-rw-r--r--static/css/main.css7
-rw-r--r--templates/blog/partials/base.html1
-rw-r--r--templates/blog/register.html10
-rw-r--r--users/forms.py2
4 files changed, 13 insertions, 7 deletions
diff --git a/static/css/main.css b/static/css/main.css
index f4e00aaa..5bc242c8 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -74,7 +74,7 @@ input {
margin-top: 20px;
}
-.error {
+.error, .errorlist {
color: #fa3737;
}
@@ -139,6 +139,11 @@ input {
padding: 0px;
}
+#register_form ul {
+ padding: 0px;
+ list-style-type: none;
+}
+
#navigation-area li, #archives-area li, #categories-area li, #admin-area li, #announcements li {
display: block;
margin: 0px;
diff --git a/templates/blog/partials/base.html b/templates/blog/partials/base.html
index 38ab9e22..f1486758 100644
--- a/templates/blog/partials/base.html
+++ b/templates/blog/partials/base.html
@@ -19,7 +19,6 @@
<meta name="twitter:image" content="{{ request.meta.image }}" />
<meta name="robots" content="{{ request.meta.robots }}" />
<title>That Computer Scientist - {{ title }}</title>
- <link preload rel="stylesheet" href="{% static 'css/fonts.css' %}" />
<link preload rel="stylesheet" href="{% static 'css/main.css' %}" />
<link rel="apple-touch-icon" sizes="180x180" href="{% static 'images/favicons/apple-touch-icon.png' %}"/>
<link rel="icon" type="image/png" sizes="32x32" href="{% static 'images/favicons/favicon-32x32.png' %}"/>
diff --git a/templates/blog/register.html b/templates/blog/register.html
index b168c153..941bb59f 100644
--- a/templates/blog/register.html
+++ b/templates/blog/register.html
@@ -1,11 +1,13 @@
{% extends 'blog/partials/base.html' %} {% block content %}
-<h1>Register for an account</h1>
+<h1 style="margin-top: 0px;">Register for an account</h1>
<p>Register for an account to post your thoughts and get feedback from other users.</p>
<hr>
-<form method="post" id="register_form">
+<form method="post">
<input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}" style="display: none;">
- {{ form.as_p }}
- <img src="{% url 'ignis:captcha_image' captcha %}" alt="Captcha" id="captcha">
+ <table id="register_form">
+ {{ form.as_table }}
+ </table>
+ <p><img width="160" height="60" src="{% url 'ignis:captcha_image' captcha %}" alt="Captcha" id="captcha"></p>
<input type="hidden" name="expected_captcha" value="{{ captcha }}">
<input type="submit" value="Register" class="button button-special">
</form>
diff --git a/users/forms.py b/users/forms.py
index de13fe27..aebad567 100644
--- a/users/forms.py
+++ b/users/forms.py
@@ -12,7 +12,7 @@ from django.utils.http import urlsafe_base64_encode
from .tokens import account_activation_token
class RegisterForm(forms.Form):
- username = forms.CharField(label='Username', max_length=30)
+ username = forms.CharField(label='Username', max_length=30, min_length=4)
email = forms.EmailField(label='Email')
password1 = forms.CharField(label='Password', widget=forms.PasswordInput)
password2 = forms.CharField(label='Password (again)', widget=forms.PasswordInput)