def get_layout_editable(request, layout_id): """ Returns html for the layout editable page """ if request.method != 'GET': return res.get_template_data(request, 'presenter/not_found.html', {}) layout = BluesteelLayoutEntry.objects.filter(id=layout_id).first() data = {} data['layout'] = layout.as_object() data['layout'] = ViewPrepareObjects.prepare_layout_for_html(data['layout']) data['menu'] = ViewPrepareObjects.prepare_menu_for_html([]) for project in data['layout']['projects']: project = ViewPrepareObjects.prepare_project_for_html(project) return res.get_template_data(request, 'presenter/layout_edit.html', data)
def get_project_editable(request, project_id): """ Returns html for the project editable page """ if request.method != 'GET': return res.get_template_data(request, 'presenter/not_found.html', {}) project = BluesteelProjectEntry.objects.filter(id=project_id).first() if project is None: return res.get_template_data(request, 'presenter/not_found.html', {}) data = {} data['project'] = project.as_object() data['project'] = ViewPrepareObjects.prepare_project_for_html( data['project']) data['menu'] = ViewPrepareObjects.prepare_menu_for_html([]) return res.get_template_data(request, 'presenter/project_edit.html', data)