Commit 026773b5 by Arthur Barrett

fix pep8 warnings and add empty message to notes tab

parent 996b3513
......@@ -16,11 +16,9 @@ def notes(request, course_id):
raise Http404
notes = Note.objects.filter(course_id=course_id, user=request.user).order_by('-created', 'uri')
json_notes = json.dumps([n.as_dict() for n in notes])
context = {
'course': course,
'notes': notes,
'json_notes': json_notes
'notes': notes
}
return render_to_response('notes.html', context)
<%namespace name='static' file='static_content.html'/>
<%inherit file="main.html" />
<%!
from django.core.urlresolvers import reverse
%>
<%block name="headextra">
<%static:css group='course'/>
......@@ -52,7 +55,7 @@
<section class="container">
<div class="notes-wrapper">
<h2>My Notes</h2>
<h1>My Notes</h1>
% for note in notes:
<div class="note">
<blockquote>${note.quote|h}</blockquote>
......@@ -67,6 +70,9 @@
</ul>
</div>
% endfor
% if notes is UNDEFINED or len(notes) == 0:
<p>You do not have any notes.</p>
% endif
</div>
</section>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment