> and also uwsgi --version doesn't give the version but tells that there
> is an error
>
This could only be generated by a wrong compiled-binary (maybe a make
without a make clean after some config changes).
--version triggers only a fprintf() on a fixed binary blob, so if it fails
something rea
I am passing a dictionary to template. Each dictionary value is
True or False and I want to check it value in the template.
{{=default_fields['job_title']}} renders to "True"
but this construct is returning "SyntaxError: invalid syntax":
{{ if {{=default_fields['job_title']}}: }}
{{ pass }}
H
{{=myvariable}} outputs myvariable to the page. You just need to refer
to the variable. Here is an example:
{{if default_fields['job_title']:}}
the job title is {{=default_fields['job_title']}}
{{pass}}
The first one checks the value. The second outputs to the page.
On Nov 27, 9:22 am, Constanti
but the binary works as it executes web2py and website works but doesn't
allow me to login (without showing errors)
and my flex app shows the error that I wrote before,
and --version shows this error
./uwsgi --version
uWSGI 1.0-dev
*** glibc detected *** ./uwsgi: free(): invalid pointer: 0x099204e
I know we had this discussion about a year ago and Bruno et al wrote their
own code and proposed patches to try and get around this limitation, which
also limits the usefulness of SQLTABLE.
I just wondered if we had any new methods or techniques to add columns etc
to the rows object.
Thanks,
Virtual fields can already be added to Rows
objects: http://web2py.com/book/default/chapter/06#Virtual-Fields.
Also, SQLTABLE takes an 'extracolumns' argument, like this:
extracolums = [{'label':A('Extra',_href='#'),
'class': '', #class name of the header
Hi, I am trying to use PostgreSQL DAL interface with my project, but
i'm having trouble with table references and insert/update/delete
commands.
The system info:
OS: GNU/Linux, web2py 1.99.2, PostgreSQL 8.4
I have tried the workaround posted by pbreit for a very similar
problem:
http://groups.goo
I am trying to use the suggest widget plugin, but am getting an error on
the import.
from plugin_suggest_widget import suggest_widget
db.auth_user.org_ref.widget = suggest_widget(db.org.name,
limitby=(0,10), min_length=1)
and get the error:
Traceback (most recent call last):
File "
I have tried to start the shell through windows dos prompt by typing:
python web2py.py -s test -m
and i get this: python cant open file web2py.py no such file or
directory
not sure why i cannot get this working.
Thank you!
>
>
>
> and i get this: python cant open file web2py.py no such file or
> directory
>
> It seems that you're not inside web2py directory
Are you in the folder wher you have installed web2py?
Kenneth
I have tried to start the shell through windows dos prompt by typing:
python web2py.py -s test -m
and i get this: python cant open file web2py.py no such file or
directory
not sure why i cannot get this working.
probably there is an error in the plugin module.
the error can be in syntax or importing something inside the module.
check if the plugin is not trying to import another module.
I often have problems like that when there is some errors ij module.
http://zerp.ly/rochacbruno
Em 27/11/2011 12:47,
Thanks Anthony.
Is Skeletion configured by default when a new application is created
or it's just in this welcome app?
Thanks,
VP
On Nov 26, 10:35 pm, Anthony wrote:
> On the server side, request.user_agent() returns info about the user agent,
> and request.user_agent().is_mobile indicates whe
Hi massimo and everyone,
Hope everyone is doing fine.
With support for Pyjamas, Massimo must have thought of this, but for
some reason I feel something ain't right with the Pyjamas' approach.
I have just realised that there has been massive amount of effort
dedicated to client-side processing in
When using SQLFORM.grid, the message:
'%(nrows)s records found'
is never translated and it fills the language/lang.py file with
untranslated strings whenever the number of rows change.
Changing in gluon/sqlhtml.py, in the grid static method, the line:
message = error or T('%(nrows)s records foun
The 'welcome' app is the foundation for any new app created via 'admin', so
yes, you'll get the Skeleton scaffold for any new app. Note, this is
currently only in trunk -- I believe Massimo is planning the next release
very soon.
Anthony
On Sunday, November 27, 2011 11:45:47 AM UTC-5, VP wrote
I am following the example to make my own custom form
design:
http://www.web2py.com/book/default/chapter/
{{=form.custom.begin}}
Image name: {{=form.custom.widget.name}}
Image file: {{=form.custom.widget.file}}
Click here to upload: {{=form.custom.submit}}
{{=form.custom.end}}
Generated HTML is
In the controller or view, you should be able to do:
form.custom.submit['_data-theme'] = 'e'
or
form.custom.submit.update(**{'_data-theme': 'e'})
form.custom.submit is just an INPUT helper, so you can add additional
attributes to it like any html helper object.
Anthony
I must be missing something, i have always run web2py by downloading
and extracting to a directory. i then double click the web2py.exe and
it starts the server, but i cannot ever get the shell to work, so that
i can practice with the DAL. is there more to installing it then
this?
Thank you, this was so simple!
I tried adding custom links to the SQLFORM.grid and it works great. This
functionality can be used to add a custom column indeed, although I feel it
isn't best suited to do so... I mean, it can be used like this but than it
might be needed to disable those standard links (edit, etc.) there or th
Hi Anthony,
Thanks for that, I couldn't remember about the 'extracolumns' and I don't
think they were in the book yet (unless just recently).
With regards the virtual fields, I was still struggling with including the
virtualfields when limiting columns.
This works fine:
>>>rows = db(db.tabl
I want to change auth_user first_name and last name
progrmmaically having the user id:
I tried this:
db.auth_user[id] = dict(first_name=first_name)
db.auth_user[id] = dict(last_name=last_name)
but when reaching this statement in my db.py file I don't see
auth updated:
db = D
On Sun, 2011-11-27 at 12:13 -0800, chawk wrote:
> I must be missing something, i have always run web2py by downloading
> and extracting to a directory. i then double click the web2py.exe and
> it starts the server, but i cannot ever get the shell to work, so that
> i can practice with the DAL.
Any of these will work:
db.auth_user[id] = dict(first_name=first_name)
db.auth_user[id].update_record(first_name=first_name)
db(db.auth_user.id==id).update(first_name=first_name)
the problem is (I believe) that auth caches the current logged in user
in session.auth.user==auth.user so you also nee
Hi list,
I have released a small PKI implementation for those who need to start
with web2py + SSL/TLS + x509.
At the moment the documentation is 0, but it is quite simple so anyone
that has some knowlege of PKI can try to use it.
Please note that today it is still very basic and too young to be th
I don't understand, i am using windows 7, python 2.7, python is added
to my enviroment variables, I even downloaded another copy of web2py,
extracted it to the c directory, i cd into web2py directory, i ran the
exact thing shown and i get the error:
python: cant open file 'web2py.py' : [Errno 2
On Sun, Nov 27, 2011 at 5:23 PM, chawk wrote:
> I don't understand, i am using windows 7, python 2.7, python is added
> to my enviroment variables, I even downloaded another copy of web2py,
> extracted it to the c directory, i cd into web2py directory, i ran the
> exact thing shown and i get the
Don't download the Windows version -- it has it's own Python 2.5
interpreter. Instead, download the source version -- that will run with
your own Python 2.7 installation.
Anthony
On Sunday, November 27, 2011 5:23:47 PM UTC-5, chawk wrote:
>
> I don't understand, i am using windows 7, python 2.7
Thanks Anthony!
that was the problem, i was not aware that python 2.5 comes with the
standard web2py version.
i downloaded the source and the problem is solved.
Hi Massimo,
It worked, the cache was the issue. Also is it possible to
update both first and last name in batch? This is a general question
how can the database fields can be updated in one operation?
Thank you, the framework is excellent!
http://rawsyntax.com/blog/the-problem-with-micro-frameworks/
:-)
On Nov 27, 4:18 pm, Michele Comitini
wrote:
> Hi list,
>
> I have released a small PKI implementation for those who need to start
> with web2py + SSL/TLS + x509.
> At the moment the documentation is 0, but it is quite simple so anyone
> that has some knowlege of PKI can try to use it.
> Pleas
Any of these will do:
db.auth_user[id] =
dict(first_name=first_name,last_name=last_name) db.auth_user[id].update_record(first_name=first_name,last_name=last_name) db(db.auth_user.id==id).update(first_name=first_name,last_name=last_name)
On Nov 27, 5:51 pm, Constantine Vasil wrote:
> Hi Massimo,
>
I have some price fields specified as type 'decimal'. But am finding that I
have to cast to 'float' do do any math (or the other to decimal.Decimal I
guess).
This seems cumbersome. Is 'decimal' the best field type for storing
financial amounts that will be involved in math calculations?
You should not need any casting to do math computations. Can you
provide an example of what you do, perhaps something does not behave
as intended.
On Nov 27, 7:33 pm, pbreit wrote:
> I have some price fields specified as type 'decimal'. But am finding that I
> have to cast to 'float' do do any ma
I am using SQLFORM.factory to set several fields and a custom form
setting a radio boxes like this:
I want the code
if form.process(formname='myinfo').accepted:
to be able to check if "id_email_home_ch" is checked or not, but this
id does not appear in form.vars
How to do that?
Hi: I downloaded Pyforums in order to study some code in what looks like a
very well done application. When I try to look at the default index view I
get the following error:
1.
2.
3.
4.
5.
6.
7.
Traceback (most recent call last):
File "gluon/restricted.py", line 194, in restricted
File "
in SQLFORM.factory I have defined a radio check box.
Field('primary_email_choice_new', widget=SQLFORM.widgets.radio.widget,
requires=IS_IN_SET({'Work' : 'Work', 'Home' : 'Home'})),
It shows on the form but I need to set it checked="yes" one of the values.
The ge
Good point. Maybe submit an issue on Google
Code: http://code.google.com/p/web2py/issues/list
On Sunday, November 27, 2011 3:58:37 PM UTC-5, villas wrote:
>
> Hi Anthony,
>
> Thanks for that, I couldn't remember about the 'extracolumns' and I don't
> think they were in the book yet (unless just
Try:
Field('primary_email_choice_new', widget=SQLFORM.widgets.radio.widget,
requires=IS_IN_SET({'Work' : 'Work', 'Home' : 'Home'}), default='Home')
Also, I think it's checked="checked", not checked="yes".
Anthony
On Sunday, November 27, 2011 9:59:30 PM UTC-5, Constantine Vasil wrote:
>
> in
form.vars will include the input field name, not id. Radio buttons will
have the same name, and that name should be in form.vars, with the value of
the particular radio button selected. Note, you may need to change the name
to 'primary_email_choice' so it can be used as a Python identifier.
Ant
Similar points
here:
http://www.reddit.com/r/Python/comments/f8so6/best_framework_for_gae/c1ebgn0
HI Anthony,
Thank you!
This is useful information not available in the book.
Now I would define the default in the form definition:
form = SQLFORM.factory
How to change it programmatically to other checked
value before the form is submitted?
This can be needed for a reason as I do - because
Basically I reverse engineered the HTML generated from web2py and
came with the following solution:
In SQLFORM.factory I have this definition:
Field('*primary_email_choice*', widget=SQLFORM.widgets.radio.widget,
requires=IS_IN_SET({'Work' : 'Work', '*Home*' : 'Home'})),
So in the HTML id="*primar
Hi,
For the Wiki Tutorial, In the show(): controller in default.py there
is the following statement:
db.comment.page_id.default = this_page.id
I can't quite figure out what it means. Are we setting the default
value of the page_id field for the comment table to be 'this_page.id"?
However, in thi
> This works fine:
>
> >>>rows = db(db.table.id>0).select()
> >>>for row in rows: print row.myvirtualfield
that is because the row.myvirtualfield is computed AFTER the sql
select
> But this does not:
> >>>rows = db(db.table.id>0).select(db.table.id, db.table.myvirtualfield)
because there is no s
In http://www.web2py.com/book/default/chapter/06?search=form.process
ret = db(query).vaidate_and_update(field='value')
should probably be
ret = db(query).validate_and_update(field='value')
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise
On 27 November 2011 16:28, Alan Etkin wrote:
> psycopg2.ProgrammingError: relation "debugging_id_seq" does not exist
Maybe a typo somewhere where debugging_id_seq should be debugging.id_seq?
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise
The complete commented code is:
def show():
> "shows a wiki page"
> * # request.args(0) should receive an ID for the page you want to
> 'whow'
> # you query the database to fetch the page row*
> this_page = db.page(request.args(0)) or redirect(URL('index'))
>* # for this action
I could use some help. In trunk there is code for mobile admin.
That means that if you visit admin from a mobile device it will use
jquery.mobile. This is a work in progress and only some pages have
been implemented but you can help. It is easy.
In applications/admin/controllers/default.py there
In gluon/dal.py there is the following code:
def sequence_name(self,table):
return '%s_id_Seq' % table
is generates the default name of a sequence. if you have a sequence
already and it has another name use
db.define_table(...,sequence_name = '...')
On Nov 28, 12:16 am, Johann Spies wr
Hi,
I am trying to solve a problem (all day long and I cannot find the source
of this)
I have a comment form in a page, also I have another page with edit form,
and one with create form.
Every form works ok with Google Chrome, I also tested in Midori and
Safari(running on wine) and it works ok.
Great!
I'll work on it a soon as possible!
Are you using the Auto-initialization of form elements ?
Thanks!
2011/11/28 Massimo Di Pierro :
> I could use some help. In trunk there is code for mobile admin.
>
> That means that if you visit admin from a mobile device it will use
> jquery.mobile. T
55 matches
Mail list logo