Hi Craig. I am, unfortunately, on my way out the door to work. I can't
provide answers right now, but will do so today. However, some of the
questions I simply don't understand, so wanted to ask for clarification real
quick.

On Wed, Jun 22, 2011 at 8:27 AM, Craig <[email protected]> wrote:

> #1 You have a Parent and Child set of objects that are both database
> tables. Child has a parent ID and it is a non-nullable column.  It all
> works ok but nosetest fails because when you test Child, it cannot
> find the table for parent. If you don't set the parent id then
> sqlalchemy rightly complains that your child has parent id null. The
> only fix is a kludge by making parent id nullable.
>

It sounds like what you need to do here is to define your tests in such a
way that you have a parent object. I haven't looked at this in a while, but
you might get benefit from bootalchemy. A more detailed description of
what's going on (ideally, code that's failing) would help.


> #2 Is there a way of holding configuration items? I need to remember
> things like the title name which appears on the welcome screen but
> also locations of some files or directories. Basically, an ini file on
> database.
>

development.ini would be what you're looking for, I believe. the
pylons.config variable holds the values found in the [app:main] and
[default] sections. If that's not it, what do you need to (in more detail)?


> #3 I'm not sure what they are called here, but CakePHP calls them
> helpers. A good example is I want to write a selector for Parent once.
> So my templates just say "make this parent here" and the html is
> rendered with the values pulled out of the database.
>

I haven't dealt with the helpers (or even CakePHP, honestly). Can you point
me to a simple tutorial on helpers, and I'll try to show you an equivalent?


> #4 I just cannot for the life of me work out how to deploy what I've
> written. I can easily use paster serve and that feature is great, but
> what is the method for making up a nice tarball or equivalent so
> someone else use it? Other programs in perl and PHP I just rsync them
> to a specific web directory.
>

That one is definitely a long question. In the book that's coming up,
there's at least a couple of chapters devoted to how to distribute/deploy an
application. I'll discuss more later today, but the short answer is this:
You will create either a source distribution or a binary egg (I usually
prefer the source distribution). From there, you may (not required) upload
it to http://pypi.python.org/ . You can build your own eggbasket for people
to install from. You can deploy using mod_wsgi, or nginx, or Paster.

In other words, you have a lot of options. I'll cover them (at a somewhat
basic level) today, and we'll be putting together proper deployment docs
later. We do have some deployment docs right now, but they are out of date,
and cause frustration for people normally. It's best to ask about them on
the list, and we'll help you through it.


-- 
Michael J. Pedersen
My IM IDs: Jabber/[email protected], AIM/pedermj022171
          Yahoo/pedermj2002, MSN/[email protected]
My LinkedIn Profile: http://www.linkedin.com/in/michaeljpedersen
Twitter: pedersentg

-- 
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.

Reply via email to