# HG changeset patch # User cavaliet # Date 1405682993 -7200 # Node ID 8234cb238783cb935c2012a18e4673af52206b1b # Parent 0a742e5a25aa9b32b82e610c9b319f2efeb8b194 renkan view first step diff -r 0a742e5a25aa -r 8234cb238783 src/hdalab/templates/profile_home.html --- a/src/hdalab/templates/profile_home.html Fri Jul 18 12:57:31 2014 +0200 +++ b/src/hdalab/templates/profile_home.html Fri Jul 18 13:29:53 2014 +0200 @@ -29,7 +29,7 @@ {% thumbnail r.image 100x100 as thumb %} - + diff -r 0a742e5a25aa -r 8234cb238783 src/hdalab/templates/renkan_edit.html --- a/src/hdalab/templates/renkan_edit.html Fri Jul 18 12:57:31 2014 +0200 +++ b/src/hdalab/templates/renkan_edit.html Fri Jul 18 13:29:53 2014 +0200 @@ -33,7 +33,7 @@ diff -r 0a742e5a25aa -r 8234cb238783 src/hdalab/templates/renkan_view.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hdalab/templates/renkan_view.html Fri Jul 18 13:29:53 2014 +0200 @@ -0,0 +1,63 @@ +{% extends "base.html" %} +{% load static %} + +{% block title %}{{block.super}} > {{datasheet.title}}{% endblock %} + +{% block css_import %} +{{block.super}} + + + +{% endblock %} + +{% block js_import %} +{{block.super}} + + + + + + + + + +{% endblock %} + +{% block main_content %} +
+
+
+
+
+{% endblock %} \ No newline at end of file diff -r 0a742e5a25aa -r 8234cb238783 src/hdalab/urls.py --- a/src/hdalab/urls.py Fri Jul 18 12:57:31 2014 +0200 +++ b/src/hdalab/urls.py Fri Jul 18 13:29:53 2014 +0200 @@ -33,6 +33,7 @@ url(r'^renkan/edit/$', RenkanEdit.as_view(), name='renkan_edit'), url(r'^renkan/getput/$', RenkanGetPut.as_view(), name='renkan_get_put'), + url(r'^renkan/view/$', TemplateView.as_view(template_name="renkan_view.html"), name='renkan_view'), url(r'^renkan/copy/(?P.*)$', RenkanCopy.as_view(), name='renkan_copy'), url(r'^renkan/delete/(?P.*)$', RenkanDelete.as_view(), name='renkan_delete'), url(r'^profile/$', ProfileHome.as_view(), name='profile_home'), diff -r 0a742e5a25aa -r 8234cb238783 src/hdalab/views/renkan.py --- a/src/hdalab/views/renkan.py Fri Jul 18 12:57:31 2014 +0200 +++ b/src/hdalab/views/renkan.py Fri Jul 18 13:29:53 2014 +0200 @@ -177,6 +177,9 @@ if rk.owner!=request.user: return HttpResponseBadRequest("You are not allowed to edit this renkan") rk.content = request.body + data = json.loads(request.body) + if "title" in data: + rk.title = data["title"] rk.save() return HttpResponse("OK")