I have started storing most of those settings in the database,
everything except the DAL connection string goes into a table called
"settings". I cache the select of the whole settings table
indefinitely unless a value changes. This allows me to version control
my application on google code (excluding the 0_config.py which only
contains the dal connection string) file without worries.

Nice find... Whoosh looks sweet!

-Thadeus





On Sun, Mar 28, 2010 at 12:53 PM, Yarko Tymciurak
<resultsinsoftw...@gmail.com> wrote:
> On Mar 28, 1:27 pm, "mr.freeze" <nat...@freezable.com> wrote:
>> C: Good idea, done.
>> Q: Yes. I'll try to figure out a slick way to make the active source
>> available at google code without exposing sensitive data.
>> General Q: Haven't tried it but this looks 
>> promising:http://bitbucket.org/mchaput/whoosh/wiki/Home
>
> :-)
>
> You're awesome, Nathan!
> I'll check out that link.
>
> Re: figure out:   In PyCOn registration, we put private data in models/
> 0_private.py --- and I pushed a "template" version of this, where the
> settings would fail, i.e.:
>
> DAL_URI='put your db connection string here'
>
> I've just modified how I do that, to be more explicit for ordering of
> config - I no longer use "0.py" --- but rather a scheme like this:
>
> 0development_config.py
>
> --- for testing, local use;   basically, I (myself) set ONE variable
> here:   DEV_TEST  (for development and test);  if this file doesn't
> exist (it doesn't for deployment), my next file tests for the var, and
> sets it to FALSE if it doesn't exist.   Then, things like CAPTCHA and
> email for registration verification can use alternate logic based on
> setting of DEV_TEST  (this also makes for pretty readable code).
>
> 1private_config.py
>
> That's all the stuff that I would not want to divulge.  Much like
> routes_example.py,   I have a '1example_private_config.py'  with all
> the strings that will fail if you don't set them for your site - it's
> a little bit of a trick to put "example" first in the name (e before
> p), but then you can copy this to 1private_config.py (and leave the
> example file), and configure your heart away - it will work (because
> of loading order); you will figure out to not use the example file in
> your deployment.
>
> The only thing I haven't figured out a nicer way of doing (and it
> needs to be in private_config) is this at the top of the private file
>
> try: DEV_TEST
> except: DEV_TEST=False
>
> It seems to be the only reliable way to do this (oh well - good
> enough, with caching).
>
> Then - what used to be 0.py (the config stuff, and app defs to run
> first - this is what Massimo likes to call it), I have named as:
>
> 2config.py
>
> for no other reason than to control the ordering of this stuff.
>
> Hope that is helpful.
>
> Regards,
> - Yarko
>
>>
>> On Mar 28, 1:06 pm, Yarko Tymciurak <resultsinsoftw...@gmail.com>
>> wrote:
>>
>> > Nice...   I did a test search on the recent question on
>> > "reset_password_key" --- I think this is going to be useful!
>>
>> > 2 q / 1 c:
>>
>> > C:
>> > Maybe updating button texts would be nice (e.g.:  search web2py
>> > slices;    search web2py sites)
>>
>> > Q:
>> > Are you going to update your slices source w2p at some point?
>>
>> > General Q:
>> > Anyone have suggestions for intranet / private search engines of this
>> > sort (i.e. locally hosted)?
>>
>> > Regards,
>> > - Yarko
>>
>> > On Mar 27, 8:53 pm, "mr.freeze" <nat...@freezable.com> wrote:
>>
>> > > Also, if there are other sites that might be helpful to search, let me
>> > > know. Feel free to visit any sponsored links too :)
>>
>> > > On Mar 27, 7:29 pm, "mr.freeze" <nat...@freezable.com> wrote:
>>
>> > > > In an effort to alleviate my own search frustrations, I have added a
>> > > > google powered search to web2pyslices.com that searches these sites:
>>
>> > > > web2pyslices.com
>> > > > web2py.com (including the wiki)
>> > > > groups.google.com/group/web2py
>>
>> > > > Hopefully it will help people find answers quickly.
>>
>> > > > -Nathan
>
> --
> 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