# -*- coding: utf-8 -*-
__author__ = 'Joeeee'

import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "final.settings")

import django
django.setup()

from blog.models import Comment


# basic operation
def publish_comment(**comment):
    result = Comment.object.create(**comment)
    return result


def delete_comment(comment_id):
    Comment.object.get(id=comment_id).delete()


def get_comment_by_id(comment_id):
    result = Comment.object.get(id=comment_id)
    return result


def update_comment(**comment):
    Comment.objects.filter(id=comment['id']).update(**comment)
5035b298c05abcffa614a07e43f24a056bf0e3d5
<mask token>


def publish_comment(**comment):
    result = Comment.object.create(**comment)
    return result


<mask token>


def get_comment_by_id(comment_id):
    result = Comment.object.get(id=comment_id)
    return result


def update_comment(**comment):
    Comment.objects.filter(id=comment['id']).update(**comment)

<mask token>
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'final.settings')
<mask token>
django.setup()
<mask token>


def publish_comment(**comment):
    result = Comment.object.create(**comment)
    return result


def delete_comment(comment_id):
    Comment.object.get(id=comment_id).delete()


def get_comment_by_id(comment_id):
    result = Comment.object.get(id=comment_id)
    return result


def update_comment(**comment):
    Comment.objects.filter(id=comment['id']).update(**comment)

__author__ = 'Joeeee'
<mask token>
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'final.settings')
<mask token>
django.setup()
<mask token>


def publish_comment(**comment):
    result = Comment.object.create(**comment)
    return result


def delete_comment(comment_id):
    Comment.object.get(id=comment_id).delete()


def get_comment_by_id(comment_id):
    result = Comment.object.get(id=comment_id)
    return result


def update_comment(**comment):
    Comment.objects.filter(id=comment['id']).update(**comment)

__author__ = 'Joeeee'
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'final.settings')
import django
django.setup()
from blog.models import Comment


def publish_comment(**comment):
    result = Comment.object.create(**comment)
    return result


def delete_comment(comment_id):
    Comment.object.get(id=comment_id).delete()


def get_comment_by_id(comment_id):
    result = Comment.object.get(id=comment_id)
    return result


def update_comment(**comment):
    Comment.objects.filter(id=comment['id']).update(**comment)

# -*- coding: utf-8 -*-
__author__ = 'Joeeee'

import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "final.settings")

import django
django.setup()

from blog.models import Comment


# basic operation
def publish_comment(**comment):
    result = Comment.object.create(**comment)
    return result


def delete_comment(comment_id):
    Comment.object.get(id=comment_id).delete()


def get_comment_by_id(comment_id):
    result = Comment.object.get(id=comment_id)
    return result


def update_comment(**comment):
    Comment.objects.filter(id=comment['id']).update(**comment)