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
def save_edited_topic(request):
    topic =   Topic(group  = request.GET.get('title', ''),
                    guid = request.GET.get('guid', ''))
    topic.save()

    return HttpResponse('data saved')