I have the following menu:
response.util_menu=[
['Disclaimer',request.function=='generic' and
request.args(0)=='disclaimer',URL('util','generic',args='disclaimer')],
['Privacy',request.function=='generic' and
request.args(0)=='privacy',URL('util','generic',args='privacy')],
['Copyrig
Ok, so it means that the solution from Massimo is not working anymore :
http://permalink.gmane.org/gmane.comp.python.web2py/71241
How can I then make plugins that automatically change the layout of the
application without having to leave web interface ?
That's strange, as one of the downloadable
I was getting this in a reproducible way some months ago and all I had to
do was move from the local LAN where it works to over an IPSec tunnel from
the office which would be over the WAN where it did not work. The
truncation result was more chaotic in my case, mostly Javascript files were
chop
In case it is useful to someone, here is the full code I used with locking,
using postgresql advisory locks. The benefit of using postgresql's locks
are that:
• It locks on the database—works across multiple clients
• The locks are automatically released if a client disconnects from the db
All, thank you for the excellent discussion!
I should explain why I posted that recommendation. The "vision" of using
the scheduler for background tasks was:
"Woohoo, this scheduler will *automatically handle locks*—so I don't need
to worry about stray background processes running in parallel
Yep, CSS issue. My own fault. I didnt create a container correctly. Sorry
folks for wasting bandwidth!
On Tuesday, June 26, 2012 7:40:36 PM UTC-6, SeamusSeamus wrote:
>
> I am trying to make a nice design with skeleton. It doesn't seem to be
> working. Skeleton normally comes with layout.css, b
I am trying to make a nice design with skeleton. It doesn't seem to be
working. Skeleton normally comes with layout.css, base.css, and
skeleton.css, as well as an index.html. Web2py only has skeleton.css. Why
is this?
So I download skeleton, place the CSS files in the CSS directory, and put
t
Amazing ! .. Viva python .. viva web2py !
This is pretty cool stuff !
thanks Anthony ..
2012/6/26 Anthony
>
>
> On Tuesday, June 26, 2012 6:17:58 PM UTC-4, Don_X wrote:
>>
>> Hello Anthony, ...
>>
>> I have tried the suggested line of code ...
>> the following way, based on my function index(
>
> I wish it was possible to use other time-saving tools like SQLFORM.grid
> with db.executesql().
>
> At the moment most of the representation tools like SQLTABLE and
> plugin_wiki's jqgrid suppose DAL usage.
>
This wouldn't help with SQLFORM.grid, which does its own query, but for
other cas
On Jun 26, 2012, at 5:25 PM, Massimo Di Pierro wrote:
> Looks like a buggy socket.py or ssl.py. Is this an occasional error (which
> may depend on parameters such as certificates) or it reproducible?
This was fixed in Python 2.7. The underlying error is "Transport endpoint is
not connected", whi
It happens rather frequently. At least a few times a day, which
consequently causes web2py to hang and forces me to restart it. I can't
reproduce it manually.
On Tuesday, June 26, 2012 5:25:43 PM UTC-7, Massimo Di Pierro wrote:
>
> Looks like a buggy socket.py or ssl.py. Is this an occasional er
>
> One can already skip this by specifying an alterante processor function
>
> db(...).select(processor=lambda rows,fields,colnames,blob_decode: )
>
We should probably document that. Note, it doesn't appear to pass a
blob_decode argument to the processor (though the default parse() meth
Looks like a buggy socket.py or ssl.py. Is this an occasional error (which
may depend on parameters such as certificates) or it reproducible?
On Tuesday, 26 June 2012 12:30:58 UTC-5, msmagoo wrote:
>
> Hi all,
>
> I have a healthcheck web2py application that simply reads healthcheck
> informatio
The only "non-essential" processing that has been mentioned is parsing and
normalization of the records returned by the DB.
One can already skip this by specifying an alterante processor function
db(...).select(processor=lambda rows,fields,colnames,blob_decode: )
where processor acts li
Hi Jonathan and Anthony
Thanks for your comments. I appreciate the work you have done to try and
simplify this tricky subject. However, for me, the parametric router and
other ideas, such as the autoroutes.py and some other recipes I have
seen, are not a good idea, at all.
Now I know yo
I suggest you do not use crud but use SQLFORM.grid instead. It has much
better functionality.
On Tuesday, 26 June 2012 07:26:56 UTC-5, Jonas Fredriksson wrote:
>
> hi
>
> When doing results=crud.select(db.hem,query) I got a list containing the
> result with html tags in the beginning and the end
On Tuesday, June 26, 2012 6:17:58 PM UTC-4, Don_X wrote:
>
> Hello Anthony, ...
>
> I have tried the suggested line of code ...
> the following way, based on my function index(): in the controller the
> filter field is 'email_check'
>
> so I have entered :
> db.auth_user.insert(**db.auth_user.em
>
> Lessons to be learnt:
> 1. Why have 3 different routing systems? One obvious way of doing
> things? ha!
>
What's the third routing system (besides parameter-based and pattern-based)
-- the default routing? Anyway, the parameter-based system was introduced
to provide an easier method
Great!
Thank you.
On Tuesday, June 12, 2012 10:17:46 PM UTC+9, Massimo Di Pierro wrote:
>
> The official web2py book is now free for everybody:
>
> https://dl.dropbox.com/u/18065445/web2py/web2py_manual_4th.1.pdf
>
> Massimo
>
--
On Jun 26, 2012, at 7:12 AM, villas wrote:
> I have spent a full day trying to make simple routing work. Please, I have
> tried all the routers and read everything I can. Could anyone please help?
>
> Apache / wsgi standard setup without any changes. Single instance of web2py
>
> Two domain
That should never have worked, as it is not a legal Python identifier.
However, you can do:
A('move out', _href=URL('#myModal'), **{'_data-toggle': 'modal'})
This is actually discussed in the book, at the end of this section:
http://web2py.com/books/default/chapter/29/5#HTML-helpers.
Anthony
I'm getting an error on:
{{=A('move out', _href=URL('#myModal'), _data-toggle='modal')}}
Traceback (most recent call last):
File "/Users/pbreit/web2py/gluon/restricted.py", line 204, in restricted
ccode = compile2(code,layer)
File "/Users/pbreit/web2py/gluon/restricted.py", line 189, in co
hi
When doing results=crud.select(db.hem,query) I got a list containing the
result with html tags in the beginning and the end. But I am not able to
access different fields like result.info and so on. When I am using
results=db(query).select() I can do results.info. Is there any way to get
in
Hi all,
I have a healthcheck web2py application that simply reads healthcheck
information from a database and makes a few REST api calls to a separate
web2py application. Over the past while the application has been crashing
at least once, sometimes twice a day with few errors in the logs. Most
Hi all,
I am trying to use impersonate but so far I got always the ticket shown
below.
The user was logged in and its group has the permission to impersonate all
users; I am using a custom auth table with web2py trunk
Function:
@auth.requires_login()
def impersonate():
r = auth.impersonate
Dear All,
Ok here I am -- over a full day later -- with a stupidly-simple
work-around hack:
routes_in...
('/app1/prettyurl(?P.*)', r'/app1/plugin_wiki\g'),
('/app2/prettyurl(?P.*)', r'/app2/plugin_wiki\g'),
routes_out...
('/app1/plugin_wiki(?P.*)',
Correct. AFAIK, you're not supposed to overwrite the app's default
layout.html with the one from a plugin.
You can include a custom layout, ie. /views/plugin_layout_name/layout.html,
but not /views/layout.html.
Regards,
Ales
On Tuesday, June 26, 2012 11:59:40 PM UTC+2, François Delpierre wrote
Hello Anthony, ...
I have tried the suggested line of code ...
the following way, based on my function index(): in the controller the
filter field is 'email_check'
so I have entered :
db.auth_user.insert(**db.auth_user.email_check(form.vars))
but I get an error msg ! .. should I put it in brake
No, it's not a permission problem.
It seems to happen when I include the view/layout.html file in the w2p file
by issuing the tar command manually as described by Massimo.
Here is the command I use :
tar zcvf ../web2py.plugins.name_layout.w2p views/layout.html
views/plugin_layout_name/* static/p
Thank you!
--
Daniel,
Do your table manipulation in Web2py using view helpers.
Example:
thead = THEAD(TR(TH("something'), TH('this'), TH('that'), TH('theother')))
tbody = TBODY()
for r in rows:
tbody.append(TR(
r.something, r.this, r.that, r.theother
))
return TABLE(thead, tbody)
There are other exa
Not to mention the redirect to user/profile I mentioned in another post.
Trying to invoke auth.register() with a logged in user will force a
redirect. Instead, I think it's best I just select the auth.users table and
write directly to the database. But easier said than done.
On Monday, June 25,
>
> I did read the manual but perhaps I'm missing something?
> From Page 411 in the web2py manual:
>
> auth.add_permission(group_id, 'name', 'object', record_id)
>
> Note, 'object' is in quotes there, which is meant to indicate it is an
example value, not the actual keyword argument name. In fac
Trying to add crud permissions to my application but I must be making this
harder than it should be. After defining a table in db.py I use a
nested loop to add the crud permissions. Being a newbie I assumed that I could
name my arguments if I have reason not to insert them in the
correct orde
If you can reproduce. Chould you try wireshark to do a packet capture? I
would like to see what is going on.
Tim is a new dad and has not been responsive. I will try an attempt to fix
this myself (although I cannot repcoduce it) else we wil revert to
cherrypy.
On Tuesday, 26 June 2012 07:04:15
2012/6/26 ehgonzalez :
> José this is my configuration,
>
> db.py:
> from gluon.contrib.login_methods.ldap_auth import ldap_auth
>
> If mod_php is on:
> ERROR:root:missing ldap, try "easy_install python-ldap" (apache log error)
>
> If mod_php is off, the application works OK.
>
> mod_php 5.3.3
> m
2012/6/26 Bill Thayer :
>
> Hi Jose,
>
> Not to hijack your thread but quickly
>
> Your are probably as busy as the rest of us but I'd love to see a recipe or
> tutorial on how you got php MyAdmin to run with web2py.
>
There 's not a special recipe. I'm using Debian, with python-gluon
install
hey, requires is expecting :
- a validator
- a list of validators
If you need to have a "last_modified" column, i.e. gets a value only when
row is updated, than:
db.define_table(
'sometb',
Field('name', requires=[IS_NOT_EMPTY(), IS_NOT_IN_DB(db, 'sometb.name')]),
Field('last_modi
problem here started as "I can't ensure my app to insert only one task per
function", that is not a scheduler problem "per se": it's a common database
problem. Would have been the same if someone created a
db.define_table('mytable',
Field('name'),
Field('uniquecostraint')
)
and have to
:-)
On Tuesday, June 26, 2012 2:46:15 PM UTC-4, RKS wrote:
>
> Perfect. I got the web2py Application cookboo eBook but you really need to
> write a book. I'd buy it. You help me more than anyone. Thanks a bundle.
>
--
I'm confused at how to implement automatic timestamps to tables.
So I want to know when each record was created (might have a separate
field for "last modified").
The form should either have an uneditable field with the current
timestamp xor—preferably—it shouldn't be present in the form.
Here's
Perfect. I got the web2py Application cookboo eBook but you really need to
write a book. I'd buy it. You help me more than anyone. Thanks a bundle.
--
José this is my configuration,
db.py:
from gluon.contrib.login_methods.ldap_auth import ldap_auth
If mod_php is on:
ERROR:root:missing ldap, try "easy_install python-ldap" (apache log error)
If mod_php is off, the application works OK.
mod_php 5.3.3
mod_wsgi 3.3
I've installed web2py from sour
Please let me know anything wrong in the following code.
from gluon.tools import Auth, Crud, Service, PluginManager, prettydate
auth = Auth(db, hmac_key = Auth.get_or_create_key())
auth.settings.create_user_groups=False
auth.settings.actions_disabled=['register','change_password','request_reset_
I am having the same problem. How did you fix it? Let say, if port 587 is
not working, what kind of error do you have.
For me, it return no error at all. Just show me that invalid login.
Any idea ?
--
Wouldn't lock-free mechanisms be more useful?
On Wed, Jun 27, 2012 at 4:10 AM, Andrew wrote:
> Michael, I intend to use the scheduler for infinite looping background tasks.
> From what I have read in this thread, I see the issue is that you are most
> concerned about race conditions.
>
> I am
Michael, I intend to use the scheduler for infinite looping background tasks.
From what I have read in this thread, I see the issue is that you are most
concerned about race conditions.
I am yet to do this with web2py scheduler, but why not have something in cron
at reboot to insert and perha
Can you pack and attach a minimal application that reproduces the problem
(use a SQLite db with at least one blog.body entry that demonstrates the
problem)?
Anthony
On Tuesday, June 26, 2012 12:57:30 PM UTC-4, RKS wrote:
>
> View source does not show anything below the content inside that XML.
>
> from gluon.contrib.login_methods.ldap_auth import ldap_auth
>
> auth.settings.login_methods.append(ldap_auth(mode='ad',
>server='my.domain.controller',
>base_dn='ou=Users,dc=domain,dc=com'))
>
>
> But my question is do I still have to keep the following lines ?
>
> from gluon.tools im
Hi Jose,
Not to hijack your thread but quickly
Your are probably as busy as the rest of us but I'd love to see a recipe or
tutorial on how you got php MyAdmin to run with web2py.
Regards,
Bill
--
same here. Please keep me in your circle. If anyone know the answer, plz
share with me :)
--
>
> {{for i, (product_id, qty, total_price, product, options) in
> enumerate(order):}}
> id="value_pro_1" type="text" value="{{=qty}}" />
> -
> +
>
> So item two would be:
>
> id="value_pro_2" type="text" value="{{=qty}}" />
> -
> +
If you want the numbers to increment from 1, you could do:
Thanks. From source, it work. I normally do dev on nix. This time, on
windows. So I do not notice. I was even surprised when I do not see source
to debug. ^_^
--
Thank you!
On Tuesday, June 12, 2012 8:17:46 AM UTC-5, Massimo Di Pierro wrote:
>
> The official web2py book is now free for everybody:
>
> https://dl.dropbox.com/u/18065445/web2py/web2py_manual_4th.1.pdf
>
> Massimo
>
--
How about LDAP?
I use the following as seen on site.
from gluon.contrib.login_methods.ldap_auth import ldap_auth
auth.settings.login_methods.append(ldap_auth(mode='ad',
server='my.domain.controller',
base_dn='ou=Users,dc=domain,dc=com'))
But my question is do I still have to keep the fo
Massimo, any ideas on DAL performance? I wonder if it would make sense to
have some flags to skip some of the non-essential processing?
--
There are some slices on making thumbnails:
http://www.web2pyslices.com/slice/search?q=thumbnail
--
I have an "html" directory in my views folder and place html snippets in
there. Then you can include them in any view file with {{include
'html/mysnippet.html'}}.
--
View source does not show anything below the content inside that XML.
For example, I have a layout.html with the standard {{include}} {{ include
footer.html}} etc.
The place where I have this XML element fall within the view that's
extending this layout. So no matter what, there should be a fo
Just to be clear, are you saying web2py is not generating the HTML at all
(i.e., if you do "view source" in the browser, the HTML simply isn't
there), or is it that the content below that point is being generated but
simply isn't being visually rendered by the browser (which could occur, for
ex
2012/6/26 ehgonzalez :
> Hi everyone,
>
> I've finally found out what was wrong in my system. I use apache2 + mod_php
> + wsgi, if I disable mod_php the application works Ok. Is there anyway to
> run mod_php and wsgi without problems?
I'm doing it in a lot of servers without any problem (runing a
Hi everyone,
I've finally found out what was wrong in my system. I use apache2 + mod_php
+ wsgi, if I disable mod_php the application works Ok. Is there anyway to
run mod_php and wsgi without problems?
Eduardo.
El jueves, 21 de junio de 2012 14:48:19 UTC-4:30, ehgonzalez escribió:
>
> Ldap uti
In that trial I was trying to end the python, thinking possibly it's
affecting what follows. Deleting it does nothing.
Sort of like {{if:}},{{else:}},{{pass}}. I was just trying to make it
render that python and then stop.
On Tuesday, June 26, 2012 5:16:49 AM UTC-5, Cliff Kachinske wrote:
>
>
I have some html:
{{for i, (product_id, qty, total_price, product, options) in
enumerate(order):}}
-
+
I have a js function that takes min_pro_1 and plus_pro_1 and allows them to
decrement of increment value_pro_1. So they're just buttons a user can
click and the product quantity goes up and
iWeb!
Richard
On Tue, Jun 26, 2012 at 10:22 AM, Rod Watkins wrote:
> Hello everyone,
>
> I will soon be needing a hosting provider, preferably a vps hosting
> service, with servers based in Canada (for privacy and legal reasons). I
> know that there are posts on hosting services, but I wanted t
Hello everyone,
I will soon be needing a hosting provider, preferably a vps hosting
service, with servers based in Canada (for privacy and legal reasons). I
know that there are posts on hosting services, but I wanted to get feedback
from anyone who has experience with one's based in or with ser
Hi All,
I have spent a full day trying to make simple routing work. Please, I
have tried all the routers and read everything I can. Could anyone please
help?
Apache / wsgi standard setup without any changes. Single instance of
web2py
Two domains and two apps:
domain1.com -> app1
domain
See http://web2py.com/books/default/chapter/29/9#Manual-Authentication.
if request.vars:
auth.login_bare(request.vars.ID, request.vars.pass)
But it's dangerous to put the login credentials in the URL.
Anthony
On Tuesday, June 26, 2012 12:42:25 AM UTC-4, aungsan wrote:
>
> I got following is
To be clear, '%(names)' should be '%(name)s' in all cases.
Anthony
On Tuesday, June 26, 2012 1:05:13 AM UTC-4, Annet wrote:
>
> In all your table definitions you have format='%(name)' except in
> base_countries table, where you have format='%(name)s'.
>
> I don't understand the trace back, the e
If they extend a layout and therefore must be generated dynamically, they
cannot be served as static files. Static files have to be fixed documents
that can be served without running any app code. If you need to generate
the files dynamically based on web2py templates, treat them like any other
Are you running web2py from source or using the Windows binary? If the
latter, the web2py binary includes its own Python interpreter and does not
see or use anything from your machine's Python installation. If you have
Python installed, run web2py from source instead (it's just as easy to
downl
db.auth_user.insert(**db.auth_user._filter_fields(form.vars))
That will filter out the fields that don't belong to the table.
Anthony
On Tuesday, June 26, 2012 8:12:39 AM UTC-4, Don_X wrote:
>
> Thank you Bruno I believe it would of work but ... I get an error ...
>
> Field email_check do
Thank you Bruno I believe it would of work but ... I get an error ...
Field email_check does not belong to the
table
I think it is because I check the email entered in the SQLFORM.factory form
and the field e-mail_check does not exist in the table
it is just a verification scheme !
Hi,
I am developing an application that needs to return a big report page, with
a lot of data. We were testing the application using the integrated rocket
server, and the report was working correctly when accessing the app on the
local network.
However, when connection from the outside via a D
I'd like to put some static files, like disclaimer.html and privacy.html in
/static/files/. These files extend a default/layout.html view.
What is the best way do this? Have a controller with a function for every
static file and in the layout file have {{include
'static/files/disclaimer.html'}}
Sorry for the noise. The following code did the job:
$(document).ready(function() {
$('#no_table_surname').change(function() {
var van = $('#no_table_surname').val();
var fn = $('#no_table_firstname').val();
$('#no_table_name').val(van + ' , ' + fn);
});
$('#no_table_firstname').chang
Using the following model:
db.define_table('akb_authors',
Field('surname'),
Field('firstname'),
Field('name'),
)
self.db.akb_authors.surname.w
Can anyone tell me how can i optimize the image when the user will be
uploaded ? Acually i want to create a web application where the user can
upload and see the image on the categorization of album.i want optimize
image should be appeared in the thumbnail
--
What is the purpose of this line of code?
{{pass}}
What happens if you delete it?
On Monday, June 25, 2012 2:17:32 PM UTC-4, RKS wrote:
>
> BTW, it's EVERYTHING in html after that snippet. It won't display the
> footer or anything.
>
--
Thanks a lot, Massimo !!!
2012년 6월 26일 화요일 오전 10시 45분 9초 UTC+9, song 님의 말:
>
> Hi!
>
> I'm studying hard.
> I will change the menu in the top of the screen. There are some menus
> like Login, Lost Password.
> But unhappily there are no menu.py ( in models directory).
>
> I want to change th
Thanks for both your comments, they are good food for thought.
My experience with Javascript is very limited and I want to avoid it as
much as possible. That is why I have considered - and tried - pyjamas
(which has been working very well for me: very easy to use, and up to now
very robust). I
>
>
> Now I realize that in order to interact with the table, which is managed
> by pyjamas, for example to select a certain row, I need to define a complex
> JSONRPCs interface (select row, un-select, paginate to next page, previous
> page, last page, page number, ...), passing back and forth
>
>
>>>
--
@Cliff, thanks for the suggestion but it doesn't work because the onclick
event can not be associated with the insert method. Likewise, for the
reason stated by Anthony, it is the return false that is needed to prevent
the update action from executing.
@Anthony, thanks, as usual, for your sugges
well, after all the time you spent after it, it's quite a bold statement.
Current scheduler (in trunk there has been a problem, attached the correct
one) reassign "RUNNING" tasks if a worker is killed in action, but you may
want to check if in scheduler_worker table you have entries for dead
wor
85 matches
Mail list logo