[Checkins] SVN: grokapps/Flint/src/flint/ started admin UI module; further svn:ignores

Luciano Ramalho luciano at ramalho.org
Tue Jun 24 10:40:44 EDT 2008


Log message for revision 87711:
  started admin UI module; further svn:ignores
  

Changed:
  _U  grokapps/Flint/src/flint/
  A   grokapps/Flint/src/flint/admin.py
  U   grokapps/Flint/src/flint/app.py
  _U  grokapps/Flint/src/flint/app_tests/
  U   grokapps/Flint/src/flint/app_tests/essential_use_cases.txt

-=-

Property changes on: grokapps/Flint/src/flint
___________________________________________________________________
Name: svn:ignore
   - *.pyc

   + *.pyc
*.kpf



Added: grokapps/Flint/src/flint/admin.py
===================================================================
--- grokapps/Flint/src/flint/admin.py	                        (rev 0)
+++ grokapps/Flint/src/flint/admin.py	2008-06-24 14:40:43 UTC (rev 87711)
@@ -0,0 +1,10 @@
+import grok
+
+class FlintAdmin(grok.Container):
+    pass
+
+class Index(grok.View):
+    grok.context(FlintAdmin)
+
+    def render(self):
+        return 'Here is the ManageIndex'
\ No newline at end of file

Modified: grokapps/Flint/src/flint/app.py
===================================================================
--- grokapps/Flint/src/flint/app.py	2008-06-24 14:06:58 UTC (rev 87710)
+++ grokapps/Flint/src/flint/app.py	2008-06-24 14:40:43 UTC (rev 87711)
@@ -1,7 +1,15 @@
 import grok
+from flint.admin import FlintAdmin
 
+FLINT_ADMIN_NAME = 'flint'
+
 class Flint(grok.Application, grok.Container):
+
+    def __init__(self):
+        super(Flint, self).__init__()
+        self.flint = self[FLINT_ADMIN_NAME] = FlintAdmin()
+
+class Index(grok.View):
     pass
 
-class Index(grok.View):
-    pass # see app_templates/index.pt
\ No newline at end of file
+


Property changes on: grokapps/Flint/src/flint/app_tests
___________________________________________________________________
Name: svn:ignore
   + *.pyc


Modified: grokapps/Flint/src/flint/app_tests/essential_use_cases.txt
===================================================================
--- grokapps/Flint/src/flint/app_tests/essential_use_cases.txt	2008-06-24 14:06:58 UTC (rev 87710)
+++ grokapps/Flint/src/flint/app_tests/essential_use_cases.txt	2008-06-24 14:40:43 UTC (rev 87711)
@@ -9,17 +9,22 @@
 -------------------------------
 
 The site administrator creates an instance of Flint to be used for simple blogging.
+To avoid dependencies with the Grok admin UI, we'll do this through code.
 
-	>>>	
-	
+    >>> from flint.app import Flint
+    >>> root = getRootFolder()
+    >>> root['app'] = Flint()
+    >>> root.get('app').__class__.__name__
+    'Flint'
+
 After creating the instance, Administrator navigates to ++skin++manage to set up a user.
 The blog will have one writer, called "wilma".
 
-	>>>
-	
+    >>> 
+
 Then the Administrator goes to ++skin++publish to set up a single section, configured with a selection rule which picks up any story that is tagged as published.
 
-	>>>
+    >>>
 
 --------------------
 Writer creates story
@@ -27,21 +32,19 @@
 
 Writer navigates to ++skin++manage and is redirected to login screen.
 
-	>>> 1 + 1
-	2
-	
+    >>> 1 + 1
+    2
+
 After login, writer sees content management interface and clicks the "Add story" button.
 
-	>>> 1 + 2
-	3
-	
+    >>> 1 + 2
+    3
+
 Writer writes story, saves it and sees it in the listing of recent stories.
 
-	>>>
-	
+    >>>
+
 Writer tags the story as "published" and clicks the "View" button, which performs a search for stories matching the one just written. In this simple site, the story appears in only one page so the search results view redirects to it.
 
-	>>>
+    >>>
 
-
-



More information about the Checkins mailing list