diff --git a/courses/migrations/0004_auto_20161011_1951.py b/courses/migrations/0004_auto_20161011_1951.py new file mode 100644 index 0000000..567bfa3 --- /dev/null +++ b/courses/migrations/0004_auto_20161011_1951.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10 on 2016-10-11 22:51 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('courses', '0003_auto_20161007_1612'), + ] + + operations = [ + migrations.AlterField( + model_name='course', + name='category', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='course_category', to='courses.CourseCategory', verbose_name='Category'), + ), + ] diff --git a/forum/static/js/forum.js b/forum/static/js/forum.js index a9d394d..4eda997 100644 --- a/forum/static/js/forum.js +++ b/forum/static/js/forum.js @@ -68,7 +68,6 @@ function createForum(url, topic) { url: frm.attr('action'), data: frm.serialize(), success: function (data) { - console.log(data); data = data.split('-'); $('.foruns_list').append(""+data[2]+"
"); @@ -159,7 +158,7 @@ function delete_forum(url, forum, message, return_url) { * Function to load form to edit post * */ -function edit_post(url, post_id) { +function edit_post(url, post_id, success_message) { $.ajax({ url: url, success: function(data) { @@ -173,6 +172,8 @@ function edit_post(url, post_id) { url: frm.attr('action'), data: frm.serialize(), success: function (data) { + alertify.success(success_message); + $("#post_"+post_id).parent().after(data); frm.parent().parent().remove(); }, diff --git a/forum/templates/post/post_list.html b/forum/templates/post/post_list.html index 5d3073a..ad13ac8 100644 --- a/forum/templates/post/post_list.html +++ b/forum/templates/post/post_list.html @@ -17,7 +17,7 @@ more_horiz diff --git a/forum/templates/post/post_render.html b/forum/templates/post/post_render.html index 1dfb195..e05b444 100644 --- a/forum/templates/post/post_render.html +++ b/forum/templates/post/post_render.html @@ -1,4 +1,4 @@ -{% load i18n permission_tags %} +{% load i18n permission_tags list_post_answer %}
@@ -15,7 +15,7 @@ more_horiz
@@ -34,5 +34,8 @@

{{ post.message|linebreaks }}

+
+ {% list_post_answer request post %} +
\ No newline at end of file -- libgit2 0.21.2