aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blog/urls.py2
-rw-r--r--templates/blog/account.html4
-rw-r--r--templates/blog/partials/sidebar.html2
-rw-r--r--users/views.py5
4 files changed, 8 insertions, 5 deletions
diff --git a/blog/urls.py b/blog/urls.py
index 7824476c..e00f3183 100644
--- a/blog/urls.py
+++ b/blog/urls.py
@@ -7,5 +7,5 @@ urlpatterns = [
path('my/', RedirectView.as_view(pattern_name='account', permanent=False)),
path('account/', RedirectView.as_view(pattern_name='account', permanent=False)),
path('my/account', views.account, name='account'),
- path('my/homepage', views.homepage, name='homepage'),
+ # path('my/homepage', views.homepage, name='homepage'),
]
diff --git a/templates/blog/account.html b/templates/blog/account.html
index e219e978..84f63613 100644
--- a/templates/blog/account.html
+++ b/templates/blog/account.html
@@ -63,7 +63,7 @@
<input type="text" name="location" id="location" value="{{ user_profile.location }}" placeholder="Location" maxlength="50"/>
<label for="bio">Bio</label>
<textarea name="bio" id="bio" placeholder="Bio">{{ user_profile.bio }}</textarea>
- <label for="isPublic">Account Visibility</label>
+ {% comment %} <label for="isPublic">Account Visibility</label>
<select name="isPublic" id="isPublic">
<option value="1"{% if user_profile.is_public %} selected{% endif %}>Public</option>
<option value="0"{% if not user_profile.is_public %} selected{% endif %}>Private</option>
@@ -74,7 +74,7 @@
<option value="1"{% if user_profile.email_public %} selected{% endif %}>Public</option>
<option value="0"{% if not user_profile.email_public %} selected{% endif %}>Private</option>
</select>
- {% endif %}
+ {% endif %} {% endcomment %}
<input type="submit" value="Update Account" />
</fieldset>
</form>
diff --git a/templates/blog/partials/sidebar.html b/templates/blog/partials/sidebar.html
index cd46c18a..63fb8dde 100644
--- a/templates/blog/partials/sidebar.html
+++ b/templates/blog/partials/sidebar.html
@@ -45,7 +45,7 @@
<li><a href="/blog">Blog</a></li>
{% if user.is_authenticated %}
<li><a href="{% url 'account' %}">My Account</a></li>
- <li><a href="{% url 'homepage' %}">My Homepage<a></li>
+ {% comment %} <li><a href="{% url 'homepage' %}">My Homepage<a></li> {% endcomment %}
{% else %}
<li><a href="/register">Register</a></li>
{% endif %}
diff --git a/users/views.py b/users/views.py
index 03773a7f..a269c2ef 100644
--- a/users/views.py
+++ b/users/views.py
@@ -50,11 +50,14 @@ def update_user(request):
location = request.POST['location']
gravatar_email = request.POST['gravatarEmail']
bio = request.POST['bio']
- is_public = True if request.POST['isPublic'] == '1' else False
+ is_public = False
email_public = False
if 'emailPublic' in request.POST:
email_public = True if request.POST['emailPublic'] == '1' and is_public else False
+ if 'isPublic' in request.POST:
+ is_public = True if request.POST['isPublic'] == '1' and is_public else False
+
if username is not None:
user = User.objects.get(username=username)
user.first_name = first_name