Am 27.06.2010 um 13:21 schrieb Andrea Crotti:
After trying to do everything by myself I finally decided to pass to
TurboGears.
I'm doing a quite easy application that must manipulate an address
book:
- take some initial data from an ldap tree
- store them in a database (sqlalchemy is perfect already)
- allows search/manipulation/exportation and so on and synchronize
only a few things on the original ldap tree
Now I've already ported many things to turbogears but I have some
doubts:
1. Form and validation
The declarative way used by sqlalchemy is nice but elixir is much
more expressive, could I use also that maybe?
Sure you can. Just set up you model file accordingly, there is no
quickstart-option though.
Another nice thing in elixir is that I can simply create parent/son
classes and the SQL is generated accordingly...
The same thing looks much more complex in DeclarativeStyle.
For example I have a class Entry, which has many OneToMany
relations with other things
class Entry(DeclarativeBase):
__tablename__ = 'entries'
id = Column(Integer, primary_key=True)
addresses = relation('Address', backref='user')
...
class Address(DeclarativeBase):
__tablename__ = 'addresses'
id = Column(Integer, primary_key=True)
post_code = Column(Unicode)
But for example all those "multiple fields" have something in
common, like the description or if they're default values or not.
What would the best approach here?
As I said, just use elixir.
2. Development & git
I normally use git+emacs to develop and it's really cool, but in
this framework world I don't understand if
- I should add everything to my repository
- I should just add files I'm modifying
Is there a smarter way (maybe with mercurial is also fine) to
manage software development using turbogears?
Anyone also using zc.buildout for deployment or just the setup.py
is fine?
mercurial or git makes no difference (in the project-management at
least).
The question/problem here is to provide a consistent runtime
environment. For this, you should consider to copy all eggs of your
virtualenv (zipping them if they happen to be unzipped) into a project-
relative subdirectory, and added to the VCS.
Then, on installation, through a special setup.cfg or via passed
arguments, instruct easy-install to only install packages from that
directory.
easy_install -H None -f <destdir> <Packagename>
Diez
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en.