As you said, it works again now, by setting: entity_quoting=False
Thanks Niphlod!
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this
I have the same problem with the CSV, HTML, TSV export buttons. The Ticket
for the CSV is pasted below. The problem at least with the csv export
button seems to be with the REGEX_TABLE_DOT_FIELD. Normally, this constant
is defined in regex.py as:
REGEX_TABLE_DOT_FIELD =
+1
By the way, is there a time frame for the 6th edition?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are
+1
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To
I have this function in my controller:
def help():
return
auth.wiki(render='markmin',menu_groups=['wiki_editor'],manage_permissions
=True)
and I have created some wiki pages.
After updating to 2.6.4 (from 2.5.1), I am getting this Ticket. How it
could be fixed??
Error ticket for myapp
Ok I sorted it out:
A new column has been added at the wiki_page table, and so *migrate *should
be set to *True*, at least at the first time after the upgrade as to get
DAL to change the table schema...
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
According to:
http://web2py.com/books/default/chapter/29/10/services#Restful-Web-Services,
for the given controller api() the following example should be working:
$ curl -d name=Tim http://127.0.0.1:8000/myapp/default/api/friend.json
{errors: {}, id: 1}
1. The first line I think it
This grid indicates that db.auth_user has a 'created_by' column. Is this
your case?
Anyway, trying your code at a different table having a 'created_by' column
worked fine to me (buttons Edit and Delete are there).
On Sunday, August 4, 2013 5:17:40 AM UTC+1, Alex Glaros wrote:
This looks
Just for the record, these two issues have been fixed at the latest
revision.
http://code.google.com/p/web2py/issues/detail?id=1530
http://code.google.com/p/web2py/issues/detail?id=1539
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To
of code:
*id, time_stamp, client_ip, user_id, origin, description*
84, 2013-04-11 12:26:41, 127.0.0.1, 9, auth, User 9 Logged-in
85, 2013-04-11 12:27:10, 127.0.0.1, 7, auth, User 9 is
impersonating 7
On Wednesday, April 10, 2013 5:07:54 PM UTC+1, Kostas M wrote:
Is the reversion back
Is the reversion back to the initial user working properly?
I can impersonate a user, entering a user id in the
http://.../user/impersonate form,
but when I go back to that form, and entering 0 , although it seems
momentarily to change the user name greeting in the upper right of the app,
if I
I have extended the auth_user table with an extra field:
auth.settings.extra_fields['auth_user']=[
Field('isactive','boolean', default
=True,
readable=False, writable=
False),
I have found web2admin very useful, especially looking at the way actions
are implemented in the first column of the table grid.
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To unsubscribe from this group and stop receiving emails from
Niphlod thank you very much for your reply.
I implemented the 2nd option you mentioned, using jquery to add a textarea
in the form tags. In the controller, I use the request.vars.textareaname
to retrieve the contents of the
textarea and then I insert them into the proper table. Just a thought:
I have implemented an SQLFORM.smartgrid with a selectable lambda function
for handling the rows the user has selected. The proper
action for the selected rows, is again selected by the user through an
'actions' pulldown menu on the first column of the table's header.
What I would like next, is
It seems that cascade deletion of uploaded files works fine only if there
is no definition of 'uploadfolder'.
At db.py
db.define_table('person',
Field('name', requires=IS_NOT_EMPTY(), required=True),
Field('nickname', 'string', required=True ),
format = '%(name)s'
)
def
OK, thanks, I think I have cleared up now how it goes.
--
OK fine, then why, in continuation of the above example,
def test():
grid = SQLFORM.smartgrid(db.person, linked_tables=['dog'], ondelete=dict
( dog=ondelete_test ))
return dict(grid=grid)
def ondelete_test(table_involved, id_of_the_deleted_record):
print table_involved
print
I still have problems with the SQLFORM.smartgrid callbacks. I don't
understand what is the correct usage of these functions. There are many
different conflicting examples in the wiki.
I define my ondelete callback:
ondelete=dict( samples=my_sample_delete )
and I define the function:
def
What I have found out about not firing at all is that in SQLFORM.smartgrid,
ondelete and oncreate callbacks should not be dictionaries!
Although the book says: All the arguments but the table, args,
linked_table and user_signatures can be dictionaries ..'',
and in my case e.g:
According to the book, in the DAL chapter, subtitle: 'before and after
callbacks', we can use:
db.person._before_delete.append(lambda s: pprint(s))
db.person._after_delete.append(lambda s: pprint(s))
where:
s is the Set object used for update or delete.
However,
def person_before_delete(s):
I have a hard time with these grid/smartgrid callbacks. Now regarding the
'create' option:
If I put grid = SQLFORM.smartgrid(db.mytable, ,create=False), then
correctly, the '+Add' button doesn't appear on the web application.
But if I put a lambda callback there:
grid =
The exact
phrasehttp://www.web2py.com/books/default/chapter/29/07?search=smartgrid#SQLFORM.grid-and-SQLFORM.smartgridis:
All the arguments but the table,
args, linked_tables and user_signatures can be dictionaries as explained
below.
What book are you looking at? I can't find that phrase
Sorry, I don't understand what you mean.
*ondelete* isn't supposed to take dictionaries in smartgrid, as editable and
deletable do?
On Monday, January 14, 2013 7:32:21 PM UTC, Derek wrote:
You must have missed this part:
The smartgrid takes the same arguments as a grid and some more with
Editable and deletable are functionalities also provided by *grid though*...
On Monday, January 14, 2013 7:45:45 PM UTC, Derek wrote:
ondelete is functionality provided by *grid* and not *smartgrid*. So the
documentation for *grid* applies, not the documentation for *smartgrid*.
--
Thanks for the clarification.
In my case, I have two tables:
db.define_table('analyses',Field('info'),Field('status')
db.define_table('samples',db.analyses,Field('sample_info')
and I use:
grid=SQLFORM.smartgrid(db.analyses,linked_tables=['samples'])
I want when the status of an Analysis is
Awesome!
(and I will keep repeating the mantra in my mind =) )
--
Fantastic!
And since we are on the topic, can we clarify also the use of dictionaries
for the callbacks in the case of smartgrid? Which options can take a dict
of functions, and which not? E.g. it seems ondelete can't take a
dictionary, while editable can:
Sorry about the duplicate posts... It seems they have been posted on the
mails, but still not appearing on the web interface...
I got all four copies, fwiw.
--
I see there are many questions on the workings of *ondelete* and
*oncreate*callbacks of the grid and smartgrid, but I can't find a valid answer.
The book says that all but *ondelete* take a form object as input.
Searching for answers in:
- grid/smartgrid ondelete
I see there are many questions on the workings of *ondelete* and
*oncreate*callbacks of the grid and smartgrid, but I can't find a valid answer.
The book says that all but *ondelete* take a form object as input.
Searching for answers in:
- grid/smartgrid ondelete
I have tried 4 times to post a question here regarding SQLFORM.grid, and
everytime I got a message 'The post was deleted'
What is going on?
--
I see there are many questions on the workings of ondelete and oncreate
callbacks of the grid and smartgrid, but I can't find a valid answer.
The book says that all but ondelete take a form object as input.
Searching for answers in web2py-user topics such as:
*grid/smartgrid ondelete issue*
I see there are many questions on the workings of ondelete and oncreate
callbacks of the grid and smartgrid, but I can't find a valid answer.
The book says that all but ondelete take a form object as input.
Searching for answers in web2py-users topics such as:
- *grid/smartgrid ondelete
(This is the 3rd time I am trying to post this question. For some reason
the message was deleted. Is using links in the message considered harmful?)
I see there are many questions on the workings of ondelete and oncreate
callbacks of the grid and smartgrid, but I can't find a valid answer.
The
I see there are many questions on the workings of ondelete and oncreate
callbacks of the grid and smartgrid, but I can't find a valid answer.
The book says that all but ondelete take a form object as input.
Searching for answers in web2py-users topics:
- *grid/smartgrid ondelete issue*
+1
--
IMHO, as I have said previously, it would be nice if the markmin to PDF
converter produced comparable layouts/fonts to the online version of the
book... The printed book, up to now, misses a lot of the pleasant and
appealing layout of the online version.
--
The same warning appears:
In [1]: from gluon.dal import DAL,Field
WARNING:root:Unable to import plural rules: No module named plural_rules
--
Trying to use DAL in my functional_tests.py (sitting in the application
directory), I get the following warning:
In [1]: from gluon import DAL
WARNING:root:Unable to import plural rules: No module named plural_rules
Furthermore, the db seems to be empty, although it has proper tables, as
seen
Thank you both, for the heads up!
As Niphlod have said at:
https://groups.google.com/forum/#!searchin/web2py/auto_import=True/web2py/bwCYiQcE59I/D1IkGFC55eEJ
* Remember that DAL does NOT introspect databases.*
Any hints on the Warning?
--
Thank you Massimo for the response.
os.environ[WEB2PY_USE_DB_TESTING]= 1
is the correct way to set env. variables, and modification of os.environ
affect both the running program and subprocesses created by Python (Python
essential reference 4th ed.).
In my case after all, both ways are
I am trying to set up an environment variable (lets say
WEB2PY_USE_DB_TESTING), so that in my db.py:
if not os.environ.get(WEB2PY_USE_DB_TESTING,None):
db = DAL('sqlite://storage.sqlite')
else:
db = DAL('sqlite://../fts/testdb.sqlite')
(as this resource points out:
I have a table Lab_members:
db.define_table('lab_members',
Field('member',db.auth_user,
represent=lambda member,row: str(member.username)
),
)
and now I create a second table, having a Field:
Thanks a lot Anthony! I think this should go to the book's documentation.
--
Massimo thank you for your response.
Unfortunately, I have not the traceback now, since I chose to build a
separate table, not referring to db.auth_group. This
is a kind of duplication in regards to auth_group, but it makes simple the
handling of my lab_members table:
I try to define a lab_members table:
from gluon import current
current.auth = auth
db.define_table('lab_members',
Field('lab', db.auth_group, label='Lab Name',
represent=lambda id,row: str(row.role)+' Lab',
Peter, I agree with you 100% regarding the ambiguous documentation, and the
lost time back and forth, among google searches and source code reading...
I am one of them!
Kostas
'These must point to the URL you want to redirect your users to after the
various possible auth actions (in
I have bought the (printed) web2py book (editions 3rd and 4th) from Lulu,
and my note is that the black white printouts are much less attractive
from
the web css book layout. The coloring helps understanding the syntax as
well. I wish the printed book could look as nice as the web version...
I
will keep the
current one.
On Nov 3, 6:59 am, Kostas M kmo...@hotmail.com wrote:
Omi,
Thanks for the hint!
I managed to adjust your solution to my case.
Also, I made some small recommendations, posted in web2pyslices.
On Oct 18, 9:00 pm, Omi Chiba ochib...@gmail.com wrote:
Kostas
will keep the
current one.
On Nov 3, 6:59 am, Kostas M kmo...@hotmail.com wrote:
Omi,
Thanks for the hint!
I managed to adjust your solution to my case.
Also, I made some small recommendations, posted in web2pyslices.
On Oct 18, 9:00 pm, Omi Chiba ochib...@gmail.com wrote:
Kostas
Omi,
Thanks for the hint!
I managed to adjust your solution to my case.
Also, I made some small recommendations, posted in web2pyslices.
On Oct 18, 9:00 pm, Omi Chiba ochib...@gmail.com wrote:
Kostas,
This could be your alternatives.
slice:http://www.web2pyslices.com/slices/take_slice/144
Omi,
Thanks for the hint!
I managed to adjust your solution to my case.
Also, I made some small recommendations, posted in web2pyslices.
On Oct 18, 9:00 pm, Omi Chiba ochib...@gmail.com wrote:
Kostas,
This could be your alternatives.
slice:http://www.web2pyslices.com/slices/take_slice/144
I want a FORM that the select option from the 2nd field, depends on
the select option of the 1st field. This could be accomplished using a
jQuery function to change the available options.
However, the construction of the SQLFORM.factory SELECT Field, comes
with the requires command, which leaves
I tried the same application in a Linux (Ubuntu) machine, after the
installation of the latest numpy version (1.6.0).
No MemoryError ticket occured in web2py...
wrote:
I do not think so although there may be less memory available. Apache,
if you use, may set restrictions.
On May 5, 3:00 pm, Kostas M kmo...@hotmail.com wrote:
I have an application which uses the function numpy.zeros to create a
very big array (~16500 x 16500) with the command:
data
I have an application which uses the function numpy.zeros to create a
very big array (~16500 x 16500) with the command:
data = numpy.zeros( (lgos,lgos), dtype=float)
This causes a MemoryError ticket in web2py. However when I run the
same function as a python module (outside web2py) it finishes
def best_wishes(web2py):
for i in web2py.users:
print Dear %s I wish you Merry Christmas \
and a Happy New Year!! % i
, not for the users.
Massimo
On Dec 2, 12:48 am, Kostas M kmo...@hotmail.com wrote:
up in any generated forms except, as you say, in appadmin.
But appadmin is not quite the same of Django admin. It is designed for
the administrator, not for the users.
Massimo
On Dec 2, 12:48 am, Kostas M kmo...@hotmail.com wrote:
Speaking of table names, I have a question:
In Django models, when defining a table e.g. Unit, there is the
ability to adjust the name of the table when it is shown in the admin
app, using the Meta class as 'verbose_name' for single, and
'verbose_name_plural' for plural:
class
It seems I don't understand what is the problem. Isn't the intended
action the form to have errors if nothing is selected?
This is checked with the: if form.accepts(request.vars, session): ...
My app throws an error if you click the submit button without selecting an
item from the list in the
At first thanks villas for the correction of the boolean 'multiple'
argument.
DenesL I agree that multiple should mean 1 or more, not zero or
more.
Making though the following test:
IS_IN_SET(['max', 'john'])('')
('', 'value not allowed')
IS_IN_SET(['max', 'john'], multiple=True)('')
([],
I tried this in a controller and worked fine:
def factory():
options = ['a','b','c']
form = SQLFORM.factory(Field('Optimizers',
requires=IS_IN_SET(options,multiple='multiple')))
if form.accepts(request.vars, session):
response.flash = 'form accepted'
elif form.errors:
I am trying to reproduce the What is going on with web2py? video
(http://vimeo.com/13485916). At the 'friend' section, when I try to
enter a new friend eg. Max I am getting this error:
Traceback (most recent call last):
File C:\Temp\web2py\applications\myplayepedvm/models/
plugin_wiki.py, line
I am still getting this error with Version 1.87.3
Version
web2py Version 1.87.3 (2010-10-13 19:44:46)
Error ticket for images
Ticket 127.0.0.1.2010-10-14.09-53-53.ad7929fb-6991-49e1-
a83c-8ac1a49712a4
Error traceback
1.
2.
3.
4.
5.
Traceback (most recent call last):
File
66 matches
Mail list logo