forked from johnwlockwood/tipfy-admin
-
Notifications
You must be signed in to change notification settings - Fork 1
frankk00/tipfy-admin
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This app works with Tipfy 1.01b 1a. copy tipadmin to the 'app' directory 1b. add this to your apps_installed in your tipfy project config.py you may also add sys_apps to the config with the value ['tipfy.ext.auth'] this will add admin for tipfy User 1c. to the project's main urls.py add the get_rules function defined below 1d. to the project's main.py add "import urls; urls.get_rules(app)" in the position shown below 2. run your app 3. specify admin only access in app.yaml. add to the handlers: - url: /tipadmin/.* script: main.py login: admin 4. run the dev_appserver and go to /tipadmin/ (http://localhost:8000/tipadmin/) this will create an admin for any classes inherited from db.Model inside models.py of apps in your apps_installed here is an example config.py: config = {} # Configurations for the 'tipfy' module. config['tipfy'] = { 'apps_installed': [ 'tipadmin', 'mysuperapp', ], 'sys_apps':[ 'tipfy.appengine.auth', ] } in your project's urls.py: # -*- coding: utf-8 -*- """URL definitions.""" from tipfy.routing import Rule, import_string rules = [ ] def get_rules(app): for app_module in app.config['tipfy']['apps_installed']: try: # Load the urls module from the app and extend our rules. app_rules = import_string('%s.urls' % app_module) for rule in app_rules.rules: app.router.add(rule) except ImportError,e: pass in your projects's main.py: app = App(rules=urls.rules, config=config, debug=debug) +import urls; urls.get_rules(app) enable_appstats(app) enable_jinja2_debugging() The entity list fetches batches of 20, and will show a 'Fetch More' link to page to the next set of entities, using datastore cursors. You can specify an order for the entity list by adding the query string argument 'ob' to the url. example: https://yourapp.appspot.com/tipadmin/mysuperapp/Item/?ob=-created where created is an indexed property of the Item model. You must load the ordered url before you click the Fetch More link, because the cursor is only valid for the same query.
About
tipfy app that dynamically creates an admin for google appengine models
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published