SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 97257f59 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Bug fixed on comment submit page login

parent e6706433
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,7 @@ from .forms import * ...@@ -15,6 +15,7 @@ from .forms import *
from comments.models import Comment, AuthorReply from comments.models import Comment, AuthorReply
from comments.forms import CommentForm from comments.forms import CommentForm
from contributors.forms import AuthenticationForm
from ratings.forms import CommentRatingForm, AuthorReplyRatingForm, CommentaryRatingForm from ratings.forms import CommentRatingForm, AuthorReplyRatingForm, CommentaryRatingForm
################ ################
...@@ -47,7 +48,8 @@ def request_commentary(request): ...@@ -47,7 +48,8 @@ def request_commentary(request):
form = RequestCommentaryForm() form = RequestCommentaryForm()
return render(request, 'commentaries/request_commentary.html', {'form': form}) return render(request, 'commentaries/request_commentary.html', {'form': form})
else: # user is not authenticated: else: # user is not authenticated:
return render(request, 'contributors/login.html') form = AuthenticationForm()
return render(request, 'contributors/login.html', {'form': form})
def request_commentary_ack(request): def request_commentary_ack(request):
return render(request, 'commentaries/request_commentary_ack.html') return render(request, 'commentaries/request_commentary_ack.html')
......
...@@ -27,11 +27,6 @@ COMMENT_CATEGORIES = ( ...@@ -27,11 +27,6 @@ COMMENT_CATEGORIES = (
('SUG', 'suggestion for further work'), ('SUG', 'suggestion for further work'),
) )
class CommentCategory(models.Model):
category = models.CharField(max_length=3, default='REM')
def __str__ (self):
return self.category
class Comment(models.Model): class Comment(models.Model):
...@@ -47,7 +42,7 @@ class Comment(models.Model): ...@@ -47,7 +42,7 @@ class Comment(models.Model):
submission = models.ForeignKey(Submission, blank=True, null=True) submission = models.ForeignKey(Submission, blank=True, null=True)
in_reply_to = models.ForeignKey('self', blank=True, null=True) in_reply_to = models.ForeignKey('self', blank=True, null=True)
author = models.ForeignKey(Contributor) author = models.ForeignKey(Contributor)
# categories = models.ManyToManyField(CommentCategory) # Categories:
is_rem = models.BooleanField(default=False, verbose_name='remark') is_rem = models.BooleanField(default=False, verbose_name='remark')
is_que = models.BooleanField(default=False, verbose_name='question') is_que = models.BooleanField(default=False, verbose_name='question')
is_ans = models.BooleanField(default=False, verbose_name='answer to question') is_ans = models.BooleanField(default=False, verbose_name='answer to question')
...@@ -82,6 +77,7 @@ class AuthorReply(models.Model): ...@@ -82,6 +77,7 @@ class AuthorReply(models.Model):
# -1: rejected (unclear) # -1: rejected (unclear)
# -2: rejected (incorrect) # -2: rejected (incorrect)
# -3: rejected (not useful) # -3: rejected (not useful)
# -4: not from author
status = models.SmallIntegerField(default=0) status = models.SmallIntegerField(default=0)
commentary = models.ForeignKey(Commentary, blank=True, null=True) commentary = models.ForeignKey(Commentary, blank=True, null=True)
submission = models.ForeignKey(Submission, blank=True, null=True) submission = models.ForeignKey(Submission, blank=True, null=True)
......
...@@ -200,11 +200,17 @@ header h1 { ...@@ -200,11 +200,17 @@ header h1 {
} }
header a { header a {
text-decoration: none; text-decoration: none;
// border: 1px solid white;
} }
header a:hover { header a:hover {
color: #ffffff; color: #ffffff;
// text-decoration: underline; // text-decoration: underline;
} }
header img {
margin: 0px;
padding: 0px;
// border: 1px solid white;
}
nav { nav {
// background-color:#cccccc; // background-color:#cccccc;
......
{% load staticfiles %}
<header> <header>
<div class="row"> <div class="row">
<div class="col-3"> <div class="col-3">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment