The Niphlod's solution is better but add following rules
.navbar-inverse .navbar-inner {
background-color:green;
background-image:none;
}
.navbar-inverse .navlia {
color:red;
}
to the section other rules in web2py_bootstrap.css for a very fast and
not complete customization.
Il giorno
A possible solution in order to hide the small vertical scrollbar displayed
when the page is loaded:
in applications/admin/static/codemirror/lib/codemirror.css
please change line 13 from height: 300px; to height: auto;
the css rule after the change will be:
.CodeMirror-scroll {
overflow:
No. My previous solution doesn't work in all circumstances.
The problem is more complex and involves the javascript code.
Il giorno lunedì 15 aprile 2013 00:35:19 UTC+2, Paolo Caruccio ha scritto:
A possible solution in order to hide the small vertical scrollbar
displayed when the page
just a crazy question: what about if you wrap the eventsource in a web
worker?
Il giorno martedì 9 aprile 2013 22:56:51 UTC+2, Arnon Marcus ha scritto:
The first yield WILL block the thread, but as you say, only the thread of
that connection. So the inter-thread communication would then be
When I wrote the small app SSE_clock I was searching a replacement for a
long polling javascript code that I was using in order to push db's table
update notifications to clients. I abandoned the project by lack of
browser's support.
Anyway, the application is a simple translation from php to
Well, I just tested version 2.4.5 Stable ts 2013.04.04.21.10.38 and all
worked for me. What issue have you encountered?
Anyway, the code was and is experimental (for example it doesn't work on
IE).
If do you want something more tested please try comet messaging included in
web2py as Derek
problem or something
different.
Do you think that should be fixed by using a different db engine?
Paolo
On Tuesday, March 26, 2013 12:42:14 PM UTC+1, Niphlod wrote:
with the default logging.conf the timestamp is present as in all other
web2py-related logging
PS: are you sure
that with a single worker, with that function that
basically just prints something and an execution every 300 seconds the
problem lies into a lock, unless the SQLite library available on your
system is reallly old.
On Tuesday, March 26, 2013 2:21:21 PM UTC+1, Paolo valleri wrote:
When yesterday I saw
. The
question that came to my mind is about computed columns, are they cached?
Paolo
--
---
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 it, send an email
to web2py+unsubscr
: 0.00217413902283
q1: 1.62124633789e-05
q2: 0.00206780433655
q1: 8.10623168945e-06
q2: 0.00120091438293
Given that, in a local env cache.ram is faster than memcache.
Paolo
On Monday, March 25, 2013 11:54:07 AM UTC+1, Niphlod wrote:
well, when you plan to use cache you do it because
to impose more accuracy ?
paolo
--
---
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 it, send an email
to web2py+unsubscr...@googlegroups.com.
For more options, visit https
plugin!)?
Paolo
On Friday, March 15, 2013 11:29:26 AM UTC+1, Niphlod wrote:
maybe the fact that you're using sqlite :D
If you have a recent sqlite distribution activate the WAL, it can zero out
the issues for normal loads (usually also for low loads SQLite ends up
locked)
Jokes aside, that's
ret = self._db._adapter.insert(self, self._listify(fields))
File /home/pvalleri/src/web2py/gluon/dal.py, line 1201, in insert
raise e
OperationalError: database is locked
Paolo
On Thursday, February 28, 2013 10:57:40 PM UTC+1, Niphlod wrote:
plugin just got beta status.
I'd gladly
I am wondering why the pool_size is set to 0 by default
http://web2py.com/books/default/chapter/29/06#Connection-pooling
Which are the side effect of having something greater than 0?
Is not worth to have it set for example as 5 by default?
paolo
On Thursday, March 14, 2013 2:47:56 PM UTC+1
corners to iron but I could not wait any longer.
Changelog:
- 2D GEO API: geoPoint, getLine, geoPolygon
- support for 'json' field type in DAL
- schema export with db.as_json/as_xml, thanks Alan
- graph representation of models
- admin based on bootstrap, thanks Paolo
- support for semantic
- schema export with db.as_json/as_xml, thanks Alan
- graph representation of models
- admin based on bootstrap, thanks Paolo
- support for semantic versioning
- new bootstrap based admin, thanks Paolo
- improved scheduler (and change in scheduler field names), thanks
Niphlod
- graphiz
- graph representation of models
- admin based on bootstrap, thanks Paolo
- support for semantic versioning
- new bootstrap based admin, thanks Paolo
- improved scheduler (and change in scheduler field names), thanks Niphlod
- graphiz support added to adm, thanks Jose
- on_failure in grid
, in this case the 'somehow' is not clear to me yet.
Paolo
On Sunday, March 3, 2013 5:51:29 AM UTC+1, Alec Taylor wrote:
Going through the Google PageSpeed Insights report
(https://developers.google.com/speed/pagespeed/insights) to see what I
should optimise to improve my site-load speed
Good works, I will try it later today.
I don't know if you have already discussed about that, just in case, I
would suggest to start the use of git tags so it will be easier to update
web2py and keep track of the different releases.
Paolo
On Monday, March 4, 2013 7:58:19 AM UTC+1, Massimo Di
Hi Bruno, plugin_wiki is deprecated and it has been replaced by auth.wiki,
have a look here:
http://web2py.com/books/default/chapter/29/03?search=auth.wiki#The-built-in-web2py-wiki
Paolo
On Tuesday, February 26, 2013 5:09:06 PM UTC+1, open...@gmail.com wrote:
Hi,
I am new on Web2py and I
jquery lines that fire the click event to the original sumbit
when the modal submit is clicked. This approach is not clear at all, it
works though,
Something better would be nice to come.
Paolo
On Wednesday, February 27, 2013 3:59:36 AM UTC+1, Vincenzo Ampolo wrote:
Hi,
I'm looking to a way
Really nice job, +1 for shipping this with web2py.
paolo
On Sunday, February 24, 2013 3:34:03 PM UTC+1, Massimo Di Pierro wrote:
I think this plugin should ship with web2py. ;-)
On Sunday, 24 February 2013 07:28:11 UTC-6, Niphlod wrote:
spoilers here
https://www.dropbox.com/sh
Hi Pibol, plugin_wiki is now deprecated, use auth.wiki() instead.
http://web2py.com/books/default/chapter/29/03?search=auth.wiki#The-built-in-web2py-wiki
paolo
On Wednesday, February 20, 2013 3:17:42 PM UTC+1, open...@gmail.com wrote:
Hi all,
I am beginner in Web2Py and I like it much. I
+1 for auth,ajax_login()
paolo
On Monday, February 18, 2013 4:50:20 AM UTC+1, Massimo Di Pierro wrote:
Should we offer something like {{=auth.ajax_login()}} helper which submits
to /user/login? If would not be difficult to write.
How should it work?
On Sunday, 17 February 2013 21:37
first post updated with latest version.
Il giorno venerdì 1 febbraio 2013 21:21:28 UTC+1, Massimo Di Pierro ha
scritto:
Can you post a link to the latest?
On Thursday, 31 January 2013 08:31:53 UTC-6, Paolo Caruccio wrote:
first post updated: replaced following files
db_diagram.html
thank you.
package downloaded from [1]
setup.py modified following istructions on [2]
After setup.py install command all worked fine.
Il giorno sabato 2 febbraio 2013 14:03:09 UTC+1, Jose ha scritto:
El viernes, 1 de febrero de 2013 15:50:43 UTC-3, Paolo Caruccio escribió:
Jose. thank
to turn this into an admin plugin and allow appadmin
to access it?
On Wednesday, 30 January 2013 15:04:06 UTC-6, Paolo Caruccio wrote:
Massimo,
thanks for the compliments and for the suggestions.
Actually, in my mind the posted code is a sort of appadmin plugin. For
this reason I separated db
Jose. thank you too for the amazing idea to draw a graph of the database.
I take the opportunity to ask you where I can download a working pygraphviz
build for windows.
Il giorno giovedì 31 gennaio 2013 23:11:00 UTC+1, Jose ha scritto:
Very nice. Excellent work Paolo.
Jose
--
---
You
mercoledì 30 gennaio 2013 17:23:21 UTC+1, Paolo Caruccio ha
scritto:
I was not able to succesfully install pygraphviz on my windows7 64bit
enviroment but I liked Jose's idea
https://groups.google.com/d/topic/web2py/cFqD1M6rkc8/discussion, so I
wrote a simple addendum to appadmin in order
as commonly happens
with for js or css. Is it a problem of my configuration or of wiki it self?
paolo
--
---
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 it, send an email
to web2py+unsubscr
I don't think you will find something out-of-the-box. However, I advice you
to start from here: http://malsup.com/jquery/form/
On Wednesday, January 30, 2013 10:48:57 AM UTC+1, Ramos wrote:
Hello, what is the best way to add multi file upload functionality.
This is very important for me.
I
to keep track of that, I have opened an
issue http://code.google.com/p/web2py/issues/detail?id=1303
On Friday, January 25, 2013 3:32:55 PM UTC+1, Paolo valleri wrote:
Dear all, I've just came across the fact that with the following code:
def wiki():
return auth.wiki(render='html
; in order to 'format' better the wiki page, it would be
nice to have at least information such as the fields title and modified_on.
paolo
On Sunday, January 27, 2013 4:56:51 PM UTC+1, Massimo Di Pierro wrote:
I do not fully understand the issue. Can you post more code as an example?
On Friday
to name a few.
Checking the code, I figured out that the problem is due to the test:
extension==html (see tools.py:5090)
Could we return the other fields too?
Paolo
--
)
cache.ram = cache.disk = cache.memcache
but I don't know how to understand the gain of using it. Any idea?
paolo
On Friday, January 25, 2013 9:51:22 PM UTC+1, Arnon Marcus wrote:
Oh, and what about memcache?
Can web2py benefit from it? Is there somewhere an explanation about this?
On Fri, Jan
add upload=URL('default', 'download') should solve the problem.
Paolo
On Thursday, January 24, 2013 12:11:33 AM UTC+1, Ramos wrote:
Hello
I dont know how to show the link to the uploaded files using
SQLFORM.factory
my code
form=SQLFORM.factory(db.trabalhador,db.t_docs
Hi all, I've just updated web2py to trunk and it seems that wiki _create is
broken. I got this ticket:
Traceback (most recent call last):
File /home/paolo/Dropbox/git/web2py/gluon/restricted.py, line 212, in
restricted
exec ccode in environment
File
/home/paolo/Dropbox/git/web2py
to remove from the book the advise of storing the
session in memcached unless we find a solution
Paolo
Il giorno domenica 30 settembre 2012 00:54:03 UTC+2, Robert Clark ha
scritto:
Thanks everyone, have added an issue
http://code.google.com/p/web2py/issues/detail?id=1049
On Sunday, September 30
for the elevation) but also to define 3d
polylines.
The 2d doesn't work with 3d, the 3d works well with 3d and 2d. The only
problem is that the 3d is not backward compatible with existing 2d objects.
@Massimo, how would you go with that?
Paolo
On Thursday, January 17, 2013 10:47:59 AM UTC+1, encompass wrote
Try to add lazy_tables=True to DAL. Like:
db = DAL('sqlite://storage.sqlite', migrate=False, lazy_tables=True)
Paolo
On Tuesday, January 15, 2013 10:06:03 AM UTC+1, Daniel Gonzalez wrote:
No imports in the code-area profiled. Also, I am testing some requests,
but the time I am measuring
is on the db definition.
db = DAL('postgres://web2py:web2py@localhost:5432/traffic',
migrate=False,
lazy_tables=True,
)
Paolo
On Tuesday, January 15, 2013 11:38:49 AM UTC+1, Niphlod wrote:
migrate=False is on the db or on Auth define_table() call ?
Il giorno martedì 15 gennaio 2013 11:07
: [
table.route_id.set_attributes(readable = False, writable = False),
]
)
Paolo
On Tuesday, January 15, 2013 3:10:32 PM UTC+1, Anthony wrote:
Good point. Even better, use lazy_tables. You should also compile the app.
On Tuesday, January 15, 2013 8:11:48 AM UTC-5, Paolo valleri wrote:
Thanks
menu.py?
Thanks, Paolo
--
While waiting web2py developers solve the issue, you could simply comment
the line in web2py_bootstrap.js and see if all works as expected.
In javascript a code line is commented when you put before it //, so the
interested line becomes:
// jQuery('ul.nav li.dropdown
POINT(41.901514 12.460774),41.901514,12.460774
POINT(40.851775 14.268124),40.851775,14.268124
The geometry field MUST contain only point otherwise it raises an error.
Hope it helps
Paolo
On Sunday, January 6, 2013 5:29:52 PM UTC+1, Paolo valleri wrote:
Hi Massimo, I found an other strange
in dal.py .lower() at line 832:
ftype = ftype % dict(schema=schema,
tablename=tablename,
fieldname=field_name.lower(), srid=srid,
dimension=dimension)
And now in the db I have the field *name_p* and *location_p* respectively
Paolo
start.gathered_on);
and it fails raising the following error:
Traceback (most recent call last):
File /home/paolo/Dropbox/git/web2py/gluon/restricted.py, line 212, in
restricted
exec ccode in environment
File
/home/paolo/Dropbox/git/web2py/applications/vtraffic/controllers/default.py
/pgsql-novice/2011-01/msg00069.php
and now I am trying to understand how to define a sub_select with the
limitby=1 to carry out the left join.
Any idea ?
Regards,
Paolo
On Monday, January 7, 2013 2:21:33 PM UTC+1, Niphlod wrote:
did you try changing start and end as aliases ?
while start
Hi Massimo, I've tried the same 3 tests.
The first one failed, it was working before though, the ticket:
Traceback (most recent call last):
File /home/paolo/Dropbox/git/web2py/gluon/restricted.py, line 212, in
restricted
exec ccode in environment
File /home/paolo/Dropbox/git/web2py
well done! All the former tests worked. I will investigate more the others
functions as soon as possible.
Paolo
On Sunday, January 6, 2013 4:28:13 PM UTC+1, Massimo Di Pierro wrote:
One more try please.
On Sunday, 6 January 2013 02:11:09 UTC-6, Paolo valleri wrote:
Hi Massimo, I've
Hi Massimo,
I have just tried a few examples but there is a bug in the getPoint
function, please find attached a simple patch to fix it.
Paolo
On Monday, December 24, 2012 7:21:12 PM UTC+1, Massimo Di Pierro wrote:
Thank you Denes. Would you please check my changes. I do not think I broke
for
eventual bugs you'll find
Happy New Year!!
Il giorno domenica 30 dicembre 2012 23:01:28 UTC+1, Paolo Caruccio ha
scritto:
I don't think that MENU helper is the guilty in your case.
I made a metroui version of welcome app (see the images).
Follows the list of involved files:
1) views
One possible solution (not tested).
1 step) in static/js create a new file named web2py_metroui.js having the
following contents
jQuery(function(){
jQuery('.menuli.dropdown').each(function(){
jQuery(this).attr({'class':'','data-role':'dropdown'});
});
jQuery('.menu li
Following code should work
{{=URL('download', args=audio.filepath)}}
Please read
http://web2py.com/books/default/chapter/29/04#URLhttp://web2py.com/books/default/chapter/29/04#URL
to
learn more about URL mapping.
Il giorno giovedì 27 dicembre 2012 13:03:07 UTC+1, Eduardo Costa Lopes ha
button is no longer shown, why ?!
I've also tried:
requires=[]
but in this case I got the same error as in the other cases.
Paolo
On Thursday, December 27, 2012 7:30:00 AM UTC+1, Paolo wrote:
Hi Massimo,
I've just tried to post and then edit with both SQLFORM.factory having
uploadseparate
--
worked
- adding an img with appadmin and then removing it with sqlform_edit --
failed
- using both sqlform_add and sqlform_edit -- failed
Now I am thinking about the way I set the default value, maybe for a field
as an upload I have to set something more?
Paolo
On Thursday, December 27, 2012 9
/paolo/Dropbox/git/web2py/gluon/restricted.py, line 212,
inrestricted
exec ccode in environment
File
/home/paolo/Dropbox/git/web2py/applications/bikend/controllers/club.py,line
123, in module
File /home/paolo/Dropbox/git/web2py/gluon/globals.py, line 193, in
lambda
self._caller = lambda
Hi, this should work:
return XML(a)
paolo
On Wednesday, December 26, 2012 7:52:54 PM UTC+1, jonas wrote:
Hi. Is there any way to generate xml svg via controllers? svg can be made
by using declarative syntax, i.e xml instead of javascript. is it possible
to return an string containing svg
='bootstrap', showid= False,
upload=URL('default',
'download'),uploadfolder
=request.folder+'uploads/pictures',
uploadseparate=True,
autodelete=True,table_name
='club')
Paolo
On Thursday, December 27, 2012 12:47:19 AM UTC+1
My simple way:
a) stop apache server
b) start web2py server in standard way by double clicking web2py.py in
order that it creates its own files
c) in displayed window set the admin password
d) stop web2py server and check that in web2py folder there
are options_std.py and parameters_8000.py
e)
Il giorno martedì 25 dicembre 2012 19:41:17 UTC+1, Paolo Caruccio ha
scritto:
My simple way:
a) stop apache server
b) start web2py server in standard way by double clicking web2py.py in
order that it creates its own files
c) in displayed window set the admin password
d) stop web2py
If you plan to use mod_wsgi 3.4 in apache 2.4 on windows download newest
build from http://www.lfd.uci.edu/~gohlke/pythonlibs/ (search in the page
for mod_wsgi)
If you are interested you could read also
else: statement is inline with if statement.
the code wrapped in {{ }} follows python syntax rules.
Alternatives below should be work (not tested):
A) using ternary operator
a href=#i class={{if ans=='A': }} {{response.write('icon-ok') if
ans==correctans else response.write('icon-remove')}} {{
Maybe you'll find this
discussionhttps://groups.google.com/d/topic/web2py/xXGAGZvLDzo/discussion
useful.
Il giorno giovedì 20 dicembre 2012 09:36:25 UTC+1, Johann Spies ha scritto:
When I log in the flash telling me that I am logged in does not timeout
until I close it.
I want it to fade
http://code.google.com/p/web2py/issues/list
Il giorno giovedì 20 dicembre 2012 15:31:56 UTC+1, Daniele ha scritto:
Hmm I'm not sure how to open a ticket in google...sorry ~_~
On Dec 20, 2012, at 6:48 AM, howesc how...@umich.edu javascript:
wrote:
ooops. i added the - and didn't test
you are using currently).
By this code the flash message will close after 8 seconds if the user
doesn't close it before.
Il giorno giovedì 20 dicembre 2012 15:31:38 UTC+1, Paolo Caruccio ha
scritto:
Maybe you'll find this
discussionhttps://groups.google.com/d/topic/web2py/xXGAGZvLDzo
I think as Massimo said, but W3C raccomandation on
formshttp://www.w3.org/TR/html5/forms.html#forms
tells:
To label a control, the label element is used; the label text and the
control itself go inside the label element.
So KMax request should be acceptable
Il giorno giovedì 20 dicembre
:47 UTC+1, Paolo Caruccio ha
scritto:
I think as Massimo said, but W3C raccomandation on
formshttp://www.w3.org/TR/html5/forms.html#forms
tells:
To label a control, the label element is used; the label text and the
control itself go inside the label element.
So KMax request should
-externally-managed failed with error code 1 in
/tmp/pip-build/uwsgi
Maybe something is missing?
Moreover, I don't like the fact that it tries to make a dist-upgrade
Regards,
Paolo
On Wednesday, December 19, 2012 1:11:06 AM UTC+1, Arnon Marcus wrote:
Hey guys, I'm also using web2py and redmine
Mine is a very stupid question but sometime...
Is there an active field in your db tables?
Il giorno mercoledì 19 dicembre 2012 16:54:50 UTC+1, Aurelijus Useckas ha
scritto:
Yeah I know.. I have an old backup only :( me bad
On Wed, Dec 19, 2012 at 5:51 PM, Mark czhan...@gmail.com
?
So far, I've solved this issue by making a simple query but aggregation and
then, counting and aggregating by hand. I hope there is a better and linear
approach for that.
Regards
Paolo
--
Hi and great job!
One thing that I don't like is at line 10
apt-get -y dist-upgrade
this was also in the previous version, actually I see this too restrictive,
for example I have ubuntu 12.04 and don't want to move to 12.10
Paolo
On Wednesday, December 12, 2012 12:06:16 AM UTC+1, Niphlod
I've just tested, you should use with !=
something like that seems to work
if [ $UID != 0 ]; then...
Paolo
On Wednesday, December 12, 2012 12:48:33 PM UTC+1, Niphlod wrote:
Updated. don't have a shell lying around, could you try it ?
--
Yes, there are stylistic reasons. The style is inspired to bootstrap input
with error example (validation state paragraph in
http://twitter.github.com/bootstrap/base-css.html?#forms).
You can revert the original error behaviour by adding a comment to the
lines from # 56 to # 73 in
I would add also that error shouldn't interfere with the comment span of
the control, but I discovered a bug: in web2py_bootstrap.css lines #72 and
73 should be:
div.controls .help-inline{color:#3A87AD;}
div.controls .error_wrapper + .help-inline {margin-left:-9px;}
In this way when an
For update forms I used the following strategy (maybe hackish but it does
its dirty work)
The submit button is disabled at start.
I added (by the controller) to each form control:
- an attribute initval containing the stored value
- an attribute isdirty with default = false
- an event onchange
Since bootstrap css uses the media-queries, what are your viewport
dimensions? Are you using the default web2py configuration? Which is web2py
version?
Il giorno venerdì 7 dicembre 2012 21:39:05 UTC+1, Luca ha scritto:
I have the problem that the menus are collapsed even when there is ample
please try :
import os
db.define_table('tutor',
Field('user', 'reference auth_user', default=auth.user_id),
Field('t_Image', 'upload', uploadfolder=os.path.join(request.folder,
'uploads/profiles'), requires=IS_EMPTY_OR(IS_IMAGE(extensions=('jpeg', 'jpg'
, 'png', 'gif',
Nav-collapse is a bootstrap class.
Are you using default web2py configuration or have you modified something?
I'm on windows7 and all works fine with last trunk.
Il giorno venerdì 17 agosto 2012 00:05:09 UTC+2, mweissen ha scritto:
I have a program with a menu and I tried Firefox and Google
For flot:
put in yourapp/static/js
jquery.flot.js
and
jquery.flot.resize.js (for scalability)
usage in the view for example
{{extend 'layout.html'}}
h1{{=T('My first chart')}}/h1
script src={{=URL('static','js/jquery.flot.js')}}/script
script
in the submenu, sometime they
just close baldly.
I try to tweak the script, but I don't understand it pretty well. I will
try again.
Maybe the one that implement that could have look at it. I think it is
Paolo, but I am not sure.
Thanks.
Richard
On Tue, Dec 4, 2012 at 9:56 AM, Massimo
If #article_DTU_Content is a textarea
{{results.update_form.element('#article_DTU_Content')['_cols']=300}} should
work as well
as {{results.update_form.element('#article_DTU_Content')['_rows']=10}}
unless you set the element width somewhere.
In other words, for example (code from my
You could use also css3 selector :last-child (ie9 and safari3.2 doesn't
support it)
For example, in your css file add:
.menu ul li:last-child /*in this way ul.menu direct li children are
bypassed*/
{/* apply your rules, for example: */
color: red;
background-color: yellow;
}
Il giorno
If you don't like .less, you can modify grid system variables trough the
web interface at http://twitter.github.com/bootstrap/customize.html and
download modded bootstrap files.
Il giorno giovedì 29 novembre 2012 23:29:42 UTC+1, Stephen Tanner ha
scritto:
Now that web2py uses bootstrap for
other alternatives:
https://github.com/HumbleSoftware/Flotr2
http://canvasxpress.org/
http://jsxgraph.uni-bayreuth.de/wp/
I like and use, in combination with web2py, Flot http://www.flotcharts.org/
Il giorno giovedì 29 novembre 2012 21:19:15 UTC+1, Manuele ha scritto:
Il 29/11/12 17:24,
Patch submitted http://code.google.com/u/102984225811410587490/ to correct
following problems in IE7:
1) div.flash width is affected from span floated to right within it
2) dropdown-menu doesn't show due to an unnecessary css rule in
web2py_bootstrap.css
However, if the SO is windows xp and
As a reference, you can see the example given by Massimo Di Pierro in this
post https://groups.google.com/forum/#!msg/web2py/NXhu8PmvHOs/aO-oum4m0NgJ
Il giorno sabato 24 novembre 2012 05:36:48 UTC+1, apps in tables ha scritto:
I am using web2py 2.2.1 . I did import time in db.py
still the
Please follow lyn2py's answer and you will be on the right track.
def index():
if auth.is_logged_in():
redirect(URL('profile', 'member', args=auth.user_id))
@auth.requires_login()
def member():
if int(request.args(0)) == auth.user_id:
print 'profile of connected
From the book http://web2py.com/books/default/chapter/29/09#Authenticationwe
know that:
*The password field of the db.auth_user table defaults to a CRYPT validator*
From http://web2py.com/books/default/chapter/29/09#Customizing-Auth we know
also that:
*You can add any field you wish, and you
In order to apply attributes to a custom form you have to change
form.custom.begin before.
The following code should work:
#view html
{{extend 'layout.html'}}
{{
# add class to form
form['_class'] = form-horizontal
# change form.custom.begin
form.custom.begin = XML(%s %s % (form.tag,
Login form like all web2py forms has an argument 'formstyle' that can take
following values
'table3cols', 'table2cols', 'divs', 'ul' and 'bootstrap'
Latter is not documented.
Therefore, for login form simply apply in your controller (or also in
model) but before auth.form call
In this group there are several discussions on this subject
(i.e.https://groups.google.com/d/msg/web2py/gLTthVDhqFM/dWldB9xGavgJ
)
Search for messages containing the word '_xml'
We are replacing the original form.custom.begin value with a new one within
which is the '_class' attribute
From
Please try:
query = Expression(db,interval_time (strftime('%M','now') -
strftime('%M', updated_on)))
On the page suggested by Niphlod we read:
Compute the number of seconds between two dates:
SELECT strftime('%s','now') - strftime('%s','2004-01-01 02:34:56');
So by replacing '%s' with '%M'
Important advise: use the book as first help. It is a precious information
source.
From
http://web2py.com/books/default/chapter/29/07?search=validators#Validators
Built-in validators have constructors that take an optional argument:
IS_NOT_EMPTY(error_message='cannot be empty')
error_message
Considering that (http://web2py.com/book/default/chapter/07#Validators)
- a w2p validator acts at form level
- we can get the value of another field on the form through request.vars
- in IS_NOT_IN_DB validator, first parameter can be a set of records
a possible answer to your question is
something like that should work:
open(request.folder+'/bk.csv',
'w').write(str(db(db.table.id).select(db.table.ALL)))
have a look at
http://web2py.com/book/default/chapter/06#CSV-%28one-Table-at-a-time%29 for
more details
Paolo
On Tuesday, November 13, 2012 7:24:38 PM UTC+1, dantuluri
a possible solution
# controller
def update_record():
form = crud.update(db.table, request.args(0))
delete_confirmation = T('Are you sure you want to delete this record?')
delBtn = A('Delete', _href=URL('delete_record',
args=['table',
Paolo,
So far I have this:
form.add_button(T('Delete'), '#', _class='btn-small btn-danger')
delete_confirmation = T('Are you sure you want to delete this
record?')
form.element('input[value='+T('Delete')+']')['_onclick'] = if
(confirm('%s')) { jQuery('input[type
did you try appreport (a web2py plugin)
https://github.com/lucasdavila/web2py-appreport ?
Il giorno domenica 11 novembre 2012 06:39:21 UTC+1, chris_g ha scritto:
Has anyone had any luck running Pisa in a web2py view?
I've only had success with using it at the command line:
pisa
a possible solution (skeleton code so please check for errors and
omissions):
# controllers
def companies():
return dict()
def add_company():
form = SQLFORM(db.company, formstyle='bootstrap')
if form.process().accepted:
session.flash = 'form accepted'
401 - 500 of 652 matches
Mail list logo