Mostly
Classes CamelCase, modules lowercase, functions, methods and lowercase
- is pretty much the norm
but not always ;-)
T
On May 21, 9:47 am, Neal nwalt...@sprynet.com wrote:
Thank to all for explaining this mysterious message and showing me the
correction.
It now works great! Another
HI
If you are interested here is the python style guide
http://www.python.org/dev/peps/pep-0008/
T
On May 21, 9:47 am, Neal nwalt...@sprynet.com wrote:
Thank to all for explaining this mysterious message and showing me the
correction.
It now works great! Another post gave me the clue on
Hi Neal,
djidjadji's response correctly demonstrates what the problem is: The
second argument to template.render should be a dictionary, not an
individual object. The error you're seeing is because Django is trying
to treat your TaskLog object as a dictionary. Change:
Hi Neal
I do use templates but zpt based ones, I am not using any bits of
django
there are quite a few other python lightweight frameworks running on
gae
now.
For alternatives have a look at things like pylons or repoze, however
you will
possibly be a bot more on your own as django is a bit of
Thank to all for explaining this mysterious message and showing me the
correction.
It now works great! Another post gave me the clue on how to get the
count working.
def get(self):
query = TaskLog.gql(WHERE resultFlag 0); # get all rows
LIMIT = 1000
TaskLogs =
Here is the entire template:
{%block body%}
h2List TaskLogs/h2
!-- List of TaskLogs --
ul
table border=1
tr
thCustomerBRDomain/th
thWorker Email/th
thTaskCode/th
thStartedTime/th
thCompletedTime/th
thResultFlag/th
thIssue/th
/tr
{%for TaskLog in TaskLogs%}
tr
Sorry, I think I posted the wrong template, this is the one causing
the error:
{%block body%}
h2List TaskLogs/h2
!-- List of TaskLogs --
ul
table border=1
tr
thCustomerBRDomain/th
thWorker Email/th
thTaskCode/th
thStartedTime/th
thCompletedTime/th
thResultFlag/th
thIssue/th
/tr
Hi
Here's my guess as to what is going on
Somewhere in django has_key(key) is being called which is
traditionally a method
of a dictionary that can check if a key is in the dictionary. Modern
python code should really use key in somedict
However app engine datastore class instances have a
So basically, are you saying I have to change the Django code to get
this work?
If that's the case, surely everyone would be having the exact same
problem???
How do I find out if I'm up to date or not? I just installed GAE
about a month ago.
I'm using the django template lib that comes with GAE.
def get(self):
query = db.GqlQuery(Select * from TaskLog)
TaskLogs= query.get();
self.renderPage('templates/list.html', TaskLogs)
Template
{%for TaskLog in TaskLogs%}
--
There are two things wrong with this python code
The
Tim,
So you don't use templates at all? Or some other package?
I loved what I saw of Django, but then tried to build a vanilla
app on GAE. But all the books I had, when talking about templates,
used the Django template parser.
Thanks,
Neal
On May 19, 8:00 pm, Tim Hoffman
Here's more info. I'm running on my machine using the SDK.
Traceback (most recent call last):
File C:\Program Files\Google\google_appengine\google\appengine\ext
\webapp\__init__.py, line 498, in __call__
handler.get(*groups)
File c:\Program Files\Google\google_appengine\demos
What is the content of the template?
There is a for loop executed and there it goes wrong.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Google App Engine group.
To post to this group, send email to
13 matches
Mail list logo