I guess you're looking for something like this:
In db_00.py:
db.define_table('stores',
Field('name'),
migrate='stores.table')
db.define_table('regions',
Field('abbr',length=2),
migrate='regions.table')
db.define_table('store_region',
Field('store_id',db.stores),
Field('
On 09/23/2010 09:49 PM, rick wrote:
I have three tables:
Could you show us the tables you have created? Don't need the data just
how they are setup. I can then try to make your query.
Br,
Jason
Good night
i have a simple form to input data in hebrew
I works ok in in sqlLite.
in GAE it returns:
return ' AND '.join([str(filter) for filter in self.filters])
UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-11:
ordinal not in range(128)
db.define_table('category',
Hi,
I'm having trouble figuring out the syntax for this type of database
inquiry.
I have three tables:
1) stores, which has a name
2) regions, which has a 2-letter abbreviation
3) store-region, which puts stores in certain regions.
I want to pass in a 2-letter region abbreviation,
and receive bac
I just posted today a fix to
gluon/contrib/login_methods/cas_auth.py that works out of the box with
Auth. That means you do not need to move cas.py into the models
folder. Instructions are in gluon/contrib/login_methods/cas_auth.py
On Sep 19, 10:14 pm, KMax wrote:
> I guess, this is still actua
yes and no. It will not be enforced at the database level but if you
do not specify validators, it will use it to pick default validator
that enforce the uniqueness at the web2py level
On Sep 23, 11:17 am, Carl wrote:
> My db.py includes...
>
> db.define_table('voucher',
> Field('code', 'stri
reminding if actual
> On 17 авг, 05:34, mdipierro wrote:
This should be easy to do. I am traveling this week but I can do it
the next. Please remind me.
I'm working on an e-commerce site with web2py that requires the
ability to handle international sales. In the past, I've worked with
Drupal and Ubercart. Ubercart has a mechanism where the format of the
shipping address form can be changed based on the country that is
selected. They use somethin
Are you using source from googlecode?:
http://code.google.com/p/planet-web2py/
There is a cron job that fetches rss posts, and you could call
refresh() controller to force update.
Also check PLANET_REGEX in model, that is used to filter general posts
(or uncheck general field in the feed table)
Ok this is what i want to know, i'll going to fix tomorrow.
On Sep 23, 6:13 pm, rochacbruno wrote:
> Sidebars are there to be used with plugin_wiki that has meta-sidebar
>
> Enviado via iPhone
>
> Em 23/09/2010, às 18:09, "Martin.Mulone" escreveu:
>
>
>
> > last thing you have to reaload F5 beca
Sidebars are there to be used with plugin_wiki that has meta-sidebar
Enviado via iPhone
Em 23/09/2010, às 18:09, "Martin.Mulone" escreveu:
> last thing you have to reaload F5 because of cache browser or use
> http://web2pytesting.appspot.com/welcome2/
>
> On Sep 23, 6:06 pm, "Martin.Mulone" w
Wow.. nice.
In a future, I wanna do that with the admin app.
Regards!
On Thu, Sep 23, 2010 at 11:06 PM, Martin.Mulone wrote:
> Version 2.0
>
> * About validation, this almost validate in html5 but one thing that
> is important, that force to last ie render
>
> http://validator.w3.org/check?ur
last thing you have to reaload F5 because of cache browser or use
http://web2pytesting.appspot.com/welcome2/
On Sep 23, 6:06 pm, "Martin.Mulone" wrote:
> Version 2.0
>
> * About validation, this almost validate in html5 but one thing that
> is important, that force to last ie
> renderhttp://vali
Version 2.0
* About validation, this almost validate in html5 but one thing that
is important, that force to last ie render
http://validator.w3.org/check?uri=web2pytesting.appspot.com&charset=(detect+automatically)&doctype=Inline&group=0
* About validation in css, well i prefer that show correct
Hello,
I tried web2py planet (http://code.google.com/p/planet-web2py/) on my
local install.
The feeds added in the appadmin database page were successfully added to
the right handed panel.
But no feeds were fetched from the newly added RSS feeds.
What is the magic behind?
Thanks in advance,
Tim
Hmm, I gave that a spin and don't believe I can get that to work.
All of the login_methods imply either using the local login form or a
3rd party URL to login. This will not work here - what I need is a way
of authenticating based on a URL, sent through an email:
http://127.0.0.1/default/login_by_
New solution much cleaner since the user does not needing to edit the
auth_membership table :
def chmembershiptr():
try:
if db(db.auth_group_allowed.user_id==auth.user.id)\
.select(db.auth_group_allowed.user_id,distinct=True).first().user_id==
auth.user.id:
if auth.has_m
I just spent several hours troubleshooting why my application seemed
to be randomly hanging when I was running both the Rocket Server and
the shell. It came down to the fact that I was performing db io
(Create/Update/Delete) in the shell and not explicitly committing it.
I was misled by this line
I had syntax error :
@auth.requires_login()
def chmembership():
try:
if db(db.auth_group_allowed.user_id==auth.user.id)\
.select(db.auth_group_allowed.user_id,distinct=True).first().user_id==
auth.user.id:
if auth.has_membership(auth.id_group('technician'))\
o
You can buy it from Lulu.. Believe me it would be worth buying, though I
have not bought it yet
http://www.lulu.com/product/paperback/web2py-(3rd-edition)/12199578
On Thu, Sep 23, 2010 at 9:46 PM, weiertzw wrote:
> do you have web2py offline book? sometimes i don't have time to online
> so maybe
>
>
> -- Forwarded message --
> From: mdipierro
> Date: 22 sep, 18:48
> Subject: How to kick off process asynchronously
> To: web2py-users
>
>
> Spawning processes takes extra memory. If the user reloads the page
> too many time to soon get an out of memory.
Ok, catched
> I thin
My db.py includes...
db.define_table('voucher',
Field('code', 'string', length=128, unique=True, notnull=True,
required=True),
Locally on sqlite when I insert a second record with the same 'code'
as an existing record insert() throws an except. I catch the exception
and report back t
do you have web2py offline book? sometimes i don't have time to online
so maybe ...
I found that doing it the "hard" way was in some way easier for me.
Been at least 2 months since I setup the server on vps and its amazing
how much you can forget in 2 months when you have to cram other stuff
in your head, but here is what I recall of it:
1) Disable admin. Setup a sudo user (I re
Hello Scausten,
I wonder were you able to upload an application from the web2py admin
page after your installation ? For some reason I can't upload any
application. I still have that message saying "Unable to install
application..." even after I restart web2py etc...
Please let me know.
Thanks,
Y
Thanks a alot mdipierro it works fine with me :)
On Sep 23, 2010, at 4:34 AM, Albert Abril wrote:
> I have in the root of web2py the routes.py configured with that:
>
> default_application = 'arritmia'# ordinarily set in base routes.py
> default_controller = 'default' # ordinarily set in app-specific routes.py
> default_function = 'index'
Against trunk please. It is ok if you just send me a replacement file.
I will diff and study it.
On Sep 23, 8:52 am, Niphlod wrote:
> Never done a patch before, but I think in the night (here are 3PM) I
> can manage to have a first draft.
>
> I'd have to test it out, but for the beginning .. What
I'm running web2py from a 'server' running Snow Leopard. The OS X
firewall is set up for application-based control. Apple either expects
a digitally signed application or the firewall will sign it itself
when it is manually added. Some applications can't be signed, because
(according to Apple) they
I completely forgot I did it for my Python 2.6 installation :-(
Sorry for bothering community,
David
On 23 zář, 15:39, mdipierro wrote:
> You need to install Mark Hammond win32 extensions.
>
> On Sep 23, 8:32 am, David Marko wrote:
>
>
>
>
>
>
>
> > Recently a tried to switch my Python to versi
Never done a patch before, but I think in the night (here are 3PM) I
can manage to have a first draft.
I'd have to test it out, but for the beginning .. What wuold be the
patch against ? tools.py in trunk or tools.py in 1.85.3?
On 23 Set, 14:52, mdipierro wrote:
> You are right. That would be b
Never done a patch before, but I think in the night (here are 3PM) I
can manage to have a first draft.
I'd have to test it out, but for the beginning .. What wuold be the
patch against ? auth.py in trunk or auth.py in 1.85.3?
On 23 Set, 14:52, mdipierro wrote:
> You are right. That would be bes
You need to install Mark Hammond win32 extensions.
On Sep 23, 8:32 am, David Marko wrote:
> Recently a tried to switch my Python to version 2.7 and run web2py in
> my WinXP machine.
> But on console I could see some problems with web2py cron. See below.
> Is this know issue? Should I worry about
yes, in this case i'm hosting a single app.
I'll do it that way.
thanks Massimo.
On Thu, Sep 23, 2010 at 3:10 PM, mdipierro wrote:
> If you host a single app the easy way is saying in routes.pt
>
> routes_in=[
> ('/bio/$anything', '/arritmia/bio/$anything')
> ]
>
> routes_out=[
> ('/arritmia//
Recently a tried to switch my Python to version 2.7 and run web2py in
my WinXP machine.
But on console I could see some problems with web2py cron. See below.
Is this know issue? Should I worry about something else or is web2py
Python 2.7 compatible?
David
#
Ver
Don't worry, I was doing something extraordinarily stupid - the script
is fine.
On Sep 23, 2:05 pm, mdipierro wrote:
> I do not see anything wrong with line 4
>
> On Sep 23, 5:25 am, scausten wrote:
>
>
>
> > Hi Massimo,
>
> > I've tried to install web2py on vps.net today and I'm getting the
> >
It is. fixing it.
On Sep 23, 12:07 am, Jeremy Dillworth wrote:
> There's just one more issue I wanted to raise. It didn't hit me until
> I was
> describing the situation to a non-technical friend. When the value is
> blank,
> the error message doesn't say the value is blank, it says
> "value alre
If you host a single app the easy way is saying in routes.pt
routes_in=[
('/bio/$anything', '/arritmia/bio/$anything')
]
routes_out=[
('/arritmia//bio/$anything', '/bio/$anything')
]
On Sep 23, 6:34 am, Albert Abril wrote:
> .
>
> I have in the root of web2py the routes.py configured with
I do not see anything wrong with line 4
On Sep 23, 5:25 am, scausten wrote:
> Hi Massimo,
>
> I've tried to install web2py on vps.net today and I'm getting the
> following error message:
>
> ./setup-web2py-ubuntu.sh: line 4: syntax error near unexpected token
> `newline'
>
> Could you have a look
Will be fixed with next update.
On Sep 23, 4:15 am, cjrh wrote:
> The main page:
>
> http://www.web2py.com/
>
> Says, "Runs on Windows, Mac, Unix/Linux, Google App Engine, Amazon
> EC2, and almost any web hosting via Python 2.4/2.5/2.6, or Java with
> Jython."
>
> The PyPI page, here:
>
> http://
FYI, here is my domain and what it is showing now
http://www.flockbird.com/
This may help you understand it better
Regards, Rahul
There's just one more issue I wanted to raise. It didn't hit me until
I was
describing the situation to a non-technical friend. When the value is
blank,
the error message doesn't say the value is blank, it says
"value already in database". I wasted some time wondering where this
mysterious blank wa
Hi All,
I am able to see directory listing for my site but its not moving
to welcome application
The hierarchy now is
--public_html
--web2py (Folder)
|- has .htaccess and dispatch.fcgi
Also if I copy ".htaccess" file to public_html folder it gives the
below error
=
>From gluon/tools.py
class Auth():
...
def impersonate(self, user_id=DEFAULT):
"""
usage: http:///impersonate/[user_id]
or:http:///impersonate/0 to restore
impersonator
requires impersonator is logged in
and
has_permission('impersonate', 'auth
You are right. That would be best. Want to send me a patch?
On Sep 23, 2:26 am, Niphlod wrote:
> I'll try in other words. I/we (users building rest api) don't want
> the user to be redirected to any page (my own or the default really
> doesn't matter)...all the decorators seems to redirect
>
1)
db.define_table("member",
Field("membership_id", "integer",notnull=True),
Field("first_name", "string", notnull=True,length=100),
Field("middle_name", "string", notnull=True,length=100),
Field("last_name", "string", notnull=True,length=100),
Field("birthdate", "dat
You should not need to rewrite tools.py code. Looks at the examples in
gluon/contrib/login_methods
You can extend it.
On Sep 23, 12:20 am, Chris wrote:
> I did some more digging and found that the current code in gluon.tools
> stores login info in session.auth:
>
> session.auth =
.
I have in the root of web2py the routes.py configured with that:
default_application = 'arritmia'# ordinarily set in base routes.py
default_controller = 'default' # ordinarily set in app-specific routes.py
default_function = 'index' # ordinarily set in app-specific routes.py
Ok, so
that does not work in wiki_plug:
plugin_wiki.widget('jqgrid',db.test, columns=['id',..],
col_widths={'id':80,...} ,headers={'id':'ID',...}] , ..)
'fields' instead of 'columns' but how can I do change COLNAMES and
without showing ID ?
On 3 Sep., 16:09, mdipierro wrote:
> You are using plug
Hi Massimo,
I've tried to install web2py on vps.net today and I'm getting the
following error message:
./setup-web2py-ubuntu.sh: line 4: syntax error near unexpected token
`newline'
Could you have a look at it please?
On Sep 23, 4:36 am, mdipierro wrote:
> yes this should do it
>
> sudo /etc/
I have an application that enables users to invite others by capturing
their email address and sending an email invite. The invite includes
a link to a specific 'community'. When the user clicks the link they
are taken to the application. If they are already registered (which
is not the case on
The main page:
http://www.web2py.com/
Says, "Runs on Windows, Mac, Unix/Linux, Google App Engine, Amazon
EC2, and almost any web hosting via Python 2.4/2.5/2.6, or Java with
Jython."
The PyPI page, here:
http://pypi.python.org/pypi/web2py/1.85.3
Says, "Platform: CPython/Jython 2.4,2.5,2.6,2.7
just change the user agent
and it will work.
e.g. wget -u konqueror
http://groups.google.com/group/web2py/feed/rss_v2_0_msgs.xml
or
curl --user-agent konqueror
http://groups.google.com/group/web2py/feed/rss_v2_0_msgs.xml
work both
On 23 Set, 10:47, b vivek wrote:
> No massimo, does not w
No massimo, does not work from terminal, works ok from browser though..!
On Thu, Sep 23, 2010 at 10:08 AM, mdipierro wrote:
> works ok from browser but does this work for you?
>
> wget http://groups.google.com/group/web2py/feed/rss_v2_0_msgs.xml
>
On 09/22/2010 11:32 PM, Kenneth wrote:
Hello,
what would be the easiest way of "becoming" another user?
I have cases where I would like to login in as another user, but to do
this I have to know the password. I remember that in Drupal (I think
it was) you could as an admin become which ever use
I'll try in other words. I/we (users building rest api) don't want
the user to be redirected to any page (my own or the default really
doesn't matter)...all the decorators seems to redirect
somewhereinstead they "should" call a function (maybe by default a
redirect, in order to don't break
Thanks mdipierro for ur reply :)
Am using MySQL
but after i did the following:
db.define_table("member",
Field("membership_id", "integer",notnull=True),
Field("first_name", "string", notnull=True,length=100),
Field("middle_name", "string", notnull=True,length=100),
Field(
Thanks mdipierro for ur reply :)
Am using MySQL
but after i did the following:
db.define_table("member",
Field("membership_id", "integer",notnull=True),
Field("first_name", "string", notnull=True,length=100),
Field("middle_name", "string", notnull=True,length=100),
Field(
58 matches
Mail list logo