private/* would be a good place to store it.
Richard
On Wed, Aug 31, 2016 at 3:15 PM, Niphlod wrote:
> same deal, "different" organization.
> With an external script you can't call that function if not from an
> external process.
> Having it in a separated controller incurs in None performance-
same deal, "different" organization.
With an external script you can't call that function if not from an
external process.
Having it in a separated controller incurs in None performance-penalties
(having it in a standard controller has None to a handful of ms penalty
when that controller is hi
On Wednesday, August 31, 2016 at 5:33:15 AM UTC-7, Manuele wrote:
>
> Il 30/08/16 21:40, Niphlod ha scritto:
> > +1 for Dave .
> >
> > with isempty() in a model you're executing a query for each and every
> > request for absolutely NO REASON.
>
> I usually create a script directory and put t
Il 30/08/16 21:40, Niphlod ha scritto:
> +1 for Dave .
>
> with isempty() in a model you're executing a query for each and every
> request for absolutely NO REASON.
I usually create a script directory and put there scripts with commands
to be performed only once, such in the case of pre-populating
On Tuesday, August 30, 2016 at 2:48:01 PM UTC-7, Niphlod wrote:
>
> fabfile ATM is a show-off, and we can't put in there code related to an
> app which doesn't exist :P
>
It should be possible to put a comment block in the fabfile that shows what
might be done, but it would still require knowi
fabfile ATM is a show-off, and we can't put in there code related to an app
which doesn't exist :P
We can't pin each and every thread a "useful" information is written, as I
really don't see how 40 pinned threads will contribute to web2py's
knowledge for - and especially - newbies.
IMHO at mos
To be added to the fabfile.py of web2py maybe?!
On Tue, Aug 30, 2016 at 3:53 PM, Richard Vézina wrote:
> Don't have privileges, but this is a good thread and should be marked as
> informative somehow...
>
> Richard
>
> On Tue, Aug 30, 2016 at 2:24 PM, Dave S wrote:
>
>>
>>
>> On Tuesday, August
Don't have privileges, but this is a good thread and should be marked as
informative somehow...
Richard
On Tue, Aug 30, 2016 at 2:24 PM, Dave S wrote:
>
>
> On Tuesday, August 30, 2016 at 6:58:43 AM UTC-7, Richard wrote:
>>
>> Seems alright do you have issue with this? I would put a blank line
+1 for Dave .
with isempty() in a model you're executing a query for each and every
request for absolutely NO REASON.
This are activities that needs to be carried on on a post-deployment
fire-only-when-needed scenario, and outside the web environment.
On Tuesday, August 30, 2016 at 8:24:53 PM
On Tuesday, August 30, 2016 at 6:58:43 AM UTC-7, Richard wrote:
>
> Seems alright do you have issue with this? I would put a blank line
> between model definition and the "if isempty()".
>
> I production, once the system get initialize you should remove those
> populating fixture to save execut
Seems alright do you have issue with this? I would put a blank line between
model definition and the "if isempty()".
I production, once the system get initialize you should remove those
populating fixture to save execution time as the get execute at each
request.
What could wizely do is put all t
You can use a .CSV file. What i have used to do is:
1.- Define the tables that are being pre-populate.
2.- Insert all the data with appadmin.
3.- Using the appadmin export the data to a .CSV (db_colors.csv) file
and put it in the private folder of your app.
4.- Do the same thing you are doing exce
At the moment to pre-populate a database, I place this in the db.py model
file:
db.define_table('color',
Field('name','string'),
Field('code','string'),
format='%(name)s')
if db(db.color).isempty():
# create instance of table
for k,v in
dict(lime="#00FF00",red="#FF",black
13 matches
Mail list logo