개발중인 응용 프로그램에 대해 remote_api_shell.py와 유사한 기능을 사용할 가능성이 있습니까? remote_api_shell.py는 배포 된 응용 프로그램을 가리 키도록 요청하고 repl 콘솔을 제공합니다. remote_api_shell을 사용할 때 os.chdir을 개발 디렉토리에 사용하면 Google apis를 사용하여 모듈을 사용할 수 없으므로 다음과 같은 제한이 있습니다.appengine 콘솔을 개발 중 애플리케이션 용으로 사용 하시겠습니까?
개발중인 앱을 데이터 모델로 만들려고 할 때 로컬 콘솔이 필요하다는 느낌이 들었습니다. 요청 처리 레이어를 거치거나 응용 프로그램을 업로드하지 않고 끊임없이 모델을 변경/변경해야했습니다. 대화식 세션에서 Model의 다양한 기능을 시험해 보는 것이 좋습니다. con.appspot.com은 브라우저에 콘솔을 제공하므로 클래스를 작성하거나 작은 테스트 모듈을 가져 오는 데는 적합하지 않습니다.
계속하려면 _app을 입력해야하므로이 기능이 작동하지 않습니다.
import setapipaths # Sets the paths to google appengine apis
import sys
from google.appengine.ext import db
class TodoList(db.Model):
name = db.StringProperty(required=True)
class TodoItem(db.Model):
user = db.UserProperty(required=True)
date = db.DateTimeProperty(auto_now_add=True)
belongs_to = db.Reference(TodoList)
description = db.StringProperty(multiline=True)
rating = db.IntegerProperty(required=True)
score = db.IntegerProperty(required=True)
todolist = TodoList()
todolist.name = "firstline"
todolist.put()
obj1 = TodoItem(user='senthil',belongs_to=todolist.key(),description="something",rating=10,score=5)
obj1.put()