Re: [web2py] too many redirect during checking condition

2011-04-05 Thread Stifan Kristi
it clear for me right now, thank you so much On Wed, Apr 6, 2011 at 7:02 AM, Martín Mulone wrote: > @auth.requires_login() > def index(): >return dict(message=T('Hello World')) > > 2011/4/5 黄祥 > >> hi, >> >> i want to use condition that if user not log in will redirect to login >> page, and

Re: [web2py] change default controller into another controller

2011-04-08 Thread Stifan Kristi
it's clear for me now, thank you so much for your detail explaination.

Re: [web2py] is web2py support html 5 and css 3?

2011-04-08 Thread Stifan Kristi
a, i c, i mean is it support the python format for html 5 and css 3 tags, like : e.g. {{=BR()}} thank you On Fri, Apr 8, 2011 at 8:46 PM, Vasile Ermicioi wrote: > web2py is a server side framework, html5 and css3 are client side > technologies, and they should be supported by browsers not by s

Re: [web2py] is web2py support html 5 and css 3?

2011-04-08 Thread Stifan Kristi
, Jonathan Lundell wrote: > On Apr 8, 2011, at 7:02 AM, Stifan Kristi wrote: > > a, i c, i mean is it support the python format for html 5 and css 3 tags, > like : > e.g. > {{=BR()}} > > > web2py always generates for BR(), which is OK for html5 (though not > really

Re: [web2py] Re: is web2py support html 5 and css 3?

2011-04-08 Thread Stifan Kristi
> need as Jonathan suggests. > If we need to change the behavior of some tags, please let me know > with a concrete example. > > Massimo > > On Apr 8, 9:57 am, Jonathan Lundell wrote: > > On Apr 8, 2011, at 7:37 AM, Stifan Kristi wrote: > > > > > no, i m

Re: [web2py] Re: session.forget()

2011-04-09 Thread Stifan Kristi
i'm understand right now, thank you very much for your detail explaination. what is the different within session.forget(response) and session.forget()? 1 more things, it is best practice to save the session in database? like i read in http://web2py.com/book/default/chapter/11#Sessions-in-Database i

Re: [web2py] Re: how to define functions in modules and then import it

2011-04-09 Thread Stifan Kristi
thank you so much for your explaination, i've already read that url, honestly i'm the newbie in python and web2py, could you please give an example how to pass the global objects to the function as arguments? i've already test for the simple thing, it work, but for global objects i'm still confused

Re: [web2py] Re: how to define functions in modules and then import it

2011-04-09 Thread Stifan Kristi
i've tried to run what you suggested, but still have a problem: On Modules: #!/usr/bin/env python # coding: utf8 from gluon.html import * from gluon.http import * from gluon.validators import * from gluon.sqlhtml import * # request, response, session, cache, T, db(s) # must be passed and cannot be

Re: [web2py] Re: session.forget()

2011-04-09 Thread Stifan Kristi
thank you so much for your explaination. i'm quite understand right now. best regards, steve van christie On Sun, Apr 10, 2011 at 1:02 AM, Anthony wrote: > On Saturday, April 9, 2011 12:44:06 PM UTC-4, 黄祥 wrote: >> >> i'm understand right now, thank you very much for your detail >> explainatio

Re: [web2py] Re: how to define functions in modules and then import it

2011-04-09 Thread Stifan Kristi
actually my real intention is : i have the same function that repeated many times in 1 controller (repeated to different tables), so that i would to make it simple just put it on modules, what do you think about it? if i created the new function in 1 controller and then the other function access

Re: [web2py] Re: T usage

2011-04-09 Thread Stifan Kristi
Hi, is it possible to translate the output data table using T()? thank you so much On Sun, Apr 10, 2011 at 5:45 AM, niknok wrote: > Beautiful one liner. I have to write an ugly hack to make it work. I > was forcing the translations because I need to translate certain > sections only. > > def b

Re: [web2py] Re: how to define functions in modules and then import it

2011-04-09 Thread Stifan Kristi
hi, all, thank you so much for your detail explaination, i'm understand right now. i can simplified the other function (show and view) but for search result and feed, i can't pass it to another function. 1. why i can't pass row.title into variable? def blog_result(): pattern = '%' + request.vars

Re: [web2py] Re: how to define functions in modules and then import it

2011-04-09 Thread Stifan Kristi
thank you so much for your explaination. pardon, because i'm a newbie in python n web2py, i just learn, try to implement what have been written in the http://web2py.com/book/default/ the other controller that can't be passed is *blog_result* like on below : def bl

Re: [web2py] Re: how to define functions in modules and then import it

2011-04-09 Thread Stifan Kristi
pardon me, i just follow the example that was written on the book: http://web2py.com/book/default/chapter/03 and it works fine, but i want to make it simple, i mean create __view(parameters), __feed(parameters), __result(parameters), and then the other function call it and pass the arguments.

Re: [web2py] Re: bulk insert form

2011-04-12 Thread Stifan Kristi
a, i am understand right now, thank you so much for your explaination, greg. best regards, steve van christie

Re: [web2py] Re: Powerpack

2011-04-12 Thread Stifan Kristi
amazing, i'll try it...

Re: [web2py] Re: bulk insert form

2011-04-12 Thread Stifan Kristi
thank you so much villas for your share, i'll try to modify it for inserts. best regards, steve van christie On Wed, Apr 13, 2011 at 8:43 AM, villas wrote: > I use this code for updating multiple records, maybe you could use > something similar for inserts. > > controller -- > myreco

Re: [web2py] request.args error on module

2011-04-13 Thread Stifan Kristi
ons in the models folder. Much easier. > > I would highly recommend trying to keep things simple. -- * [image: 黄祥] スティファン クリスティ (黄祥) Stifan Kristi (Kou Shou) ジャカルタ、 インドネシア Jakarta, Indonesia 携帯。 +六二 八一八 七八三 一一八 Cell. +62 818 783 118 ウェブサイト : http://stevevanchristie.net Websi

Re: [web2py] request.args error on module

2011-04-13 Thread Stifan Kristi
a, i c, it's open my mind, thank you so much for your advised. i'll try to follow your advised. which is better to put the menu functionality that been used by many views (same code in many views, the link is related with database (request.args))? thank you so much in advance. best regards, stev

Re: [web2py] request.args error on module

2011-04-13 Thread Stifan Kristi
a, i c, got it, thank you so much for your advised. best regards, steve van christie

Re: [web2py] Re: Bookings Manager

2011-04-13 Thread Stifan Kristi
i'll test the pbreitenbach's code and it works fine, pardon, which browser that u used? best regards, steve van christie

Re: [web2py] Re: Bookings Manager

2011-04-13 Thread Stifan Kristi
hi ismail, i've tested it, your apps work fine on me, i think it's related with your browser. best regards, steve van christie

Re: [web2py] Re: Bookings Manager

2011-04-13 Thread Stifan Kristi
same for me, i run it on url: http://127.0.0.1:8000/booking/default/index best regards, steve van christie

Re: [web2py] Re: cache.ram didn't show data immediately

2011-04-13 Thread Stifan Kristi
yes, i've tried to implement the code from that url. here is my function : models/db_functions.py: def __index(table): if len(request.args): page = int(request.args[0]) else: page = 0 items_per_page = 20 limitby = (page * items_per_page, (page + 1) * items_per_page + 1) rows = db().select(tabl

Re: [web2py] Re: functions

2011-04-13 Thread Stifan Kristi
hi antony, thank you so much for your adviced, in my case (please see attached file), would you prefer to put it on models or modules? right now i put it on models, please give an advice or suggestion? thank you very much in advance. steve van christie On Thu, Apr 14, 2011 at 7:17 AM, Anthony

Re: [web2py] Re: cache.ram didn't show data immediately

2011-04-13 Thread Stifan Kristi
pardon me, for not explain it more clearly, when i put *cache = (cache.ram, 60)* the new data is not show immediately after i inserted it, after a few minutes, it will appears, but when i delete *cache = (cache.ram, 60)*, the new data is show immediately after i inserted it. is it the behaviour of

Re: [web2py] Re: functions

2011-04-13 Thread Stifan Kristi
ok, i'll follow your adviced to put it on models, it's clear for me as a newbie in python and web2py. pardon me, to asked many times about this matter. thanks and best regards, steve van christie

Re: [web2py] Re: cache.ram didn't show data immediately

2011-04-13 Thread Stifan Kristi
yes, after i inserted a new data, i immediately checked the new one, but it didn't appears, after i checked it many times, and after few minutes, the data is show up. i think for now, i'll try to not use *cache = (cache.ram, 60)*, because i'm still learning the python and web2py. thank you so much

Re: [web2py] Re: cache.ram didn't show data immediately

2011-04-13 Thread Stifan Kristi
regards, steve van christie On Thu, Apr 14, 2011 at 9:28 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > If you call it with expire_time=0 it will force a cache reset. > > On Apr 13, 7:49 pm, Stifan Kristi > wrote: > > yes, after i inserted a new data, i i

Re: [web2py] Re: cache.ram didn't show data immediately

2011-04-13 Thread Stifan Kristi
.ram,0)) > > the zero will reset the cache for this query. > > > > On Apr 13, 2011, at 9:43 PM, Stifan Kristi wrote: > > hi massimo, > > i'll try your adviced, pardon, how / where to put expire_time = 0? i've > already search it on the book : > http://

Re: [web2py] Re: cache.ram didn't show data immediately

2011-04-13 Thread Stifan Kristi
ring the 10 seconds could be 30 or 40 after each refresh. The > behavior is not deterministic, so it's difficult to debug. > > cache.disk doesn't seem to have this behavior. > > > > > > > On Apr 13, 7:49 pm, Stifan Kristi > wrote: > > yes, after

Re: [web2py] Re: cache.ram didn't show data immediately

2011-04-14 Thread Stifan Kristi
ok, thank you so much for your adviced, pbreitenbach. best regards, steve van christie On Thu, Apr 14, 2011 at 12:23 PM, pbreit wrote: > Neither. You probably won't need them. Focus on your app's functionality.

Re: [web2py] Re: web2py as the best choice for newstarters in web frameworks

2011-04-14 Thread Stifan Kristi
same for me, i love simplicity and dry, and choose to learn this web framework. On Thu, Apr 14, 2011 at 2:06 PM, luckysmack wrote: > yea same here. coming from php i find python and web2py awesome. im > trying to get my work to make the shift over to python. building a > base website for all our

Re: [web2py] Re: how to share my apps in web2py appliance

2011-04-14 Thread Stifan Kristi
hi massimo & pbreitenbach, thank you so much for your hints. i've already shared it, please give a feedback, suggestion or advice about it. thanks and best regards, steve van christie

Re: [web2py] Re: how to share my apps in web2py appliance

2011-04-14 Thread Stifan Kristi
done, please checked it out, and please give an advice or suggestion. thanks and best regards, steve van christie

Re: [web2py] Re: insert repeated many times when put it on models

2011-04-14 Thread Stifan Kristi
hi, anthony, thank you so much for your detail explaination, right now, i use appadmin, i think there is another way to put it on a code like on sql script. best regards, steve van christie On Thu, Apr 14, 2011 at 11:33 PM, Anthony wrote: > Your model files are run on every request, so you s

Re: [web2py] Re: submit forms to press the enter key

2011-04-14 Thread Stifan Kristi
is your focus is on the text area, check box or drop down list? best regards, steve van christie

Re: [web2py] Re: insert repeated many times when put it on models

2011-04-14 Thread Stifan Kristi
a, i c, thank you so much denes and anthony for your adviced, it opened my mind right now. kind regards, steve van christie

Re: [web2py] Re: how to share my apps in web2py appliance

2011-04-14 Thread Stifan Kristi
On Fri, Apr 15, 2011 at 4:23 AM, pbreit wrote: > 1) there's a lot of duplicate code that I bet you could reduce. For > example, all the controllers could be collapsed down into one controller > since they are all nearly identical. > Thank you so much for your adviced, I'll try to simplified my c

Re: [web2py] Re: bak files and size using space

2011-04-14 Thread Stifan Kristi
hi dharriman morgan, a, i c, i've already set my editor (gedit) to insert space insteads of tabs, with tabs width = 4. thanks and kind regards, steve van christie

Re: [web2py] Re: how to share my apps in web2py appliance

2011-04-15 Thread Stifan Kristi
a, i c, thank you so much for your adviced, arun. best regards, steve van christie On Fri, Apr 15, 2011 at 9:52 PM, Arun K.Rajeevan wrote: > your system doesn't have python-dev package. > If you are compiling mercurial from source you need that. > Install that first and try again. > > (on debia

Re: [web2py] Re: how to produce db select into xml

2011-04-15 Thread Stifan Kristi
thank you so much for your help, anthony, i've already tested your code, and it works fine. def mp3(): rows = db().select(db.audio.ALL) from gluon.serializers import xml xmlrows = xml(rows) return dict(xmlrows = xmlrows) i'll try to pass the xml output into the views but, the playe

Re: [web2py] Re: how to produce db select into xml

2011-04-15 Thread Stifan Kristi
thank you so much for your info, arun, but it return an error when i execute it : This page contains the following errors: error on line 162 at column 10: Opening and ending tag mismatch: link line 0 and head error on line 162 at column 10: Encoding error Below is a rendering of the page up to the

Re: [web2py] Re: cache.ram didn't show data immediately

2011-04-15 Thread Stifan Kristi
a, i c, thank you so much for your adviced, arun. i'll use the cache.ram, but lower the time in my dev learning. kind regards, steve van christie On Fri, Apr 15, 2011 at 11:05 PM, Arun K.Rajeevan wrote: > It should not be. > After caching, it must not hit database, until cache expires. > > So,

Re: [web2py] Web2py: the top notch productivity platform

2011-04-15 Thread Stifan Kristi
web2py is awesome, a lot of feature that can be use for all programmers. best regards, steve van christie On Sat, Apr 16, 2011 at 6:19 AM, DJ wrote: > > > I have been using web2py for the past few years and I feel it is one the > Python world's hidden gems. While most people argue about Djang

Re: [web2py] Re: xml()

2011-04-15 Thread Stifan Kristi
a, i c, thank you so much for your explaination, massimo. i got it when i use web2py wizard on 1.94.6 version. best regards, steve van christie On Sat, Apr 16, 2011 at 9:12 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > This was a bad idea and it does not work with recent web2py.

Re: [web2py] Re: web2pyslices.com - broken registration

2011-04-16 Thread Stifan Kristi
what browser that you used? best regards, steve van christie

Re: [web2py] Re: connection pools

2011-04-17 Thread Stifan Kristi
thank you so much for your info, i've already read it. best regards, steve van christie On Sun, Apr 17, 2011 at 1:23 PM, pbreit wrote: > It's "pool_size". SQLite and GAE disregard it. In theory it can improve > your DB performance but it can also degrade performance (if you set it too > high,

Re: [web2py] Re: Ubuntu + Nginx + uWSGI + Web2py using PPA/Launchpad.net

2011-04-17 Thread Stifan Kristi
nice shared info, thank you so much. best regards, steve van christie On Mon, Apr 18, 2011 at 12:40 AM, Mr. Electronic wrote: > Hi > > I have used some of the code from your script :-) > > Feel free to copy from my script if you can use something. > > I have added the following lines to the con

Re: [web2py] pygooglechart Issues

2011-04-17 Thread Stifan Kristi
hi, had already tried : jQuery(...).hide(): Makes the object hidden ?? http://web2py.com/book/default/chapter/10#jQuery-Effects best regards, steve van christie On Sun, Apr 17, 2011 at 9:15 PM, Neveen Adel wrote: > Hello, > > Am using

Re: [web2py] Re: header detail form

2011-04-17 Thread Stifan Kristi
thanks, pbreitenbach for your ref, but, i want to create header and detail form is on the same page, that can be submit simultaneously on the same time. best regards, steve van christie On Mon, Apr 18, 2011 at 12:04 AM, pbreit wrote: > I'm not sure I understand. That is very common. An example

Re: [web2py] share : goosh

2011-04-17 Thread Stifan Kristi
nice shared richard. thanks and best regards, steve van christie On Mon, Apr 18, 2011 at 2:04 AM, Richard Vézina wrote: > Hello web2by friends, > > I just would just let you know about Goosh a unix like command shell for > google search... > > http://goosh.org/ > > I learned it existance yeste

Re: [web2py] Re: gae error

2011-04-17 Thread Stifan Kristi
yes, i use python 2.6, i'll try your adviced to use python 2.5 thank you so much and best regards, steve van christie On Mon, Apr 18, 2011 at 5:34 AM, howesc wrote: > i didn't look at the slicebut you are using python 2.6. GAE does not > like python 2.6. it's old skool and likes python 2

Re: [web2py] Interesting tool, Maqetta

2011-04-19 Thread Stifan Kristi
nice info, thanks On Tue, Apr 19, 2011 at 5:01 PM, Jason (spot) Brower wrote: > http://maqetta.org/ > It's integration into web2py might be fun, and a monstorous challenge. > BR, > Jason >

Re: [web2py] importing CSV / NameError: global name 'request' is not defined"

2011-04-19 Thread Stifan Kristi
please add request variable as parameter on your modules and your function, because the modules can't pass global name like (response, request, db, t, crud, etc) so that you must add it: (not tested) e.g. initialize = local_import('initialize') initialize.fillup(db, response) please let me know if

Re: [web2py] Re: performance impact using record versioning

2011-04-19 Thread Stifan Kristi
a, i c, thank you so much for your explaination, massimo. so, record versioning, is not recommended to be implemented on production environment, is it? On Tue, Apr 19, 2011 at 11:49 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > About a factor 2 I guess. because you need to perform

Re: [web2py] Re: performance impact using record versioning

2011-04-19 Thread Stifan Kristi
thank you so much for your suggestion, pbreit. On Wed, Apr 20, 2011 at 5:58 AM, pbreit wrote: > Totally depends on your situation. For most systems, performance is a > non-issue. Improving performance is easy. Making a system that people want > to use is hard. Focus on that.

Re: [web2py] Re: performance impact using record versioning

2011-04-19 Thread Stifan Kristi
a, it's more wisely, thank you so much for your shared, howesc On Wed, Apr 20, 2011 at 7:45 AM, howesc wrote: > i use versioning selectively on tables depending on if i need that audit > trail or not. not all tables need it. >

Re: [web2py] Howto create parent and children at same time?

2011-04-20 Thread Stifan Kristi
why not use jquery add / remove form field? i mean keep the parent (header), and then you add the child (detail) as much as you want in the same form, and then when it's submit, it'll insert simultaneously. On Wed, Apr 20, 2011 at 10:19 PM, Keith Pettit wrote: > I have a ticket system for trucks

Re: [web2py] Re: create new record and update status simultaneously

2011-04-21 Thread Stifan Kristi
a, i c, thank you so much for your pointer anthony, is there any others way to that without using update() or update_record()? thank you very much On Fri, Apr 22, 2011 at 1:33 AM, Anthony wrote: > I think onaccept has to be a function. > > On Thursday, April 21, 2011 1:12:24 PM UTC-4, 黄祥 wrote:

Re: [web2py] Re: create new record and update status simultaneously

2011-04-21 Thread Stifan Kristi
] > > > > On Fri, Apr 22, 2011 at 2:24 AM, Stifan Kristi < > steve.van.chris...@gmail.com> wrote: > >> a, i c, thank you so much for your pointer anthony, is there any others >> way to that without using update() or update_record()? >> >> thank

Re: [web2py] Re: create new record and update status simultaneously

2011-04-22 Thread Stifan Kristi
hi, anthony, thank you so much for your kind attention, problem solved now def __add_2(table): form = crud.create(table, next = URL(request.application, request.controller, index_link),

Re: [web2py] Re: db field date time compare validation

2011-04-22 Thread Stifan Kristi
thank you so much for your hints anthony, the error didn't appears anymore, but the validation is not run def __date_comparation(form): if request.function == 'booking_add': if form.vars.from_date > form.vars.to_date: form.errors.to_date = 'To Date must greater than From Da

Re: [web2py] Re: db field date time compare validation

2011-04-22 Thread Stifan Kristi
pie...@gmail.com> wrote: > I am on the road. I will take a look asap but may have to wait Sunday. > > On Apr 22, 2011, at 6:41 PM, Stifan Kristi (Kou Shou) wrote: > > thank you so much for pointers pbreit and massimo, it's > correct that before i changed my from database fie

Re: [web2py] Re: [ad] Curso de Python e web2py

2011-04-23 Thread Stifan Kristi
great site... 2011/4/23 Anthony > Very nice site. Just added it to http://web2py.com/poweredby. > > Note, in IE8, there are some weird font display problems (see attached > screenshot). Also, I'm not sure if this is intended, but the Facebook and > Twitter buttons look like they're being cut off

Re: [web2py] Re: modified auth.signature

2011-04-23 Thread Stifan Kristi
thank you so much for your suggestion, massimo, pardon, before, i've used that code (refered from the book), but, it seems, that web2py had already this function so that i used web2py function. i mean, i want to add created_from field that have default value ip address where the user submit the for

Re: [web2py] Re: different environment in web2py

2011-04-23 Thread Stifan Kristi
thank you so much for your pointer, massimo. a, i c, so that i must use the different table and different ip for the different environment, and describe it on the models (0.py or db.py). is it possible to use it in 1 ip? i mean for dev, testing and staging i use 1 ip (127.0.0.1:8000) thank you ver

Re: [web2py] Re: different environment in web2py

2011-04-23 Thread Stifan Kristi
> > > On Apr 23, 11:46 pm, Stifan Kristi > wrote: > > thank you so much for your pointer, massimo. a, i c, so that i must use > the > > different table and different ip for the different environment, and > describe > > it on the models (0.py or db.py). >

Re: [web2py] Re: modified auth.signature

2011-04-23 Thread Stifan Kristi
> > On Apr 23, 11:42 pm, Stifan Kristi > wrote: > > thank you so much for your suggestion, massimo, pardon, before, i've used > > that code (refered from the book), but, it seems, that web2py had already > > this function so that i used web2py function. i mean, i wa

Re: [web2py] Re: IS_IN_DB validator

2011-04-24 Thread Stifan Kristi
nice share nik, thank you. i think IS_IN_DB(db, db.table_name.id, '%(field_name)s') is work too. On Sun, Apr 24, 2011 at 1:11 PM, niknok wrote: > Found the answer: orderby is supported. > > IS_IN_DB(dbset, field, orderby='mytable.myfield', ...) > > On Apr 24, 8:31 am, niknok wrote: > > Thanks.

Re: [web2py] Re: web2py version

2011-04-24 Thread Stifan Kristi
thank you so much for your info, massimo. hope there are a lot of improvement features and new features on the next version. great job, all, thank you very much. On Sun, Apr 24, 2011 at 8:51 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > We have this: > > http://web2py.com/examples/

Re: [web2py] Re: web2py version

2011-04-24 Thread Stifan Kristi
a, i c, thank you so much for your info, anthony. On Mon, Apr 25, 2011 at 4:33 AM, Anthony wrote: > On Sunday, April 24, 2011 9:31:25 AM UTC-4, 黄祥 wrote: >> >> and 1 more things, is there any schedule upgrade version for web2py? i >> mean like fedora or ubuntu have schedule update every 6 months

Re: [web2py] web2py 1.95.1 and open issues

2011-04-25 Thread Stifan Kristi
great job, massimo n the others, i've download n test it. thank you so much. On Mon, Apr 25, 2011 at 9:06 PM, Massimo Di Pierro wrote: > Hello everybody, > > web2py 1.95.1 is out with lots of improvements and bug fixes: > ## 1.95.1 > - Google MySQL support (experimental) > - pip support, thanks l

Re: [web2py] Re: Novice: form input, insert, update

2011-04-25 Thread Stifan Kristi
nice share, massimo, i want to learn it, but your video is too fast, i've already tried to pause it many times, but it seems i lost some part, could you share the code please? thank you so much in advance On Tue, Apr 26, 2011 at 12:15 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: >

Re: [web2py] Re: Some Advice for a Novice

2011-04-26 Thread Stifan Kristi
Field('qty','integer'), > > > Field('promotion','integer')) > > > > > db.define_table('cart', > > > Field('uid', db.users), > > > Field('item', db.inventory), > > >

Re: [web2py] Documentation web2py

2011-04-26 Thread Stifan Kristi
good idea On Tue, Apr 26, 2011 at 7:39 PM, Gilson Filho wrote: > The web2py has been a tool that is improving and evolving over time, and > who uses itknows it. Only for people to learn these new features or fixes to > existing becomes moredifficult when there is no consistent documentation. As

Re: [web2py] Re: Filtering by date range (SQL date tye)

2011-04-26 Thread Stifan Kristi
pardon me, is timedelta is used for show the differ between 2 date time? like timediff On Wed, Apr 27, 2011 at 8:14 AM, DenesL wrote: > > Scratch months; > only days, seconds, microseconds, milliseconds, minutes, hours, or > weeks. >

Re: [web2py] Re: url for static file

2011-04-26 Thread Stifan Kristi
a, i c, thank you so much for your info, pbreit. i've tried to use the janrain log in from the wizard one, but i don't know how to configure it, for the absolute path, it seems the login form is appears, but it can't be access after i log in, is there any problem in my code? and, is there any infor

Re: [web2py] Re: load and include

2011-04-28 Thread Stifan Kristi
a, i'm understood right now, thank you so much anthony. it seems that the load only can be implement on the table that have general function like comments (e.g. on the book), but for the specific one, i think it can't be used (e.g. let say on the book example introduction, we have the image comment

Re: [web2py] Re: password encrypt during insert

2011-04-28 Thread Stifan Kristi
hello, thank you so much for your pointer, salbefe. i can input the encrypted password but the result not like i've expected before. i mean there is an additional character on the field password. e.g. db.auth_user.bulk_insert([{'first_name' : 'a', 'last_name' : '

Re: [web2py] Re: ajax function submit on script

2011-04-28 Thread Stifan Kristi
thank you so much for your correction, massimo. it runs right now with: jQuery(document).ready(function(){ jQuery('.view').click(function(){jQuery('.comments').slideToggle()}); jQuery('.post').click(function(){jQuery('.form').slideToggle()}); jQuery('.post').submit(function(){ajax('{{=r

Re: [web2py] Re: password encrypt during insert

2011-04-28 Thread Stifan Kristi
thank you so much for your pointer, anthony, the encrypted password is without *|encrypted password|None.* i've compared with the manual that i put on the register form is same. (same password 'a' string) but, pardon there is strange behaviour during login, the user that i inserted via script could

Re: [web2py] Re: password encrypt during insert

2011-04-28 Thread Stifan Kristi
yes, u right, ron, there is a mistaken on my field value, thanks for show me my wrong code, it's work right now. thank you all for your pointer. On Fri, Apr 29, 2011 at 12:10 AM, ron_m wrote: > email of a.a.com is not a valid email address according to your code. > I am not sure if there is any

Re: [web2py] Re: ajax didn't run passing var when put it on static js folder

2011-04-28 Thread Stifan Kristi
thank you so much for your pointer, pbreit, i've followed what u said, but it still not working. currently, i put it on the views/default/index.html not in the layout.html. it seems that vars on ajax can't be passed to another file, because when i put script on the same page, it can be run. becaus

Re: [web2py] Re: ajax & cache.ram

2011-04-28 Thread Stifan Kristi
a, i understand, it will be more simple, thank you so much for your advice, pbreitenbach. On Fri, Apr 29, 2011 at 9:59 AM, pbreit wrote: > The caching is likely the problem since that's exactly what caching does. > It stores the results of the query for the time specified to avoid querying > the

Re: [web2py] Re: ajax didn't run passing var when put it on static js folder

2011-04-28 Thread Stifan Kristi
a, i c, thank you so much for your pointer, pbreintenbach. On Fri, Apr 29, 2011 at 10:01 AM, pbreit wrote: > I think for this specific case you do need to put the

Re: [web2py] Re: Multi-Company System

2011-04-30 Thread Stifan Kristi
how about the performance difference between using single database or multiple database? did you consider about it? On Sat, Apr 30, 2011 at 7:51 PM, annet wrote: > > @A I think your standardized groups will simplify things. However, > > there is then some sacrifice of fine-tuning permissions. >

Re: [web2py] Re: Multi-Company System

2011-04-30 Thread Stifan Kristi
PM, villas wrote: > On Apr 30, 2:14 pm, Stifan Kristi > wrote: > > how about the performance difference between using single database or > > multiple database? did you consider about it? > > I don't think that's an issue for me because DBs have to be really > big

Re: [web2py] Re: Multi-Company System

2011-04-30 Thread Stifan Kristi
> > In my experience even large DBs perform well when queries are on > indexed fields and it is much easier to manage data when it is in one > place. > i think indexed fields not every table must have it, because when you didn't use it wisely it can drop your database performance. just indexed the

Re: [web2py] Re: index not show on sql log

2011-04-30 Thread Stifan Kristi
i'm understand right now, btw, the indexing is working, i'm just curious why it's not log by sql log on web2py appadmin, thank you so much for your explaination, breitenbach. On Sun, May 1, 2011 at 8:00 AM, pbreit wrote: > sql.log reflects SQL generated from the define_table() models and will no

Re: [web2py] Total control over your web2py models

2011-04-30 Thread Stifan Kristi
nice info, viniclusban, btw, First, because web2py recommends you don't mix validators with db.define_table(). is it the best practice to not mix requires on the same time with field create? e.g. db.define_table('category', Field('category' ) )

Re: [web2py] Re: index not show on sql log

2011-04-30 Thread Stifan Kristi
thank you so much for your suggestion, massimo. On Sun, May 1, 2011 at 9:30 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > add this to your views > > {{=BEAUTIFY(db._timings)}} > > all queries will be there, timed. > > On Apr 30, 8:00 pm, pbreit wrote: > > sql.log reflects SQL gene

Re: [web2py] Re: index not show on sql log

2011-05-01 Thread Stifan Kristi
i'm understand right now, thank you so much for your detail reference, pbreitenbach On Sun, May 1, 2011 at 10:49 AM, pbreit wrote: > Because sql.log only tracks define_tables(). As noted in the Book: > > "Currently the DAL API does not provide a command to create indexes on > tables, but this ca

Re: [web2py] Total control over your web2py models

2011-05-01 Thread Stifan Kristi
roblems and behaviour. > > -- > Vinicius Assef. > > > On Sat, Apr 30, 2011 at 11:30 PM, Stifan Kristi > wrote: > > nice info, viniclusban, btw, > > First, because web2py recommends you don't mix validators > > with db.define_table(). >

Re: [web2py] Total control over your web2py models

2011-05-01 Thread Stifan Kristi
i'd like your logic bruno, could you explain about the function, please? 000_essentials.py = what for? 100_authdatabase.py = what for? 200_dbmodel.py = what for? 300_validators.py = what for? 400_utilities.py = what for? 500_preload.py = what for? thank you so much On Sun, May 1, 2011 at 11:03 AM

Re: [web2py] Total control over your web2py models

2011-05-01 Thread Stifan Kristi
data.py because surely I > have link to another tables. > > Then came the plugins: > > plugins_1.py > plugins_2.py > plugins_3.py > plugins_4.py > plugins_zindex.py (here the execution order of plugins) > > 2011/5/1 Stifan Kristi >

Re: [web2py] Total control over your web2py models

2011-05-01 Thread Stifan Kristi
r example something like this: > > class Clients(object): > > def show(): > 'show a list of clients' > > def delete(): > 'delete ...' > > def add(): > 'add ...' > > 2011/5/1 Stifan Kristi > >

Re: [web2py] Re: nested list

2011-05-01 Thread Stifan Kristi
thank you so much for your reference link jose On Sun, May 1, 2011 at 9:52 PM, Jose wrote: > Hi, > > You can see this: > > http://www.web2py.com/book/default/chapter/06 > > [Self-Reference and Aliases] > > Best Regards, > Jose

Re: [web2py] Re: difference between is_not_empty(), notnull=true and required=true

2011-05-01 Thread Stifan Kristi
i'm understand right now, thank you so much for your detail explaination, massimo

Re: [web2py] Re: notnull=true in web2py.com book

2011-05-02 Thread Stifan Kristi
so that's the reason ya, thank you so much for your detail explaination pbreitenbach On Mon, May 2, 2011 at 10:13 PM, pbreit wrote: > It's unnecessary. Optionality is enforced by Web2py so it's not necessary > and less flexible to enforce it at the database level.

  1   2   >