On 14 April 2011 18:26, howesc wrote:
> Johann,
>
> the steps as i see it:
> - add new uuid field for your new primary key, don't drop old one yet
> - fill in the uuid field
> - add a new foreign key field that will store UUID
> - use the old foreign key to lookup the uuid of the reference
>
Hi *,
I'm developping a sort of map/gis application using web2py and a local
geoserver. For some security policy geoserver by default does not share
data with applications that send their request from another URL even if
form the same host but a different port. Do you think there's a way to
us
On 14 April 2011 15:52, Anthony wrote:
> Try recnr = db.xx.insert(**x)
>
> The **x will expand your dictionary into a set of keyword arguments.
>
>
Thanks Anthony.
Regards
Johann
--
May grace and peace be yours in abundance through the full knowledge of God
and of Jesus our Lord! His divine p
jason,
you will need to join in the user table and adjust your grouping
accordingly. somthing like:
count = db.users_tags.id.count()
query = db((db.users_tags.user != auth.user.id)& #\/-- isn't
that the join?
(db.users_tags.tag.belongs(db(db.users_tags.use
+1 (Agreed completely)
On Apr 14, 9:19 pm, mikech wrote:
> Yes very good choice, as a beginner I've found it the most learnable.
I'm running Ubuntu 10.04 and tried your code and it's working fine in
my case.
But, I do like to report that I occasionally see bpython crash and
revert to ipython. In some cases, the code I was trying out were pure
python code, not web2py code.
On Apr 14, 11:14 am, Bruno Rocha wrote:
> I found
I still can't get the user's information out of this query.
How would I do that?
BR,
Jason
On 04/15/2011 06:22 AM, Jason Brower wrote:
Actually I think the correct way is
(db.users_tags.user != auth.user.id
Because I want all possible users but me. I am still learning this,
but I think that's
Hi,
thought it would simple enough to do, but ... surprise , surprise on
me!
here's the gist: i have some scripts, that do a good part of my day to
day. functions, modules, etc... are called through a set of navigable
menus (everything is interactive @ the cmd line) . they look like
below. What I
Actually I think the correct way is
(db.users_tags.user != auth.user.id
Because I want all possible users but me. I am still learning this, but
I think that's what it does.
BR,
Jason
On 04/14/2011 09:06 PM, Massimo Di Pierro wrote:
I think you want
(db.users_tags.user != db.auth_user.id)
in
Thank you very much.
Regards,
Oscar.
On 14 abr, 17:43, Anthony wrote:
> Is this what you
> want:http://web2py.com/book/default/chapter/06#Self-Reference-and-Aliases
>
>
>
>
>
>
>
> On Thursday, April 14, 2011 4:56:28 PM UTC-4, Oscar wrote:
> > There is another way to do this?
>
> > categories
Thanks!! Here's the generic version
def radio_h(field,value):
nbsp=XML(' ')
items=[TAG[''](SPAN(name,INPUT(_type='radio',
_id="%s_%s" % (field._tablename, field.name),
_value=key,
_name=field.name,
Hmmm, that's odd. Can you try "sudo apt-get" as described here:
https://help.ubuntu.com/community/Mercurial
Version control is great to learn, even for solo developers. And Mercurial
is reasonably easy to learn.
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
.bak files are used for reverting to the previous state of the file
(accomplished via the 'Revert' button at bottom of edit form); they
are created and checked for in the 'edit' function of admin/
controllers/default.py
your guess about the spaces is probably correct (no tabs, only spaces
are used
hi,
why when i edited my code web2py framework in broswer it will produce
*.bak file? what is it use for? is it for undo function?
and 1 more things when i use tab (i mean in editor) it take more
little file space rather than when i save it on browser (using 4 blank
space for replace the tab)?
did
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
Hello to all, im using the example in old blog regarding "SELECT using
values from a database table":
staff = db(db.staff.ALL).select()
FORM(TR("Select a user :",
SELECT(_name='staffselect',
*[OPTION(staff[i].username, _value=str(staff[i].id)) for i
in range(len(staff))])),
a, i c, thank you so much denes and anthony for your adviced, it opened my
mind right now.
kind regards,
steve van christie
is your focus is on the text area, check box or drop down list?
best regards,
steve van christie
Is this what you want:
http://web2py.com/book/default/chapter/06#Self-Reference-and-Aliases
On Thursday, April 14, 2011 4:56:28 PM UTC-4, Oscar wrote:
> There is another way to do this?
>
> categories = db.Table(db, 'categories',
> Field('id', 'id'),
>
Thank you Drise,
This is definitively possible. Could you please open a ticket on
google code so the request gets queued?
On Apr 14, 4:34 pm, Drise wrote:
> In the past week, I have come to really love Web2Py and thank Massimo
> for his work. One thing I would find useful is when editing a file
On Thursday, April 14, 2011 5:23:36 PM UTC-4, pbreit wrote:
>
> 2) this is a personal preference but indenting with spaces is more common
> among Python programmers
>
Specifically, 4 spaces per indent. See
http://www.python.org/dev/peps/pep-0008/
In the past week, I have come to really love Web2Py and thank Massimo
for his work. One thing I would find useful is when editing a file,
and you have unsaved changes, you should be prompted to save or
discard those changes before being able to browse to a new page.
It looks nice and the code is very organized. I'm not sure if I would use it
or who would use it.
Some suggestions on the code:
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
There is another way to do this?
categories = db.Table(db, 'categories',
Field('id', 'id'),
Field('name', 'string', length=512,
requires=(IS_SLUG())),
Field('title', 'string', length=512,
required=True),
On Thursday, April 14, 2011 3:09:58 PM UTC-4, DenesL wrote:
>
>
> Note that everything (in models, controllers, and views) is python
> code so you can check first then add if not there:
>
> if not db(db.auth_group).select():
> db.auth_group.insert(role = "Admin", description = "Admin")
>
> o
I have not seen the behavior work on other web sites
On Apr 14, 11:42 am, pbreit wrote:
> Oh, yeah, if there is a drop-down, then I think the focus on it takes
> precedence. I'm not sure if there's a work-around. Have you seen the
> behavior work on other web sites?
I think the current autocomplete is incompatible with SQLFORM.factory,
but don't quote me on this.
On Apr 14, 1:17 pm, annet wrote:
> I have the following function:
>
> def index():
> form1=SQLFORM.factory(
>
> Field('what',widget=SQLFORM.widgets.autocomplete(request,db.companykeyword.word)
Note that everything (in models, controllers, and views) is python
code so you can check first then add if not there:
if not db(db.auth_group).select():
db.auth_group.insert(role = "Admin", description = "Admin")
or more specifically:
if not db(db.auth_group.role=='Admin').select():
db.auth
Oh, yeah, if there is a drop-down, then I think the focus on it takes
precedence. I'm not sure if there's a work-around. Have you seen the
behavior work on other web sites?
That is supported. Here is the relevant text from router.example.py:
# For each request, the effective router is:
#the built-in default base router (shown below),
#updated by the BASE router in routes.py routers,
#updated by the app-specific router in routes.py routers (if any),
#
I think you want
(db.users_tags.user != db.auth_user.id)
instead of
(db.users_tags.user != auth.user.id
On Apr 14, 12:05 pm, Jason Brower wrote:
> On 04/14/2011 08:46 AM, ron_m wrote:> The _select is a nested select - the
> one in the second half of the
> > WHERE clause that Christian wrote o
It works, Big Thx :-)
2011/4/14 DenesL
>
> Add
> format='%(name)s'
> to the end of your categories table definition.
>
> BTW, you should also change
> request.args[0]
> to
> request.args(0)
> to avoid error tickets when no args are present.
>
>
> On Apr 13, 9:43 am, rixder wrote:
> > Hi,
> >
Hi,
Each application can have their own routing property file ?
Actually all routing properties are put on routes.py, but I wanted to
know if each applications could have their own routing property file.
Thanks
I've tried, but does not work, it seems that when a table is 2 or more
fields referenced by other tables, the focus stays on the dropdown
list and you have to press Tab to place focus on the button, with no
simple crud occurs, perhaps only occurs because the table only has
fields referenced by othe
I have the following function:
def index():
form1=SQLFORM.factory(
Field('what',widget=SQLFORM.widgets.autocomplete(request,db.companykeyword.word))
Field('city',widget=SQLFORM.widgets.autocomplete(request,db.address.city)))
form2=SQLFORM.factory(
Field('what',widget=SQLFORM.widgets.
On 04/14/2011 08:46 AM, ron_m wrote:
The _select is a nested select - the one in the second half of the
WHERE clause that Christian wrote out for the SQL equivalent.
But the _select needs to return exactly one column, try changing
_select() to _select(db.user_tags.tag)
There is some discussi
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
Your model files are run on every request, so you shouldn't put any one-time
code in a model file. The easiest way to do this would be manually via
appadmin (see http://web2py.com/book/default/chapter/03#More-on-appadmin).
You could also do it from a web2py shell or by putting the code in a Pyth
Johann,
the steps as i see it:
- add new uuid field for your new primary key, don't drop old one yet
- fill in the uuid field
- add a new foreign key field that will store UUID
- use the old foreign key to lookup the uuid of the reference
- store that uuid
- alter tables to make the uuid fie
Yes very good choice, as a beginner I've found it the most learnable.
done, please checked it out, and please give an advice or suggestion.
thanks and best regards,
steve van christie
hi,
is there possible to insert the data auth_group during database
creation for the first time?
e.g.
db.auth_group.insert(role = "Admin", description = "Admin")
i've already tried to put it on models but, the data inserted is
repeated many times.
any idea, suggestion or correction?
thanks and
Can you include a short description on what is the purpose of the app?
http://web2py.com/appliances/default/show/76
--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]
On Thu, Apr 14, 2011 at 12:48 PM, Stifan Kristi <
steve.van.chris...@gmail.com> wrote:
> hi massimo & pbreitenbach,
>
> t
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
@Tito,
Thanks for your reply. I tried changing the name of the what field in
the second form:
def index():
form1=SQLFORM.factory(
Field('what',widget=SQLFORM.widgets.autocomplete(request,db.companykeyword.word))
Field('city',widget=SQLFORM.widgets.autocomplete(request,db.adres.plaats)))
Put it on Bitbucket or Google Code.
Try go to
> http://web2py.com/appliances/default/edit
On Apr 14, 2011, at 9:45 AM, Stifan Kristi wrote:
> hi, massimo
>
> i've already login in http://web2py.com/appliances/default/index, but didn't
> find upload form. please find attached file that i'll try to upload.
> any suggestion, adv
Yes, I've got it working. Not sure what the original problem was though. I
haven't been able to break it again.
Thanks!
/Jens
Skickat från min iPhone
13 apr 2011 kl. 17:45 skrev Massimo Di Pierro :
> Is this issue closed? I cannot reproduce the problem.
>
> On Apr 11, 12:25 pm, Jens Örtenhol
Done. Thanks Massimo, and for all your hard work.
On Apr 14, 7:29 am, Massimo Di Pierro
wrote:
> Please open an issue in google code and I will fix this asap.
>
> On Apr 14, 8:56 am, Brian Will wrote:
>
>
>
>
>
>
>
> > No, form.vars and request.vars both work the same there. (Should I be
> > usi
Please open an issue in google code and I will fix this asap.
On Apr 14, 8:56 am, Brian Will wrote:
> No, form.vars and request.vars both work the same there. (Should I be
> using request instead anyway?) The internal error stems from adding
> 'terms' to form.errors, which then gets looked up as
You should be able to register and post them yourself. If you have
trouble, please email me the app and I will look into it. It is
possible to upload the app as a w2p file but I would prefer to link a
mercurial repository somewhere.
On Apr 14, 8:45 am, 黄祥 wrote:
> hi,
>
> is there possible for me
Okay, that issue is figured out, too.
from google.appengine.api.mail import InboundEmailMessage
message = InboundEmailMessage(request.body)
Now on to figuring out the actual programming details. Thanks for the
quick answers!
-Mike
On Apr 14, 9:52 am, Mike Giles wrote:
> Yep, I was just abou
Add
format='%(name)s'
to the end of your categories table definition.
BTW, you should also change
request.args[0]
to
request.args(0)
to avoid error tickets when no args are present.
On Apr 13, 9:43 am, rixder wrote:
> Hi,
> I can't find solution..:
> I have in model:
> db.define_table('c
On Apr 14, 2011, at 3:30 AM, Mike Giles wrote:
>
> That doesn't seem to work. First, I believe web2py will be looking
> for an application named _ah to handle the request (versus a controler
> named _ah in myapp). Assuming there is a way to resolve that (which
> would be great to know),
This is
Yep, I was just about to reply that I had gotten the routing piece of
it to work with a custom routes.py file. So now the request gets sent
to a controller (mail.py) in my app. First step done.
The question now, which I guess is a mix of Python/GAE/web2py, is how
to take the request object (that
No, form.vars and request.vars both work the same there. (Should I be
using request instead anyway?) The internal error stems from adding
'terms' to form.errors, which then gets looked up as if 'terms' is a
field in my table, which it's not. Look at sqlhtml.py line 1042.
So am I doing this in a wa
Try recnr = db.xx.insert(**x)
The **x will expand your dictionary into a set of keyword arguments.
Anthony
On Thursday, April 14, 2011 9:40:47 AM UTC-4, spyker wrote:
> I want to insert a dictionary into a table and work the resulting id.
>
> The following illustrates my problem:
>
> db.de
hi,
is there possible for me to share my apps about course in web2py
appliance? how to do it?
thanks and best regards,
steve van christie
On Thursday, April 14, 2011 6:30:55 AM UTC-4, Mike Giles wrote:
>
> That doesn't seem to work. First, I believe web2py will be looking
> for an application named _ah to handle the request (versus a controler
> named _ah in myapp).
You can use web2py's URL rewrite functionality to map /_ah/ t
I want to insert a dictionary into a table and work the resulting id.
The following illustrates my problem:
db.define_table('xx',
Field('a'),
Field('b'))
x = {}
x['a'] = 'abcd'
x['b'] = 'dbcs'
db.xx[0] = x # Success but how do I get the id?
This should be equivalent to db.x
Because onfailure
def validateTerms(form):
if form.vars.terms != 'agree':
form.errors.terms = 'You must agree to the terms.'
must be
def validateTerms(form):
if request.vars.terms != 'agree':
form.errors.terms = 'You must agree to the terms
I'm trying to add a checkbox that must be ticked to an update SQLFORM,
but I'm getting an internal error.
Here's the create form that works fine with an added checkbox:
form = SQLFORM(db.job_post, submit_button='Post Job',
formstyle='table2cols',
fields=['poster_name', 'poster_email'
i'm glad i could help, and thanks for web2py
Arek
On 14 Kwi, 14:48, Massimo Di Pierro
wrote:
> Thanks this is email is sufficient.
> I fixed it now in cube2py on googlecode and will post it asap.
>
> On Apr 14, 3:50 am, agend wrote:
>
>
>
>
>
>
>
> > hi, plugin_wiki star_rating was not working
If you validator is IS_IN_SET(...,multiple=True)
the single value in request.vars.receivers becomes a list in
form.vars.receivers. You should use
form.vars.receivers
On Apr 14, 7:53 am, Kenneth Lundström
wrote:
> Well, to answer my own question,
>
> if isinstance(request.vars.receivers, list):
Well, to answer my own question,
if isinstance(request.vars.receivers, list):
db(db.members.id.belongs(request.vars.receivers)).select()
else:
db(db.members.id==request.vars.receivers)).select()
Probably there is a nicer solution but this works.
Kenneth
Hello,
I have a very stupid p
... and? did it solve it?
On Apr 14, 6:44 am, Tito Garrido wrote:
> Hi Annet,
>
> I had the same problem... I've changed the name of the second field... in
> your case "what"... try to put "what2" just to test...
>
> Regards,
>
> Tito
>
>
>
>
>
>
>
>
>
> On Thu, Apr 14, 2011 at 4:17 AM, annet wr
Thanks this is email is sufficient.
I fixed it now in cube2py on googlecode and will post it asap.
On Apr 14, 3:50 am, agend wrote:
> hi, plugin_wiki star_rating was not working for me, so i've found that
> changing the /controllers/plugin_wiki.py line 281
>
> from :
> pa = db.plugin_wiki_aux
>
>
Hello,
I have a very stupid problem.
I created a list of users with a SELECT/OPTION tag and I have multiple
as true. I can select as many members I like and with belongs I can
fetch all members like selected =
db(db.members.id.belongs(request.vars.receivers)).select()
Every option has a valu
On Thursday, April 14, 2011 2:47:12 AM UTC-4, spyker wrote:
>
> On 14 April 2011 00:15, Massimo Di Pierro wrote:
>
>> I am sorry I still do not understand which part of admin would be
>> useful at the app level.
>>
>
> One example of something useful would be the appadmin interface
>
I think
Hi Annet,
I had the same problem... I've changed the name of the second field... in
your case "what"... try to put "what2" just to test...
Regards,
Tito
On Thu, Apr 14, 2011 at 4:17 AM, annet wrote:
> I have the following function:
>
> def index():
>form1=SQLFORM.factory(
>
>
> Field('wha
That doesn't seem to work. First, I believe web2py will be looking
for an application named _ah to handle the request (versus a controler
named _ah in myapp). Assuming there is a way to resolve that (which
would be great to know), the second issue is that to deal with inbound
mail requests you ne
Thanks, Jason Brower, luckysmack, Stifan Kristy, for your replies!
I really needed the support of this community to find out for sure,
that I am on the right path.
In my country (Bulgaria) the business applications are mainly
developed in PHP and Java, but I find these two as solutions, which
are a
hi, plugin_wiki star_rating was not working for me, so i've found that
changing the /controllers/plugin_wiki.py line 281
from :
pa = db.plugin_wiki_aux
to :
pa = db.plugin_wiki_rating_aux
helps, should i make a patch or smth? Could somobody help with that,
and explain how to make a patch and sub
Does anyone use web2py with netbeans? I looked into a post from last
year about getting auto complete to work, which it did, but like one
of the users stated there are a crap-ton of autocomplete results, most
that are irrelevant. And it also takes about 5 seconds to load the
list while it says [wai
I will try to run on Windows XP and other browsers and I tell you.
On 14 abr, 09:47, Stifan Kristi wrote:
> work fine for me on ubuntu 10.10 with chrome and firefox.
>
> On Thu, Apr 14, 2011 at 2:42 PM, luifran wrote:
> > My operating system is ubuntu 10.04
>
> > On 13 abr, 23:39, pbreit wrote:
hello, this is a python question. Not web2py.
I need to execute a python script via Component Object Model
for example
python = Dispatch('Python.Interpreter')
line = line from another python file
python.Exec(line)
It work until if finds in the python file something like
for x in range(1,10):
Apologies for a stupid question.
On 14 April 2011 10:53, Johann Spies wrote:
> Why do I get this error? The code causing this error:
>
> from uuid import uuid4
>
>
Should have been
import uuid
Regards
Johann
--
May grace and peace be yours in abundance through the full knowledge of God
and
Why do I get this error? The code causing this error:
from uuid import uuid4
signature = db.Table(db, 'signature',
Field('uuid', length=64, default=uuid.uuid4(),
notnull=True,
writable=False, unique=True),
Field('created_on', '
Sorry for late answer (never got an email replay...)
So:
-- db.py --
db.define_table( 'mail_domain',
Field( 'domainname', 'string')
)
db.define_table( 'mail_domain_alias',
Field( 'mail_domain_id', db.mail_domain,
requires = IS_IN_DB( db, db.mail_domain.id, '%
(domainname)s' ),
I want to syncrhonize a database to another computer using the method
indicated in the book (
http://web2py.com/book/default/chapter/06?search=sync#CSV-and-Remote-Database-Synchronization).
Unfortunately the database was not designed from the beginning to use uuid.
Is it possible to modify the exis
It's OK now.
I added requires=IS_LENGTH(minsize=5)
*
On 14 апр, 10:15, cyber wrote:
> Thanks, it's very helpfull!
>
> But it allows to insert SPACE_BAR gap and blank value.
> Is there decision for that?
>
> **
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
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.
I have the following function:
def index():
form1=SQLFORM.factory(
Field('what',widget=SQLFORM.widgets.autocomplete(request,db.companykeyword.word))
Field('city',widget=SQLFORM.widgets.autocomplete(request,db.adres.plaats)))
form2=SQLFORM.factory(
Field('what',widget=SQLFORM.widgets.
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 sites will be half the fun... I hope
On Apr 13, 8:16 pm, Jason Brower wrote:
> It's great to see you using web2py!
> I am also working to
86 matches
Mail list logo