コード例 #1
0
ファイル: views.py プロジェクト: lqchn/lqchn
def createNewJournal(request):
	title = request.POST['j_t']
	content = request.POST['j_c']
	a_id = request.POST['a_id']
	author = request.POST['author']
	editor = request.POST['editor']

	ac = Activity.objects.get(id=a_id)

	detail = detailContent()
	detail.DC_title = title
	detail.DC_html = content
	detail.DC_author = author
	detail.DC_editor = editor
	detail.save()

	#record
	record = recordInfo()
	record.save()

	new_journal = Journal()
	new_journal.detail = detail
	new_journal.school = ac.school
	new_journal.record = record
	new_journal.save()

	ac.journal = new_journal
	ac.save()

	createGlobalNews(a_id,new_journal.id,'4')

	return HttpResponse('1')