What if the db definitions of "news" requires the db definitions in
"polls" (such as a news post including a poll, the FK references would
not be there ?)

In this case, would you always use "reference <tablename>" instead of
"db.<tablename>" for FK relationships?

-Thadeus





On Mon, Mar 1, 2010 at 1:54 PM, Christopher Steel <chris.st...@gmail.com> wrote:
> Hi Guido,
>
> I use a method some where between yours and Thadeus's solution. The
> thing I find interesting about having some settings in their own files
> is that is allows you to isolate "features" and to have different
> developers work on different features without stomping on one
> another's work all the time. This makes troubleshooting, rewrites,
> integration / merging much smoother as well. When a feature is "ready"
> you can drop it in. This has some pretty interesting potential for
> automated installations as well...
>
> So if I was working on a "News" section for a site I might have the
> following files to work on while whomever is doing the "Polls" section
> of the site would have a similar set of files to work on but referring
> to polls rather than news.
>
> models/a_init_news.py
> models/news.py
> models/z_process_news.py
>
> controllers/news.py
>
> views/news/index.html
> views/news/add.html
> ...
>
> static/news.css                   # not really required
>
> Works for us.
>
> Cheers,
>
> Chris
>
>
>
> On Feb 28, 9:56 am, Thadeus Burgess <thade...@thadeusb.com> wrote:
>> I do
>>
>> A_settings.py # global settings and flags
>> B_w2p.py # web2py related things, auth/crud/service declarations
>> C_modelA.py
>> D_modelB.py #relies on model a so it executes after
>>
>> -Thadeus
>>
>> On Sun, Feb 28, 2010 at 5:19 AM, Guido Kollerie <gu...@kollerie.com> wrote:
>> > I'd like to have one file with configurable settings instead of having
>> > these settings spread out over mulitple models and controllers. What's
>> > the best practise for this?
>>
>> > My solution is to create a '_settings.py' model. I prepended it with an
>> > underscore to ensure it is the first excuted model file. This way the
>> > settings in it can be used by other model files, most notable db.py.
>> > This works under OS X, though I am not sure if this is a cross platform
>> > safe way to ensure _settings.py is actually loaded first.
>>
>> > Reason for not simply including all settings in db.py is that I do
>> > want to check in db.py in my DVCS, but not the settings such as DB
>> > password, password of the SMTP user, and other potentially sensitive
>> > information.
>>
>> > Thoughts?
>>
>> > --
>> > Guido Kollerie
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups
>> > "web2py-users" group.
>> > To post to this group, send email to web...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > web2py+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> >http://groups.google.com/group/web2py?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to