I can live without django, I guess. Like I said, as far as
appengine/python goes, I'm a noob; any framework I'll choose will require
some learning effort :).
I did update both tipfy and appengine sdk. Sadly, the update broke a lot
of things; I solved a lot of them today (found a good migration guide here
http://tipfy.googlecode.com/hg/docs/source/guide/migrating.rst) but I'm
currently stuck with something I can't fix...
I worked on the multi auth example
(http://code.google.com/p/tipfy/source/browse/examples/?r=7ef044524a3087ffcdc865b30e0c87478877db4a#examples%2Fauth),
and there is a _form_macros.html that is giving me the blues :). I get
File "/home/li/dev/myapp/app/templates/_form_macros.html", line 4, in
template
<abbr title="{{ _('This field is required.') }}">*</abbr>
UndefinedError: '_' is undefined
I did some google-ing but no luck so far.
So I can't tell if the corrections you suggested work although I'm looking
forward to test them. I'll try to fix the macro issue and get back to you.
Thanks again for your help,
Li
--
Using Opera's revolutionary email client: http://www.opera.com/mail/ on
Fedora 15
your code works ( thanks :) ), but I'm a little confused. Translation is
applied both in the template and the program code? I'm not going to
implement translation probably, but I'd just like to know. And these
extensions, like jinja2, can be used only with tipfy or they are
independent modules that can be used in any project through an interface
of some kind?
Meanwhile, I'm still fixing errors after the upgrade...
Hi Li,
Response inline...
Hi Kyle,your code works ( thanks :) ), but I'm a little confused. Translation is
applied both in the template and the program code? I'm not going to
implement translation probably, but I'd just like to know.
And these
extensions, like jinja2, can be used only with tipfy or they are
independent modules that can be used in any project through an interface
of some kind?
Meanwhile, I'm still fixing errors after the upgrade...
Good luck, if you get stuck on anything, be sure to post it, if I can help you out I will.
Kyle
I downloaded a fresh copy of the auth example because every error I
managed to fix was followed by another. So, in this clean project I added
the file mymodels.py
### mymodels.py ###
from tipfy.appengine.auth.model import User
#from tipfy.ext.auth.model import User
from google.appengine.ext import db
class MyUser(User):
bipme = db.IntegerProperty(default=2)
####
Note that I replaced tipfy.ext.auth.model with the line recommended in the
migration instructions
(http://tipfy.googlecode.com/hg/docs/source/guide/migrating.rst)
Now, I thought the RegisterHandler should use the new model - MyUser - but
I have no idea how:
### handlers.py ###
...
class RegisterHandler(BaseHandler):
...
user = self.auth.create_user(username, auth_id, password=password) #
here, somehow, should MyUser be inserted, right??
###
And I'm guessing (from previous experience with other programming
languages) that everywhere else self.auth.user should be replaced somehow
by a reference to MyUser..., or self.auth.user should be pointing already
to a MyUser object?!
This is so confusing and hard to untangle without a proper documentation.
I sure did choose a good moment to learn this stuff, didn't I? :)
What can I say? You've been a real friend on this thread, thanks a bunch!
I see there is a lot of bubbling around moving tipfy forward. I'm very new
here, but I have already grew fond of it. So, I was thinking, if not too
bold, to contribute with a documentation page summing up your suggestions
about extending the user model. Many of the users complain about the
documentation in general and I myself haven't found answers for many of my
questions. There are few applications I wrote (not with tipfy :) ) where a
bare user model would have sufficed, so I believe, this being a frequent
operation, explaining it would help many newcomers to tipfy like me.
Thanks again for all your help, I really appreciate it.
Li,
I'm glad that you've gotten everything working.
Your right about custom users that would be a helpful wiki page.
- Kyle