Преглед изворни кода

[sdk] Couple fixes to the desktop app template

Add a 24x24 icon to the desktop app template.
Header/footer filtering in the desktop app example.
Rui Pereira пре 12 година
родитељ
комит
146516d

+ 1 - 1
desktop/core/src/desktop/app_template/src/app_name/settings.py

@@ -16,4 +16,4 @@
 DJANGO_APPS = [ "${app_name}" ]
 REQUIRES_HADOOP = False
 MENU_INDEX = 100
-ICON = "/${app_name}/static/art/${app_name}.png"
+ICON = "/${app_name}/static/art/icon_${app_name}_24.png"

BIN
desktop/core/src/desktop/app_template/src/app_name/static/art/icon_app_name_24.png


+ 2 - 2
desktop/core/src/desktop/app_template/src/app_name/templates/index.mako

@@ -16,7 +16,7 @@
 ${'<'}%!from desktop.views import commonheader, commonfooter %>
 ${'<'}%namespace name="shared" file="shared_components.mako" />
 
-${'$'}{commonheader("${" ".join(word.capitalize() for word in app_name.split("_"))}", "${app_name}", user, "100px")}
+${'$'}{commonheader("${" ".join(word.capitalize() for word in app_name.split("_"))}", "${app_name}", user, "100px") | n,unicode}
 ${'$'}{shared.menubar(section='mytab')}
 
 ${'#'}# Use double hashes for a mako template comment
@@ -27,4 +27,4 @@ ${'#'}# Main body
   ## Pass through literal $
   <p>It's now ${'$'}{date}.</p>
 </div>
-${'$'}{commonfooter(messages)}
+${'$'}{commonfooter(messages) | n,unicode}

+ 2 - 2
docs/sdk/sdk.md

@@ -270,7 +270,7 @@ to include a simple form:
     <%!from desktop.views import commonheader, commonfooter %>
     <%namespace name="shared" file="shared_components.mako" />
 
-    ${commonheader("Calculator", "calculator", user, "100px")}
+    ${commonheader("Calculator", "calculator", user, "100px") | n,unicode}
 
     ## Main body
 
@@ -288,7 +288,7 @@ to include a simple form:
         <input type="submit" value="Calculate">
       </form>
     </div>
-    ${commonfooter(messages)}
+    ${commonfooter(messages) | n,unicode}
 
 The template language here is <a href="http://www.makotemplates.org/docs/">Mako</a>,
 which is flexible and powerful.  If you use the "`.html`" extension, Hue