can someone please consolidate my knowledge or tell me where in
documentation this is explained
the "first()" in this line below:
this_message = db(db.InternalMessage.id == request.get_vars.filter).select()
*.first()*
allows below to work in view:
{{=this_message.created_by.last_name}}
if th
Hi, I have a few questions regarding the design of my app:
-Let's say there are two types of users, "doctors" and "patients"; they
have different properties. For example, a patient will specify his height
and weight, but a doctor will not. I would like both patients and doctors
to have to be r
Are there reasons for not using a plain HTML page for user landing page and
having links from it to the w2p app?
Index.html would be normal HTML file, not within w2p
\...\web2py\applications\myProgram\views\default folder.
Main reason I'm considering this that carousel is easier to set up
I created a simple table that uses another table as a list of possible
values for a field:
db.define_table('country',
Field('name','string',length=DEFAULT_STRING_LENGTH))
db.define_table('company',
Field('name', 'string',
requires=IS_NOT_EMPTY(error_message=auth.messages.is_empty)),
Field('addre
Hi All,
I am very new to web2py and in general to web framework.
I am trying to read a db content from a remote machine, db is mysql, web2py
version 1.99.7 stable.
I have created a new simple application and added a model db1.py with:
legacy_db = DAL('mysql://username:password@my_server:3306/tim
Ok, I am unable to use the shell for checking out mysql db. I have the
mysqldb driver installed and it works properly when I edit the controller
and the model and can see the tables being created in mysql .. however when
i use the shell, it does not work.. here are the commands I gave at the
shell
On Jul 7, 2010, at 7:29 PM, Bruno Rocha wrote:
> Open a Python terminal, and try this example
>
d = {'id':1,'title':'web2py'}
d
> {'id': 1, 'title': 'web2py'}
"Title for id %(id)s is %(title)s " % d
> 'Title for id 1 is web2py '
Unfortunately, none of this explains how the label a
Open a Python terminal, and try this example
>>> d = {'id':1,'title':'web2py'}
>>> d
{'id': 1, 'title': 'web2py'}
>>> "Title for id %(id)s is %(title)s " % d
'Title for id 1 is web2py '
>>>
2010/7/7 Bruno Rocha :
> Take a look to the String Formating and String Interpolation in Python
> Documen
Take a look to the String Formating and String Interpolation in Python
Documentation
http://docs.python.org/library/stdtypes.html#string-formatting-operations
2010/7/7 ra3don :
> I apologize for a seemingly simple question, but what exactly does '%
> (title)s' do? I ran across it in the book in t
I apologize for a seemingly simple question, but what exactly does '%
(title)s' do? I ran across it in the book in the wiki section, the
whole line reads.
db.document.page_id.requires = IS_IN_DB(db, 'page.id', '%(title)s')
Thanks in advance,
ra3don.
10 matches
Mail list logo