Hello,
Thank you for the admin utility.
I was trying to recreate the QuickStart example from
http://code.google.com/p/appengine-admin/wiki/QuickStart
on Fedora 11, but the browser refused to load the page with:
"Not found error: /admin did not match any patterns in application
configuration."
There must be something missing in the app.yaml. I wonder if you could
help me to resolve
this issue, or to direct to an example of a complete case with
app.yaml, *.py and *.html ?
The files I was using are:
----------------------
app.yaml:
application: test
version: 1
runtime: python
api_version: 1
handlers:
- url: /
script: main.py
- url: /
appengine_admin_media
static_dir: appengine_admin/
media
secure:
never
------------------------
main.py:
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
import appengine_admin
## Sample models ##
class Article(db.Model):
title = db.StringProperty("Title", required = True)
content = db.TextProperty("Content", required = True)
whencreated = db.DateTimeProperty("Created", auto_now_add =
True)
whenupdated = db.DateTimeProperty("Updated", auto_now =
True)
def __str__
(self):
return str(self.title)
class Comment(db.Model):
article = db.ReferenceProperty(Article, verbose_name = "Article")
author = db.StringProperty("Author", required = True)
content = db.TextProperty("Content", required = True)
whencreated = db.DateTimeProperty("Created", auto_now_add = True)
whenupdated = db.DateTimeProperty("Updated", auto_now = True)
## Admin views ##
class AdminArticle(appengine_admin.ModelAdmin):
model = Article
listFields = ('title', 'whencreated', 'whenupdated')
editFields = ('title', 'content')
readonlyFields = ('whencreated', 'whenupdated')
class AdminComment(appengine_admin.ModelAdmin):
model = Comment
listFields = ('article', 'author', 'whencreated', 'whenupdated')
editFields = ('article', 'author', 'content')
readonlyFields = ('whencreated', 'whenupdated')
# Register to admin site
appengine_admin.register(AdminArticle, AdminComment)
application = webapp.WSGIApplication([
# Admin pages
('/admin', appengine_admin.Admin)
])
def main():
run_wsgi_app(application)
if __name__ == "__main__":
main()
------------------------------
Thank you in advance,
Andrew