def detail(request, topic_guid): fetcher = Fetch() topic = fetcher.get_topic(topic_guid) images = fetcher.get_images(topic_guid) related_topics = fetcher.get_related_topic(topic_guid) context_instance=RequestContext(request) return render_to_response('newscred/detail.html', {'topic': topic, 'images': images, 'related_topics': related_topics}, context_instance)
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)
def detail(request, topic_guid): fetcher = Fetch() topic = fetcher.get_topic(topic_guid) images = fetcher.get_images(topic_guid) related_topics = fetcher.get_related_topic(topic_guid) context_instance = RequestContext(request) return render_to_response('newscred/detail.html', { 'topic': topic, 'images': images, 'related_topics': related_topics }, context_instance)
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)