"""
Saves the posted string of tags
"""
- if request.method == "POST" and request.is_ajax():
+ if request.method == "POST" and request.is_ajax() and request.user.is_authenticated() and request.user.get_profile().can_edit_items():
note = Note.objects.get(pk=pk)
-
- # note.tags.set(*json.loads(request.body))
note.tags.set(request.body)
note_json = serializers.serialize('json', [note,])
url: edit_note_tags_url,
dataType: 'json',
data: $('#note_tags_input').val(),
- // data: JSON.stringify(['test','tags']),//$('#edit-course-form').children().serialize(),
type: 'POST',
success: function(data) {
$('#note_tags_form').slideUp();