Пример #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)