Sorry for the necro but I just came across this myself and was surprised to
see that the otherwise argument only works when the user cannot be
authenticated. Any chance on changing this so that the 'otherwise' argument
allows you to redirect if 'condition' fails as well?
On Wednesday, September
the validations puts it:
db.project.company_name.requires = IS_IN_DB(db, 'company',
'%(company_name)s')
ok!!
Ovidio Marinho Falcao Neto
ITJP.NET.BR
ovidio...@gmail.com
83 8826 9088 - Oi
83 9336 3782 - Claro
Do not understand. Can you show an example?
On Sunday, 1 September 2013 01:40:25 UTC-5, אבי אברמוביץ wrote:
>
> Hi,
> I understand the url structure: app/function/view
> but assuming I have a list of items on the view, How do I get to a view
> page for each one of them and where can I build that
On Sunday, September 1, 2013 3:56:15 AM UTC-7, Ovidio Marinho wrote:
> the validations puts it:
>
> db.project.company_name.requires = IS_IN_DB(db, 'company',
> '%(company_name)s')
>
First, you'll get that validator by default, so no need to specify it
explicitly. Second, in terms of display, t
Given the field definition:
Field('company_name', 'reference company', notnull=True)
and the fact that the db.company table has a "format" attribute, you will
get a default "represent" attribute for the db.project.company_name field
that displays the company name rather than its record ID. Howe
You could use a URL arg to identify specific items and trigger a
single-item display when present:
def myitems():
item = get_my_item(request.args(0)) if request.args else None
item_list = generate_list() if not request.args else None
return dict(item=item, item_list=item_list)
{{if i
Hi Anthony,
Thanks for that tutorial :).
I also tried the other method ( In a bit different syntax though: "projects
= db(db.project).select()") , this is a better method (than the sql one)?
On Sunday, September 1, 2013 12:25:32 AM UTC+3, אבי אברמוביץ wrote:
>
> Hi,
> I do this query:
> items =
>
> I also tried the other method ( In a bit different syntax though:
> "projects = db(db.project).select()")
>
Note, db().select(db.project.customer_name) will retrieve only the
customer_name field for each record from the database, so it is more
efficient if that is the only field you need.
Hello Demetrio,
sorry for the late response. Could you please resend your patch, make sure
it applies to trunk, and use "." instead of "app_name"?
On Thursday, 29 November 2012 06:17:22 UTC-6, demetrio wrote:
>
> Hi everyone I post a reply in the web3py thread in this mailing list
> asking for
> Using the DAL for selects can make things easier, though using executesql
> can be a bit faster (especially for large numbers of recrods) because it
> doesn't parse the results into a Rows object (of course, then you lose the
> benefits of working with Rows and Row objects).
>
Of course, th
>
> ... First we would need to enable the json package list controller at
> web2pyslices. I thought I had implemented it but currently it doesn't seem
> to work (returns null where it should return a json list of packages).
>
I have added an experimental package info service at web2pyslices:
Great, thanks.
On Sunday, September 1, 2013 9:40:25 AM UTC+3, אבי אברמוביץ wrote:
>
> Hi,
> I understand the url structure: app/function/view
> but assuming I have a list of items on the view, How do I get to a view
> page for each one of them and where can I build that page template?
> Thanks.
Hi,
I am fairly new to web2py. For starters, I have a table, which contains a
filed called the "Youtube Link", and all I want to do is:
http://www.youtube.com/embed/x1w8hKTJ2Co"; frameborder="0"
allowfullscreen>)
Instead of hardcoding the youtube video itself, I want it to pick up the
link fr
Possibly in the controller:
video_url = db([query for record]).select().first().youtube_link
Then in the view:
Anthony
On Sunday, September 1, 2013 11:35:07 AM UTC-7, Arjit Srivastava wrote:
>
> Hi,
>
> I am fairly new to web2py. For starters, I have a table, which contains a
> filed cal
You can add some logic in the layout.html, if I understand correctly you
want to disable the navbar in some views?
{{if not 'navbar_disable' in globals():}}
{{='auth' in globals() and
auth.navbar(mode="dropdown") or ''}}
{{pass}}
and then pass navbar_disable in the controller.
return dict(me
Thanks for the reply !!
I solved it by creating a function in the model and by setting a variable
in the auth object.
The code:
auth.settings['navbar_disable'] = False
onavbar = auth.navbar
def nav_bar(**kargs):
if auth.settings['navbar_disable']:
return False
else:
return
I spent weeks on the following problem. Your guidance & insight will be
invaluable!
How to create a
single C
ompose form that will take all the needed parameters – *Including* *
Attachments* –
and send the Email via SMTP server or Save the Email to IMAP server?
The following code was t
Alright, thanks.
What is a better practice, to create the query on the controller, pass the
list var to the view and there just display for example 30 times, or for
example create a 1, 30 range loop on the view, and create the query
directly there?
On Sunday, September 1, 2013 12:25:32 AM UTC+
18 matches
Mail list logo