summaryrefslogtreecommitdiff
path: root/fossee_manim
diff options
context:
space:
mode:
authorAkshen2019-05-16 15:39:09 +0530
committerAkshen2019-05-16 15:39:09 +0530
commit03a913565b72ff950b2d7eb21bbf25864740dce4 (patch)
tree1edd29dca5a7c8bbf5a2048d9a883609ff5d8700 /fossee_manim
parent3e20c060a06c99f53b831eb2e2b33923ba893d07 (diff)
downloadFOSSEE_animations-03a913565b72ff950b2d7eb21bbf25864740dce4.tar.gz
FOSSEE_animations-03a913565b72ff950b2d7eb21bbf25864740dce4.tar.bz2
FOSSEE_animations-03a913565b72ff950b2d7eb21bbf25864740dce4.zip
Rejection and Comments
- Reject Button issue fixed - Private Comments on video are hidden
Diffstat (limited to 'fossee_manim')
-rw-r--r--fossee_manim/templates/fossee_manim/proposal_status.html2
-rw-r--r--fossee_manim/views.py22
2 files changed, 16 insertions, 8 deletions
diff --git a/fossee_manim/templates/fossee_manim/proposal_status.html b/fossee_manim/templates/fossee_manim/proposal_status.html
index b7a62f6..e9752ca 100644
--- a/fossee_manim/templates/fossee_manim/proposal_status.html
+++ b/fossee_manim/templates/fossee_manim/proposal_status.html
@@ -33,6 +33,7 @@
<th>Title</th>
<th>Contributor Name</th>
<th>Status</th>
+ <th>Created Date</th>
</tr>
</thead>
{% for an in anime_list %}
@@ -41,6 +42,7 @@
<td>{{ an.title }}</td>
<td>{{ an.contributor.get_full_name }}</td>
<td><span class="badge">{{ an.status }}</span></td>
+ <td><span class="badge">{{ an.created }}</span></td>
<td><a href="{% url 'edit_proposal' an.id %}"><button type="button" class="btn btn-info">View</button></a></td>
</tr>
</tbody>
diff --git a/fossee_manim/views.py b/fossee_manim/views.py
index e72aa2d..50aa816 100644
--- a/fossee_manim/views.py
+++ b/fossee_manim/views.py
@@ -26,6 +26,7 @@ from requests import get
from random import sample
from .send_mails import send_email
import datetime as dt
+import logging.config
import shutil
try:
from StringIO import StringIO as string_io
@@ -40,14 +41,19 @@ def makepath(proposal_data, reject=None):
proposal_data.category.name))
if reject:
- shutil.rmtree(path.join(
+ try:
+ shutil.rmtree(path.join(
settings.MEDIA_ROOT, proposal_data.category.name,
proposal_data.title.replace(" ", "_")
- + str(proposal_data.id)))
+ ))
+ except:
+ logging.info("Proposal rejected")
+
+
else:
makedirs(path.join(settings.MEDIA_ROOT, proposal_data.category.name,
proposal_data.title.replace(" ", "_")
- + str(proposal_data.id)))
+ ))
def check_repo(link):
@@ -105,8 +111,8 @@ def user_login(request):
return redirect('/admin')
if user.is_authenticated():
if user.groups.filter(name='reviewer').count() > 0:
- return redirect('/view_profile/')
- return redirect('/view_profile/')
+ return redirect('/proposal_status/')
+ return redirect('/proposal_status/')
if request.method == "POST":
form = UserLoginForm(request.POST)
@@ -115,7 +121,7 @@ def user_login(request):
login(request, user)
if user.groups.filter(name='reviewer').count() > 0:
return redirect('/view_profile/')
- return redirect('/how_to/')
+ return redirect('/proposal_status/')
else:
return render(request, 'fossee_manim/login.html', {"form": form})
else:
@@ -464,8 +470,8 @@ def video(request, aid=None):
x.animation.category == video[0].animation.category)]
reviewer_id = video[0].animation.reviewer.id
comment_list = Comment.objects.filter(animation=video[0].animation)
- comments = [x for x in comment_list if x.animation.status !=
- ('pending' or 'changes')]
+ comments = [x for x in comment_list if x.animation_status not in
+ ('pending', 'changes')]
if request.method == 'POST':
if is_email_checked(user):
comment_form = CommentForm(request.POST)