Installation problem

1 view
Skip to first unread message

andrew

unread,
Oct 16, 2009, 11:37:53 AM10/16/09
to Appengine Admin Users
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

Valts Mazurs

unread,
Oct 18, 2009, 1:03:35 PM10/18/09
to appengine-...@googlegroups.com
Hi, Andrew,

Some of the lines that you pasted seem to be wrapped (e.g., - url: /appengine_admin_media should be in single line in your app.yaml). Can you paste the code in dpaste.org or attach it to your e-mail in order to be sure that we are looking at the same code?

--
Valts

niklasr

unread,
Oct 18, 2009, 4:18:49 PM10/18/09
to Appengine Admin Users
It works perfectly with thousands of entities from here, code
disponible montao.googlecode.com where you may look at rather large
project using appengine admin, also with outbound links from there to
apps. Another great project is approcket to combine so that you'll
have both admin and backup systems.
best wishes
Nick
Reply all
Reply to author
Forward
0 new messages