Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
784f0d3
New bar layout
gusbakker Apr 19, 2020
6a1630d
Added an entire new functionality to Follow, Send friend requests and…
gusbakker Apr 19, 2020
91f3723
added default secret_key to production settings
gusbakker Apr 20, 2020
3b01f67
added default AWS secret_key to production settings
gusbakker Apr 20, 2020
8f33e86
added default Admin Url to production settings
gusbakker Apr 20, 2020
d26afac
added default mailgun_sender to production settings
gusbakker Apr 20, 2020
dccced5
added default sentry_dsn to production settings
gusbakker Apr 20, 2020
520c756
fixed some unit tests
gusbakker Apr 21, 2020
f170090
changed secret key in production
gusbakker Apr 22, 2020
9d990c6
changed procfile
gusbakker Apr 22, 2020
1ce14d7
added heroku features to production settings
gusbakker Apr 22, 2020
3f4886c
removed heroku features to production settings
gusbakker Apr 22, 2020
b5c5d2f
removed .env variable for heroku production settings
gusbakker Apr 22, 2020
658aa2b
reverted Procfile
gusbakker Apr 22, 2020
a7686ef
changed aws production
gusbakker Apr 22, 2020
72a176e
changed gitignore to include .env in production. changed production t…
gusbakker Apr 22, 2020
a276fa6
changed logging booleans production
gusbakker Apr 22, 2020
e9b1d82
changed Procfile logging booleans production
gusbakker Apr 22, 2020
39ed542
changed Procfile logging booleans production
gusbakker Apr 22, 2020
1ff460a
changes...
gusbakker Apr 22, 2020
935531b
changes...
gusbakker Apr 22, 2020
b75989d
changes...
gusbakker Apr 22, 2020
d74f7ca
changes...
gusbakker Apr 22, 2020
9398df6
changes...
gusbakker Apr 22, 2020
58724e9
changes...
gusbakker Apr 22, 2020
ed0a42e
changes...
gusbakker Apr 22, 2020
79d9e3d
changes..
gusbakker Apr 22, 2020
b0714eb
restored Gunicorn server
gusbakker Apr 23, 2020
b67a5a3
cenas
gusbakker Apr 23, 2020
87f5c6e
finally I could deploy holy jesus..but lets try with daphne again
gusbakker Apr 23, 2020
e791eec
changed default email from
gusbakker Apr 23, 2020
a0c2b0e
changed default email from
gusbakker Apr 23, 2020
8609db1
changed AWS settings
gusbakker Apr 24, 2020
85d2b50
changed Procfile
gusbakker Apr 24, 2020
12075aa
changed user view
gusbakker Apr 24, 2020
4996a4e
experiments..
gusbakker Apr 24, 2020
e38e5c2
experiments..
gusbakker Apr 24, 2020
5b3f22b
experiments..
gusbakker Apr 24, 2020
315a52c
exp...
gusbakker Apr 24, 2020
c722869
added CORS headers to production
gusbakker Apr 24, 2020
9aa0816
experiments
gusbakker Apr 24, 2020
57b42dc
experiments
gusbakker Apr 24, 2020
84d99d0
experiments
gusbakker Apr 24, 2020
4142979
experiments
gusbakker Apr 24, 2020
b86f76f
changed asgi max threads to solves max connections in heroku
gusbakker Apr 24, 2020
3a78664
new profile design..
gusbakker May 9, 2020
361a3db
added pytest remove news
gusbakker May 10, 2020
923ca80
findd changes test
pedrocarvs May 11, 2020
aa70650
fix test
pedrocarvs May 11, 2020
401aa5a
fixed notifications (links, loading and bell). Added activity to prof…
gusbakker May 13, 2020
55bf1f5
c
gusbakker May 13, 2020
538a9a4
added domain to production
gusbakker May 13, 2020
ad30c6f
changed background image
gusbakker May 13, 2020
bbf28b3
changed background text welcome
gusbakker May 13, 2020
c6dba0e
fixed pic upload
gusbakker May 13, 2020
e9c55d8
Added new style and fixed user profile
gusbakker May 13, 2020
c5777f4
Fixed netwrok users list and user contact card. Updated information o…
gusbakker May 14, 2020
59f5aa5
updated readme for this bootcamp new version
gusbakker May 14, 2020
739763a
updated readme for this bootcamp new version
gusbakker May 14, 2020
ca8230c
Fixed activity in user profile
gusbakker May 14, 2020
fbf5e7d
added Groups app with model and view
gusbakker May 17, 2020
54dadda
Fixed url links in Notifications. Change URL os users. Added users Ne…
gusbakker May 17, 2020
386597c
Merge branch 'develop' into develop
gusbakker May 17, 2020
6195b8c
Added new delete post design and migrations for Groups model
gusbakker May 18, 2020
36e5d44
added dropdown to News Delete option
gusbakker May 18, 2020
5a2fd9d
Merge branch 'develop' of github.com:gusbakker/bootcamp into develop
gusbakker May 18, 2020
b4c61ed
Fixed users list in Network and profile activity.
gusbakker May 18, 2020
d8a05ec
Added new Dark Mode feature. Updated to new Bootstrap 4.5 and jquery 3.5
gusbakker May 18, 2020
7007148
changed SITE id for social account to Local
gusbakker May 18, 2020
79fee95
changed SITE id for social account to Local
gusbakker May 18, 2020
f13fcc4
Fixed Groups app
gusbakker May 18, 2020
cd8084f
fixed social app settings. Added temporary News image feature as comm…
gusbakker May 18, 2020
de240ab
changed social app settings
gusbakker May 18, 2020
095df42
changed social app settings
gusbakker May 19, 2020
a2dfda6
changed social app settings
gusbakker May 19, 2020
5ca1a05
fixed news image attachment
gusbakker May 19, 2020
975795f
fixed news image attachment
gusbakker May 19, 2020
207350f
added News attachment Image features including css and js
gusbakker May 20, 2020
4ef5bc0
Completed Dark Mode features with new design by changing CSS. Finishe…
gusbakker May 20, 2020
b7206a8
Re-designed Feed page
gusbakker May 20, 2020
a67b41f
added edit profile option to profile
gusbakker May 20, 2020
a152505
changes
gusbakker May 20, 2020
1c69c58
changes
gusbakker May 20, 2020
bbabd79
updated s3 production
gusbakker May 21, 2020
a13db4b
fixed set password screen to include menu
gusbakker May 21, 2020
e8a0570
Updated domain stuff
gusbakker May 21, 2020
7cd634a
fixed news, articles and messages to use cascade deletion when user i…
gusbakker May 21, 2020
df2ad16
removed scope user_friends from facebook login
gusbakker May 21, 2020
4965da8
updated productions settings
gusbakker May 22, 2020
5830d75
updated productions settings
gusbakker May 22, 2020
a48d506
updated aws s3 bucket domain. Changed image field of user
gusbakker May 22, 2020
7206a6c
changed site id in production
gusbakker May 23, 2020
aea8344
added mailgun european region in production
gusbakker May 24, 2020
513cedb
Fixed Contacts. The url to see all contacts is now fixed
gusbakker May 24, 2020
e2adf9a
little fix in notifications for deleted posts and notifications image…
gusbakker May 24, 2020
82b0d9f
removed pagination in the detail view of users
gusbakker May 24, 2020
ae6729e
chenged profile picture and profile detail do hide email and include …
gusbakker May 24, 2020
059db93
updated project for antisocial network
gusbakker May 24, 2020
5138b10
fixed news post
gusbakker May 25, 2020
9a10ea9
fixed image url in posts
gusbakker May 25, 2020
dd31598
fixed images post in News feed
gusbakker May 25, 2020
3911ed2
fixed notification links for articles
gusbakker May 25, 2020
4283740
Update README.rst
gusbakker Jun 19, 2020
561458b
Update README.rst
gusbakker Jun 19, 2020
8bdf801
Update README.rst
gusbakker Jun 19, 2020
4521e63
Update README.rst
gusbakker Jun 19, 2020
0d89443
Update README.rst
gusbakker Jun 19, 2020
3429124
Update README.rst
gusbakker Jun 19, 2020
1dcb859
Update README.rst
gusbakker Jun 19, 2020
4f1c63d
Update README.rst
gusbakker Jun 19, 2020
1b053a9
Update README.rst
gusbakker Jun 19, 2020
1c68ff0
Update README.rst
gusbakker Jun 19, 2020
90b28a7
Update README.rst
gusbakker Jun 19, 2020
143e632
Update README.rst
gusbakker Jun 19, 2020
cd6bc7e
Update README.rst
gusbakker Jun 19, 2020
9ce3eca
Update README.rst
gusbakker Jun 19, 2020
d75052a
Update README.rst
gusbakker Jun 19, 2020
a1c3eb4
Update README.rst
gusbakker Sep 28, 2020
bee3238
Update README.rst
gusbakker Oct 20, 2021
b0874ee
Update README.rst
gusbakker Nov 8, 2021
06776f4
-fixed some unit tests
gusbakker Nov 8, 2021
8a9cd16
-fixed some unit tests
gusbakker Nov 8, 2021
51087cd
Merge remote-tracking branch 'origin/master'
gusbakker Nov 8, 2021
3633422
Merge branch 'myversion' into develop
gusbakker Nov 8, 2021
b128794
Merge branch 'myversion' into develop
gusbakker Nov 12, 2021
dd03e48
Updated readme
gusbakker Nov 12, 2021
d24af92
Updated readme
gusbakker Nov 12, 2021
822140e
updated user order in users list
gusbakker Nov 13, 2021
81a117a
Merge branch 'develop' into develop
gusbakker Dec 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bootcamp/news/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
url(
r"^update-interactions/$", views.update_interactions, name="update_interactions"
),
url(r'^(?P<pk>[\w.@+-]+)/$', views.news, name='news'),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this URL pattern? It looks like it is to show individual news on a different page, which in time render useless the original feature. If that's the intent, what is the logic behind it? And if it only makes a call to a single element, is it necessary to make a pattern that complex? It looks like the simpler pattern added with path() will suffice.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since in this version we are dealing with UUID instead of simple id, this pattern allows to show that uuid. But maybe could be simplified

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't had the time of migrating all the URL from the old pattern using url() to the new method given in Django2 using path(), which actually has a <uuid> identifying structure.

]
13 changes: 7 additions & 6 deletions bootcamp/news/views.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import (
HttpResponse,
HttpResponseBadRequest,
JsonResponse,
HttpResponseForbidden,
)
from django.http import HttpResponse, HttpResponseBadRequest, JsonResponse, HttpResponseForbidden
from django.shortcuts import get_object_or_404, render
from django.template.loader import render_to_string
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
Expand Down Expand Up @@ -34,6 +30,11 @@ class NewsDeleteView(LoginRequiredMixin, AuthorRequiredMixin, DeleteView):
success_url = reverse_lazy("news:list")


def news(request, pk):
news = get_object_or_404(News, pk=pk)
return render(request, 'news/news_activity.html', {'news': news})


@login_required
@ajax_required
@require_http_methods(["POST"])
Expand Down
2 changes: 1 addition & 1 deletion bootcamp/static/css/bootcamp.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import url(https://fonts.googleapis.com/css?family=Audiowide);

body {
padding-top: 80px;
padding-top: 70px;
}

header .navbar-brand {
Expand Down
4 changes: 4 additions & 0 deletions bootcamp/static/css/news.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ ul.stream li div.post div.interaction a {
overflow-x: auto;
}

.suggestions-column {
margin-top: 78px;
}

.timestamp {
font-size: 0.8em;
color: grey;
Expand Down
56 changes: 30 additions & 26 deletions bootcamp/templates/articles/article_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@

<!-- Page Content -->
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'news:list' %}">{% trans 'Home' %}</a></li>
{% if view.kwargs.tag %}
<li class="breadcrumb-item"><a href="{% url 'articles:list' %}">{% trans 'Articles' %}</a></li>
<li class="breadcrumb-item active"><a href="{% url 'articles:list' %}tag/{{ view.kwargs.tag }}">{{ view.kwargs.tag }}</a></li>
{% else %}
<li class="breadcrumb-item active"><a href="{% url 'articles:list' %}">{% trans 'Articles' %}</a></li>
{% endif %}
</ol>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{% url 'news:list' %}">{% trans 'Home' %}</a></li>
{% if view.kwargs.tag %}
<li class="breadcrumb-item"><a href="{% url 'articles:list' %}">{% trans 'Articles' %}</a></li>
<li class="breadcrumb-item active"><a
href="{% url 'articles:list' %}tag/{{ view.kwargs.tag }}">{{ view.kwargs.tag }}</a></li>
{% else %}
<li class="breadcrumb-item active"><a href="{% url 'articles:list' %}">{% trans 'Articles' %}</a></li>
{% endif %}
</ol>
</nav>
<div class="row">
<!-- Blog Entries Column -->
Expand Down Expand Up @@ -56,7 +57,8 @@ <h4 class="no-data">{% trans 'There is no published article yet' %}. <a
{% if is_paginated %}
<ul class="pagination justify-content-center mb-4">
{% if page_obj.has_previous %}
<li class="page-item"><a class="page-link" href="?page={{ page_obj.previous_page_number }}">&larr; {% trans 'Newer' %}</a>
<li class="page-item"><a class="page-link"
href="?page={{ page_obj.previous_page_number }}">&larr; {% trans 'Newer' %}</a>
</li>
{% else %}
<li class="page-item disabled"><a class="page-link" href="#"><span>&larr;</span></a></li>
Expand Down Expand Up @@ -97,23 +99,25 @@ <h4 class="no-data">{% trans 'There is no published article yet' %}. <a
</div>
{% endif %}
<!-- Cloud Tag Widget -->
<div class="card mb-4">
<h5 class="card-header">{% trans 'Cloud tag' %}</h5>
<div class="card-body">
{% for tag, tag_props in popular_tags %}
{% if tag_props.slug == view.kwargs.tag %}
<a href="{% url 'articles:list' %}">
<span class="badge badge-success">{{ tag_props.count }} {{ tag }} <i class="fa fa-times" aria-hidden="true"></i></span>
</a>
{% else %}
<a href="{% url 'articles:list' %}tag/{{ tag_props.slug }}">
<span class="badge badge-info">{{ tag_props.count }} {{ tag }}</span>
</a>
{% endif %}
{% endfor %}
</div>
<div class="card my-4">
<h5 class="card-header">{% trans 'Cloud tag' %}</h5>
<div class="card-body">
{% for tag, tag_props in popular_tags %}
{% if tag_props.slug == view.kwargs.tag %}
<a href="{% url 'articles:list' %}">
<span class="badge badge-success">{{ tag_props.count }} {{ tag }} <i class="fa fa-times"
aria-hidden="true"></i></span>
</a>
{% else %}
<a href="{% url 'articles:list' %}tag/{{ tag_props.slug }}">
<span class="badge badge-info">{{ tag_props.count }} {{ tag }}</span>
</a>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>

</div>
<!-- /.row -->

Expand Down
2 changes: 1 addition & 1 deletion bootcamp/templates/messager/message_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{% block content %}

<div class="page-header">
<h1>{{ request.user.get_profile_name|title }} {% trans 'Conversations' %}</h1>
<h1>{% trans 'Messenger' %}</h1>
</div>
<div class="row" style="margin-top: 1em">
<div class="col-md-3 list-group users-list">
Expand Down
22 changes: 22 additions & 0 deletions bootcamp/templates/news/news_activity.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% extends 'base.html' %}
{% load static i18n humanize %}
{% load thumbnail %}

{% block head %}
<link href="{% static 'css/news.css' %}?v=1" rel="stylesheet">
{% endblock head %}

{% block content %}
<div class="page-header">
<h1>News</h1>
</div>
<ul class="stream">
{% include 'news/news_single.html' with news=news %}
</ul>
{% endblock content %}

{% block modal %}
<script src="{% static 'js/jquery.waypoints.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/infinite.min.js' %}" type="text/javascript"></script>
<script src="{% static 'js/news.js' %}" type="text/javascript"></script>
{% endblock modal %}
12 changes: 10 additions & 2 deletions bootcamp/templates/news/news_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% block content %}
<!-- Container -->
<div class="row">
<div class="col-md-6 offset-md-3">
<div class="col-md-7 offset-md-1">
<div class="page-header">
<button type="button" class="btn btn-primary pull-right btn-compose" data-toggle="modal"
data-target="#newsFormModal">
Expand Down Expand Up @@ -49,7 +49,15 @@ <h5 class="card-header">{% trans 'Latest posts' %}</h5>
<!-- End News List -->
</div>
</div>
</div>
<div class="col-md-3 suggestions-column">
<!-- Ads and Recommendations Widget -->
<div class="card mb-4">
<h5 class="card-header">{% trans 'Suggestions For You' %}</h5>
<div class="card-body mb-4">
<p>Extra content here</p>
</div>
</div>
</div>
</div>
<!-- End container -->

Expand Down
33 changes: 23 additions & 10 deletions bootcamp/templates/news/news_single.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,31 @@
{% load thumbnail %}
{% load urlize_target_blank %}

<li class="infinite-item" news-id="{{ news.uuid_id }}">
<li class="infinite-item" news-id="{{ news.uuid_id }}" csrf="{{ csrf_token }}">
<div class="news-body">
<div class="profile-picture">
<img src="{{ news.user.get_picture }}" class="user-image pull-left"
style="width: 60px; border-radius: 50%;"
alt="{% trans 'User Image' %}">
<a href="{% url 'users:detail' news.user.username %}">
<img src="{{ news.user.get_picture }}" class="user-image pull-left"
style="width: 60px; border-radius: 50%;"
alt="{% trans 'User Image' %}">
</a>
</div>
<div class="post">
{% if news.user == request.user %}
<a href="#">
<i class="fa fa-times pull-right remove-news" aria-hidden="true"
title="{% trans 'Click to remove this news' %}"></i>
</a>
{% endif %}
<i class="fa fa-gear pull-right" style="color: #6c757d" href="#" id="dotsDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
</i>
<div class="dropdown-menu" aria-labelledby="dotsDropdown">
{% if news.user == request.user %}
<a class="dropdown-item remove-news" style="color: red" href="#">
{% trans 'Delete' %}
</a>
{% endif %}
{% if news.user != request.user %}
<a class="dropdown-item remove-news" href="#">
{% trans 'Report This' %}
</a>
{% endif %}
</div>
<h3>
<a href="{% url 'users:detail' news.user.username %}">{{ news.user.username }}</a>
<small class="timestamp">{{ news.timestamp|naturaltime }}</small>
Expand Down Expand Up @@ -54,6 +65,8 @@ <h5 class="card-title">{{ news.meta_title }}</h5>
<a href="#" class="comment"><i class="fa fa-comment-o" aria-hidden="true"></i>
<span class="comment-count">{{ news.count_thread }}</span>
</a>
<a href="#" class="share"><i class="fa fa-share" aria-hidden="true"></i>
</a>
</div>
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions bootcamp/templates/search/search_results.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
{% block title %} {% trans 'Search Results' %} {% endblock %}

{% block head %}
<link href="{% static 'css/user_profile.css' %}?v=1" rel="stylesheet">
<link href="{% static 'css/news.css' %}?v=1" rel="stylesheet">

{% endblock head %}

{% block content %}
Expand Down
7 changes: 7 additions & 0 deletions bootcamp/templates/users/user_activity.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="infinite-container" style="margin-top: 20px">
<ul class="stream">
{% for news in user_activity %}
{% include 'news/news_single.html' with news=news %}
{% endfor %}
</ul>
</div>
28 changes: 22 additions & 6 deletions bootcamp/templates/users/user_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

{% block head %}
<link href="{% static 'css/user_profile.css' %}?v=1" rel="stylesheet">
<link href="{% static 'css/news.css' %}?v=1" rel="stylesheet">

{% endblock head %}

{% block content %}
Expand Down Expand Up @@ -49,13 +51,13 @@

<div class="row">
<div class="col-md-2 user-profile">
<img src="{{ object.get_picture }}" class="user-image"
style="width: 150px; border-radius: 50%;"
alt="{% trans 'User Image' %}">
<img src="{{ object.get_picture }}" class="user-image"
style="width: 150px; border-radius: 50%;"
alt="{% trans 'User Image' %}">
</div>
<div id="contact-info" class="vcard">
<h1 class="fn">
{{ object.get_profile_name|title }}
<div id="contact-info" class="col-md-7 vcard">
<h1 class="page-header">
{{ object.get_profile_name }}
{% if object.short_bio %}
<br/><small style="font-size: 50%">{{ object.short_bio }}</small>
{% endif %}
Expand Down Expand Up @@ -97,6 +99,20 @@ <h1 class="fn">
title="{% trans 'Facebook Profile' %}"><i
class="fa fa-facebook"></i> </a>
{% endif %}

<!-- Nav tabs -->
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#user_activity">Activity</a>
</li>
</ul>

<!-- Tab panes -->
<div class="tab-content">
<div id="user_activity" class="container tab-pane active"><br>
{% include 'users/user_activity.html' with user_activity=user_activity %}
</div>
</div>
</div>

</div>
Expand Down
13 changes: 10 additions & 3 deletions bootcamp/users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@
from django.views.generic import DetailView, ListView, RedirectView, UpdateView
from django.conf import settings as django_settings
from .models import User
from ..news.models import News
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import is a bad pattern, it is preferable to use base project imports using absolute references.



class UserDetailView(LoginRequiredMixin, DetailView):
model = User
paginate_by = 20
# These next two lines tell the view to index lookups by username
slug_field = "username"
slug_url_kwarg = "username"

def get_context_data(self, *args, **kwargs):
context = super().get_context_data(*args, **kwargs)
context['user_activity'] = News.objects.filter(user=context['user'])
return context


class UserRedirectView(LoginRequiredMixin, RedirectView):
permanent = False
Expand Down Expand Up @@ -92,10 +99,10 @@ def upload_picture(request):
im.thumbnail(new_size, Image.ANTIALIAS)
im.save(filename)

return redirect("/users/picture/?upload_picture=uploaded")
return redirect("/picture/?upload_picture=uploaded")

except Exception:
return redirect("/users/picture/")
return redirect("/picture/")


@login_required
Expand Down Expand Up @@ -126,4 +133,4 @@ def save_uploaded_picture(request):
except Exception:
pass

return redirect("/users/picture/")
return redirect("/picture/")
2 changes: 1 addition & 1 deletion config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
# Django Admin, use {% url 'admin:index' %}
url(settings.ADMIN_URL, admin.site.urls),
# User management
url(r"^users/", include("bootcamp.users.urls", namespace="users")),
url(r"^accounts/", include("allauth.urls")),
# Third party apps here
url(r"^comments/", include("django_comments.urls")),
Expand All @@ -33,6 +32,7 @@
url(r"^messages/", include("bootcamp.messager.urls", namespace="messager")),
url(r"^qa/", include("bootcamp.qa.urls", namespace="qa")),
url(r"^search/", include("bootcamp.search.urls", namespace="search")),
url("", include("bootcamp.users.urls", namespace="users")),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't remove the line and add it in a different place unless necessary, this changes brakes the traceability for future references.

Copy link
Author

@gusbakker gusbakker May 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would you do this? So users URL follow the pattern domain/user instead of domain/users/user. The line still there. I just replaced the first parameter "users/" by ""

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh no, I'm actually referring to you deleting the URL from line 20 and creating it again in line 35. I actually understand why you want to remove the /user/ part, and I have no issue with that.

] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

if settings.DEBUG:
Expand Down