コード例 #1
0
def update(request, topic_guid):
  fetcher = Fetch()
  topic_info = fetcher.get_topic(topic_guid)

  #merge the edited on with the fetched one
  topic_info['name'] =  request.POST['topic_title']
  topic = Topic(name=topic_info['name'], topic_group=topic_info['topic_group'], description=topic_info['description'],guid=topic_guid)
  topic.save()

  return HttpResponse(True)
コード例 #2
0
def update(request, topic_guid):
    fetcher = Fetch()
    topic_info = fetcher.get_topic(topic_guid)

    #merge the edited on with the fetched one
    topic_info['name'] = request.POST['topic_title']
    topic = Topic(name=topic_info['name'],
                  topic_group=topic_info['topic_group'],
                  description=topic_info['description'],
                  guid=topic_guid)
    topic.save()

    return HttpResponse(True)
コード例 #3
0
ファイル: views.py プロジェクト: nafiboss/python_django_test
def save_edited_topic(request):
    topic =   Topic(group  = request.GET.get('title', ''),
                    guid = request.GET.get('guid', ''))
    topic.save()

    return HttpResponse('data saved')