Hi Johann and Anthony,
Thanks for your replies. Problem solved.
Kind regards,
Annet.
Massimo,
The web2py in trunk han applications/welcome/views/generic.ics that makes
the calendar. It contains an example. Add to your table two virtual fields
(start_datetime, stop_datetime) and it should work.
I'll give this solution a try.
In my application I have a generic.vcf file,
Cliff
By adding the 'null' to the 'purchase_order_id' in the product_lots table,
you automatically achieve it - that is, if the field is declared as Null,
foreign key constraint is applicable only if it is non-null and a null
value will automatically skip validation for foreign key.
Another
On 20 April 2012 03:07, Jim Steil j...@qlf.com wrote:
No, I'm looking for a list of user ids. I don't want to filter by user
id.
In [25]: reds = [x.id for x in db((db.auth_user.id ==
db.auth_membership.user_id)(db.auth_group.id ==
db.auth_membership.group_id) (db.auth_group.role ==
100% agree,
naming convention + more features that's why I prefer bootstrap over
foundation
On Fri, Apr 20, 2012 at 8:55 AM, Annet anneve...@googlemail.com wrote:
I had a look at both Foundation and Bootstrap 2 weeks ago and decided to
use Bootstrap (by the way, they're both not pure css).
Thanks for the bootstrap css and js in the trunk. I am trying it out and
found a problem when used with the grid:
div class=web2py_grid ui-widget
div class=web2py_console ui-widget-header ui-corner-top
form method=GET enctype=multipart/form-data action=
I just wanted to confirm with you guys...
According to this page there is a way to send emails in a que.
http://web2py.com/books/default/chapter/29/8?search=cron
Does this work in Google App Engine?
BR,
Jason
i create reagister form using auth_user but unable to create a manual login
form by which we login.please anyone help me.
I'm using the following function from the documentation for a RESTful web
service
def POST(table_name,**fields):
string =
if table_name == 'person':
for key in fields:
string = string + another keyword arg: %s: %s % (key,
fields[key])
Hi,
New to web2py and having trouble with simple HTML in a view. In my
default/index.html:
{{=IMG(_src=URL('static','images/map420x200.png'))}}
img src=static/images/map420x200.png style=border: 2px; width:420px;
height:200px;/
The first line works, rendering the map png. However, the second
To insert an image here is the url to use
img src= /application_name/static/images/map420x200.png /
or
URL('static', args='images/map420x200.png')
or simply
URL('static', 'images/map420x200.png') since its only one argument.
from the book : http://web2py.com/books/default/chapter/29/4#URL
1.
On 20 April 2012 09:19, Simon Pickles sipick...@gmail.com wrote:
Hi,
New to web2py and having trouble with simple HTML in a view. In my
default/index.html:
{{=IMG(_src=URL('static','images/map420x200.png'))}}
img src=static/images/map420x200.png style=border: 2px; width:420px;
yes I know this problem for a long time, would be nice if this would be
fixed. I guess right now the problem is that the whole ticket display fails
if one ticket is corrupted. I think this could be quickfixed by a simple
try catch block around the deserialization of each ticket pickle file.
On
To this list of 4 elements can we add a 2 other elements ?
- 5 lower the learning curve as much as possible for actual web2py users
- 6 make the theming framework optional or choosable or modular (choose
what you need from it)
It would be super fantastic to see something like : choose
these stuff come by default built into web2py you just enjoy using them
(you can style them if you want),
look at the AUTH section in the book or google for customize login form in
web2py for more info
On Fri, Apr 20, 2012 at 10:23 AM, Sonu Srivastava
sonu.srivast...@zero-group.com wrote:
i
Thank you, Sundar.
I understand. This solution means I relinquish the foreign key constraint
on the product_lots table.
It does seem simpler than using another table for raw materials.
No third alternative, I guess...
On Friday, April 20, 2012 2:37:38 AM UTC-4, Sundar wrote:
Cliff
By
Is this what you want?
Table | column count
---
dog | 3
---
car | 3
---
This will get the data.
For table in db.tables:
column_count = 0
for field in table.fields
column_count += 1
print table.name
print
Not directly. You can't execute scripts on GAE, so you would have to move
the checking/sending code into a controller function and set up the GAE
cron to call it periodically.
However, it might be easier to use the GAE queues and to delegate e-mail
sending to a background task:
def login():
return dict(form=auth.login())
/default/login.html:
{{extend 'layout.html'}}
{{[custom form code goes here]}}
What exactly are you trying to do?
Anthony
On Friday, April 20, 2012 6:23:41 AM UTC-4, Sonu Srivastava wrote:
i create reagister form using auth_user but unable to
How do you post it? I'm guessing this is the part that needs fixing.
Try db.EventList.startDate.represent = lambda v: v.strftime('%d/%m/%Y') or
None
Note, that will still generate an error if v is None -- you have to first
check for v before applying the strftime method to it.
Anthony
I would just queue the image processing task (using GAE queue) to have the
work done in the background. Doing it right when the form is submitted is
possible too but will cause delays to the user.
You could insert a logo by converting the image into uncompressed format
(e.g. bmp), modifying
Hi,
I've worked out how to remove the 'forget username?' and 'Retrieve
Password' entries from the navbar by editing gluon/tools.py, and restarting
server.
This seems a bit severe, altering web2py source code. I imagine my changes
will be overwritten at next update.
Is there a way to do it in
Further information: This happens only with SQLFORM.grid and not with
SQLFORM.smartgrid. I have tested it on a new app using using the css and
js and layout.html from the welcome app.
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you.
OK, so if I define the list of function, the situation is clear. If I don't
and I want to pass arguments to the default function I need to use the
default function name (/default_function/arg). Arguments alone (/arg) in
that case would be treated as if it is a function name (even if it does not
Thanks I suspected my path was a little wrong.
Still got the problem that the image border appears then whole thing
vanishes.
On Friday, 20 April 2012 08:19:23 UTC+1, Simon Pickles wrote:
Hi,
New to web2py and having trouble with simple HTML in a view. In my
default/index.html:
Not sure if 'relinquish' is the right word since the foreign constraint is
going to be enforced if you enter a value for the PO. (May be my statement
was a little confusing).
Please see the example:
Create Table t1(a int primary key)
Create table t2 (b int primary key, ba null references
On Apr 20, 2012, at 6:20 AM, Wikus van de Merwe wrote:
OK, so if I define the list of function, the situation is clear. If I don't
and I want to pass arguments to the default function I need to use the
default function name (/default_function/arg). Arguments alone (/arg) in that
case would
That's not quite it either. This is checking for a group 'role' as
opposed to looking for all users that have a specific permission
(auth_permission).
-Jim
On 4/20/2012 2:27 AM, Johann Spies wrote:
On 20 April 2012 03:07, Jim Steil j...@qlf.com mailto:j...@qlf.com
wrote:
No, I'm
On Apr 20, 2012, at 6:24 AM, Simon Pickles wrote:
Thanks I suspected my path was a little wrong.
Still got the problem that the image border appears then whole thing vanishes.
Assuming that your app is set as the default, try:
img src=/static/images/map420x200.png style=border: 2px;
On 20 April 2012 15:37, Jim Steil j...@qlf.com wrote:
That's not quite it either. This is checking for a group 'role' as
opposed to looking for all users that have a specific permission
(auth_permission).
Then adapt it. Determine the group name that have the specific permission
and from
Looks like a bug that was introduced -- the code was CAT(INPUT(...),
DIV(...), SCRIPT(...)), but the CAT was dropped, so instead of returning a
helper object, it is now returning a tuple of helpers, which doesn't get
serialized properly.
Maybe read in this chapter :
http://web2py.com/books/default/chapter/29/5?search=auth_nav
On Fri, Apr 20, 2012 at 9:15 AM, Simon Pickles sipick...@gmail.com wrote:
Hi,
I've worked out how to remove the 'forget username?' and 'Retrieve
Password' entries from the navbar by editing
I've worked out how to remove the 'forget username?' and 'Retrieve
Password' entries from the navbar by editing gluon/tools.py, and restarting
server.
This seems a bit severe, altering web2py source code. I imagine my changes
will be overwritten at next update.
Is there a way to do it
Thanks Johann
Had to modify to also add (db.auth_group.id==db.auth_membership.group_id)
db((db.auth_user.id==db.auth_membership.user_id)(db.auth_group.id==db.auth_permission.group_id)(db.auth_permission.name=='load')).select(db.auth_user.id,
distinct=True)
Thanks again for getting me down
In a view with tabs I have the following tab-pane:
{{if vevent.event_list:}}
div id=eventlist class=tab-pane
div class=row-fluid
div class=span12
{{=LOAD('calendar','eventList.load',args=int(organization.nodeID),ajax=True,target='eventlist')}}
/div!-- /span --
def event():
response.view='calendar/event.html'
row=db(db.EventList.id==request.args(0)).select(db.EventList.ALL)
row is actually a DAL Rows object -- if you want a Row object, you have to
select a specific row. Try:
row=db(db.EventList.id
http://bootswatch.com/#gallery
Like your answers Anthony :)
Richard
On Fri, Apr 20, 2012 at 10:39 AM, Anthony abasta...@gmail.com wrote:
I've worked out how to remove the 'forget username?' and 'Retrieve
Password' entries from the navbar by editing gluon/tools.py, and restarting
server.
This seems a bit severe, altering
On 20 April 2012 16:05, Anthony abasta...@gmail.com wrote:
Looks like a bug that was introduced -- the code was CAT(INPUT(...),
DIV(...), SCRIPT(...)), but the CAT was dropped, so instead of returning a
helper object, it is now returning a tuple of helpers, which doesn't get
serialized
I posted the following problem:
https://groups.google.com/forum/?fromgroups#!topic/web2py/vm3WwFamfXQ
This is part of a problem I have been working on for a couple of they. I
have two functions:
def eventList():
response.view='calendar/eventList.html'
rows=db(...).select()
return
http://markitup.jaysalvat.com/downloads/demo.php?id=markupsets/markmin
I defined a table eventList:
db.define_table('EventList',
...
Field('description',type='text'),
Field('shortdescr',length=128,writable=False,readable=False),
migrate=False)
db.EventList.description.requires=IS_LENGTH(1536,error_message='length
exceeds 1536 characters')
Dear ALL,
How can i use ajax in a a href=/a to post some vars to a controller
function ??
Best Regards,
I think you can't use compute since you modify a field where the user as to
enter something base on the len of user input, so I think you should
transform the code below into function and use onvalidation=function
x=len(form.vars.description)
if x128:
i=128
dots=...
else:
i=x-1
Also, you could maybe search the book with truncate keyword, there is
already a utility if you just want to control the lenght of free text field
or other string field.
Richard
On Fri, Apr 20, 2012 at 11:35 AM, Richard Vézina
ml.richard.vez...@gmail.com wrote:
I think you can't use compute
http://web2py.com/books/default/chapter/29/6
{{extend 'layout.html'}}
h1Records/h1
{{=SQLTABLE(rows,
headers='fieldname:capitalize',
truncate=100,
upload=URL('download'))
}}
Richard
On Fri, Apr 20, 2012 at 11:42 AM, Richard Vézina
ml.richard.vez...@gmail.com wrote:
Also, you
Dear ALL ,
I am using a master page , now how can i let every page has its own title
tag ??
Best Regards,
Assuming you have something like this in your layout.html head:
title{{=response.title}}/title
you just have to set the value of response.title separately for each page.
You could do this in the controller, or in the view before the {{extend
'layout.html'}} directive:
def mypage():
Assuming the ajax() function does what you want (see
http://web2py.com/books/default/chapter/29/11#The-ajax-function), you can
put it in an onclick handler:
a href= onclick=ajax('{{=URL(controller, function)}}', [...],
'target'); return false;click here/a
Anthony
On Friday, April 20, 2012
I'd probably use a function or virtual field for that, not store it in DB.
And it could be cleaned up a bit. Something like:
def trunc_desc(s)
if len(s) 128:
return s[:128] + '...'
return s
+1
On Friday, April 20, 2012 11:24:26 AM UTC-4, Massimo Di Pierro wrote:
http://markitup.jaysalvat.com/downloads/demo.php?id=markupsets/markmin
I ended up just coding my own navbar and sticking it in a function in
models. Now that I look at it, I probably should have used URL()s.
def user_bar():
action = '/user'
if auth.user:
logout=A('logout', _href=action+'/logout')
profile=A('profile', _href=action+'/profile')
On Friday, April 20, 2012 11:08:50 AM UTC-4, Johann Spies wrote:
On 20 April 2012 16:05, Anthony abasta...@gmail.com wrote:
Looks like a bug that was introduced -- the code was CAT(INPUT(...),
DIV(...), SCRIPT(...)), but the CAT was dropped, so instead of returning a
helper object, it is
Even when using img tag, best to use URL() function for the src url.
That is close to what I need guys, but I should have made a better example.
I have a legacy database called my_legacy_db which is separate from the
normal db.
my_legacy_db
users
- email
- username
- name
So cliff, your first part would work to
Hello,
I've got the following table:
db = DAL('sqlite://storage.sqlite')
db.define_table('variable',
Field('name', type='string', length=255),
Field('value', type='string', length=255),
format='%(name)s',
primarykey=['name'])
This
Hi all,
I'm trying to use extensively the scheduler for an application.
There are a few things I can't wrap my mind around the first, simplest,
is how to setup DEBUG logging level on the scheduler when started as
python web2py.py -K appname
Second, and there's the advanced part,
There will be a 5th edition.
On Thursday, 19 April 2012 09:43:28 UTC-5, Gour wrote:
On Thu, 19 Apr 2012 06:21:46 -0700 (PDT)
Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
No because most of what is in 2.0 is already in trunk and partially
documented in the book.
Good.
Do you
db(db.legacy-db.table).select()
I think you are forgetting db. in front of table name.
Do you use a custom search_menu or do you call it explicitly? Yes the API
for this thing have changed (for the better). This was clearly marked in
the book as an experimental feature. If you show us your code, I can tell
you now to adapt it. Yet, without seeing your code I can not 100% sure
Hi
I include a css file called custum.css in the layout. I wanted to do a
little adjustment to one page included in the layout.html
When I use the css directly on the page which is included in the
layout.html it wokrs without a problem. but when I move the css to the
custum.css file it doesn't
Hi Group,
I have something like the following in a model:
def grant_permissions(form):
group_id = auth.id_group(role=request.args(0))
auth.add_membership(group_id, auth.user.id)
auth.settings.register_onaccept.append(grant_permissions)
Basically, I want to assign a user to a group
On Fri, 20 Apr 2012 13:20:39 -0700 (PDT)
Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
There will be a 5th edition.
Thank you.
Sincerely,
Gour
--
You have a right to perform your prescribed duty, but you
are not entitled to the fruits of action. Never consider
yourself the cause of
On Thursday, April 19, 2012 7:08:06 PM UTC-4, Ricardo Pedroso wrote:
I post a comment on this issue:
http://code.google.com/p/web2py/issues/detail?id=731#c4
I think this is not a bug but an incorrect use of the dal api.
Ricardo, thanks! That is indeed the problem. Whether or not it is a
Thanks for the suggestion, Anthony.
When you said '*an argument* of the verify_email_onaccept callback', you
meant an argument of the callback function supplied to
auth.settings.verify_email_onaccept
, right? My understanding is that you provide a callback function to
Web2py, which is going
When you said '*an argument* of the verify_email_onaccept callback', you
meant an argument of the callback function supplied to
auth.settings.verify_email_onaccept
, right? My understanding is that you provide a callback function to
Web2py, which is going to be called upon the acceptance
The new user id should be in form.vars.id as well as session.auth.user.id
at that point.
Is there a potential security problem here -- what would prevent someone
from manually altering the first arg in the URL to any arbitrary group
(e.g., admin)? Perhaps you should check the value of
Your browser may be caching the CSS files (and other static files). Try
clearing the cache.
Anthony
On Friday, April 20, 2012 4:31:50 PM UTC-4, BlueShadow wrote:
Hi
I include a css file called custum.css in the layout. I wanted to do a
little adjustment to one page included in the
Thanks all
On Apr 20, 2012 5:21 PM, pbreit pbreitenb...@gmail.com wrote:
I ended up just coding my own navbar and sticking it in a function in
models. Now that I look at it, I probably should have used URL()s.
def user_bar():
action = '/user'
if auth.user:
Thanks
Nice to see web2py has a helpful and lively community
On Apr 20, 2012 2:24 PM, Simon Pickles sipick...@gmail.com wrote:
Thanks I suspected my path was a little wrong.
Still got the problem that the image border appears then whole thing
vanishes.
On Friday, 20 April 2012 08:19:23
Does web2py have any built in support for country lists, the drop down list
you use while entering an address?
Thx
The new user id should be in form.vars.id as well as session.auth.user.id at
that point.
Thanks Anthony. But is this documented anywhere in the manual or in any doc
of Web2py? Otherwise, it is really difficult for users to figure this out
without consulting experts like you.
You second
On Friday, April 20, 2012 6:28:45 PM UTC-4, cyan wrote:
The new user id should be in form.vars.id as well as session.auth.user.id at
that point.
Thanks Anthony. But is this documented anywhere in the manual or in any
doc of Web2py? Otherwise, it is really difficult for users to figure
Take a look on
http://www.web2pyslices.com/slice/show/1378/ajax-live-search-auto-complete
El Fri, 20 Apr 2012 23:28:15 +0100
Simon Pickles sipick...@gmail.com escribió:
Does web2py have any built in support for country lists, the drop
down list you use while entering an address?
Thx
Its come by default with web2py so why you want to use manual login can
you explain ? You have to customize it according to your requirements.
On Friday, April 20, 2012 3:53:41 PM UTC+5:30, Sonu Srivastava wrote:
i create reagister form using auth_user but unable to create a manual
login
I have a 'registered' page/action which immediately follows 'register'
page/action, and I would like to prevent someone who is currently on the
'register' page to jump to 'registered' page by directly changing the URL
(even if all the fields including email etc are filled), instead of
Hi Anthony,
Ough, it must have been my focus on the modal window that made me overlook
this :-(
Thanks for your reply.
Kind regards,
Annet.
row is actually a DAL Rows object -- if you want a Row object, you have to
select a specific row. Try:
row=db(db.EventList.id
I figured out part of the problem. It's not win32con, it's win32file that's
not importing. I'm disabling cron locally, and I posted a question on
StackOverflow in case anyone wants to try and decipher this mystery
(http://stackoverflow.com/questions/10256531/using-eclipse-with-pywin32).
On
In other words, I use
session.email
to test whether user gets to 'registered' page after the register form is
successfully processed or not. However, it seems that 'registered' function
is called before 'register' form is fully processed (i.e. 'session.email'
gets set), so that user
80 matches
Mail list logo