@Constantine Vasil
I had a similat task earlier.
I am using a third party library named 'DABO'.
Placed that in 'site-packages' folder within 'web2py' (source) &
imported that in models & controllers as required.
(Before that, I had tried placing it in 'modules' folder, but could
not import in contr
On Sat, Dec 10, 2011 at 12:32 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> What's the plugin? can you send me a link?
>
Yes, thats the link
https://bitbucket.org/PhreeStyle/web2py_ckeditor/src
I made some changes, my code is here:
https://github.com/rochacbruno/Movuca/blob/mas
Congrats to everyone. If people are still using 1.99.2 (or older version),
is there a place of reference for those versions? At last the n - 1 (n =
latest version)?
BTW, I like to new layout
Rgds,
Joseph
auth.settings.login_url = URL('your_controller', 'signin')
On Friday, December 9, 2011 11:08:33 PM UTC-5, Constantine Vasil wrote:
>
> I am using in a custom made login function:
>
> def signin():
>
> form=current.app.auth.login(next=login_next)
>
>
> Now I want to add @au
I am using in a custom made login function:
def signin():
form=current.app.auth.login(next=login_next)
Now I want to add @auth.requires_login() to my other functions.
The question is how to link @auth.requires_login() to my function 'signin'?
Got this error: KeyError: 'auth_user'
The code is:
form.vars.email = form.vars.email.lower()
form_vars_email=form.vars.email
table_user_email = auth.settings.table_user.email
if db( table_user_email == form.vars.email).count():
del form.errors.email
the
I think they're talking about
this: https://bitbucket.org/PhreeStyle/web2py_ckeditor/src
There are also these:
http://dev.s-cubism.com/plugin_elrte_widget
http://dev.s-cubism.com/plugin_managed_html/page1/_managed_html_edit
On Friday, December 9, 2011 9:32:27 PM UTC-5, Massimo Di Pierro wrote:
I think I fixed it. Can you check it?
On Dec 9, 4:18 pm, nick name wrote:
> I just pulled git and hg and there's a small difference (that was also
> already there a few days ago):
>
> Only in web2py.hg/applications/examples/static/js: modernizr-1.6.min.js
> Only in web2py.hg/applications: __ini
What's the plugin? can you send me a link?
On Dec 9, 3:15 pm, Bruno Rocha wrote:
> On Fri, Dec 9, 2011 at 6:48 PM, Ross Peoples wrote:
> > Glad to know someone is using my plugin :)
>
> Your plugin is very good, I made some changes, included more methods and
> solved some bugs. I will send a pat
David,
Thanks for your offer to help with this. The best way to help right
now would be to provide me a smallish pcap file that records it
happening so I can see which parts of the files are missing.
Thanks,
Timothy Farrell
On Dec 5, 9:07 pm, David Tse wrote:
> I'm experiencing this problem as
On Friday, December 9, 2011 6:33:54 PM UTC-5, Constantine Vasil wrote:
>
> It should be:
> if db(auth.user.email == form.vars.email).count():
>
> but auth.user is None because the user is logged of.
>
No, you're not checking whether the email is from the current logged in
user, you are simpl
On Friday, December 9, 2011 6:05:09 PM UTC-5, Constantine Vasil wrote:
>
> I believe this:
>
> if db(auth.table_user.email == form.vars.email).count():
>
>
Sorry, should be auth.settings.table_user.email. auth.settings.table_user
is the user table, which is typically (but need not be) db.auth_user
Thanks Jim!
Wonder how that escaped me. :)
On Dec 10, 12:21 am, Jim Steil wrote:
> Not tested, but I'd do something like this...
>
> #controller
> def new_tank():
> db.container.type.writable = False
> db.container.type.readable = False
> db.container.type.default = 'tank'
> f
I believe this:
if db(auth.table_user.email == form.vars.email).count():
should be:
if (db.auth_user.email == form.vars.email).count():
Is that correct?
Safest way to update from 1.99.2? last time I did an update through
the interface and it didnt go through.
Thanks
dan
On Dec 9, 2:18 pm, nick name wrote:
> I just pulled git and hg and there's a small difference (that was also
> already there a few days ago):
>
> Only in web2py.hg/appl
I just pulled git and hg and there's a small difference (that was also
already there a few days ago):
Only in web2py.hg/applications/examples/static/js: modernizr-1.6.min.js
Only in web2py.hg/applications: __init__.py
Only in web2py.hg/applications/welcome/models: db.py.orig
Only in web2py.gi
Thanks for the confirmation. I interpreted triple license like:
(example)
A necessary library=GPL another part=BSD etc... which would cause
problems when the source is modified
Thanks,
Simon
On Dec 8, 8:35 pm, Massimo Di Pierro
wrote:
> I can confirm it is BSD. If you read something else it i
"are you saying you added that line to tools.py" - o no - I would not have
enough understanding to do that yet, and my focus in on my project because
I have a deadline.
Any help with request_reset_password issue would be much appreciated.
Thank you!
I solved so:
admin\static\plugin_multiselect\jquery.multiselect.css
line 14 becomes
.ui-multiselect-checkboxes { position:relative /* fixes bug in IE6/7 */;
overflow-y:scroll; margin-left:0; width:100%; }
line 16 becomes
.ui-multiselect-checkboxes label input { position:relative; top:1px;
right
On Fri, Dec 9, 2011 at 6:48 PM, Ross Peoples wrote:
> Glad to know someone is using my plugin :)
Your plugin is very good, I made some changes, included more methods and
solved some bugs. I will send a patch,
--
Bruno Rocha
[http://rochacbruno.com.br]
Not sure I understand -- are you saying you added that line to tools.py?
What does you code look like?
BTW, I think the onvalidation for request_reset_password didn't work
because request_reset_password adds a validator to the email field that
requires the submitted email address to be in the d
I had attempted to make a full-service CMS at one time, but I got caught up
on how theming and templating would work. I never did figure it out
completely, but I did learn a few things:
- I used a bare minimum layout. This basically contained the doctag,
, and . Everything else was generated by
On Fri, 9 Dec 2011 12:21:52 -0800 (PST)
Massimo Di Pierro
wrote:
> This opens lots of possibilities but the CMS could not use existing
> themes. Converting concrete5 or wordpress themes would be a pain
> anyway.
That's not the problem. What I like in concrete5 is the *ease* of
converting HTML/CS
>
> Any ideas? Suggestions?
>
I am using plugin_ckeditor with inline edit support.
look it working here:
http://labs.blouweb.com/movuca2/article/show/1/how-to-use-modules-in-web2py
(t...@test.com / 1234)
It is all server-side so i think it has no problem with custom layouts.
--
Bruno Rocha
[h
Back on this topic. I have been working on something that hope to
release soon
I do not know how to reconcile wysiwyg inline editor+drag-drop with
custom layouts. I am leaning for a single html layout similar to the
new web2py welcome app (skeleton) and arbitrary customization using
css only. This
I guess anywhere an Auth form is processed, prior to calling the Auth
method, do something like:
if request.vars.email:
request.vars.email = request.vars.email.lower()
So when a user submits an Auth form with an email address, it is converted
to lowercase before being passed to the Auth met
Really nice!
On Fri, Dec 9, 2011 at 6:30 PM, Massimo Di Pierro
wrote:
> The book 4th edition (in print) is available here:
>
> http://www.lulu.com/product/paperback/web2py-book-4th-edition/18738286
>
> I will post it on the web site asap and in PDF.
>
> The book described web2py 1.99.3 and later.
Here is a free PDF version including the first 130 pages:
web2py.com/examples/static/web2py_manual_4th.cut.pdf
Massimo
On Dec 9, 11:30 am, Massimo Di Pierro wrote:
> The book 4th edition (in print) is available here:
>
> http://www.lulu.com/product/paperback/web2py-book-4th-edition/18738286
>
>
My goal is to use apache with web2py on SL (scientific linux). I've
had trouble and, casting about, I noticed some errors when I run the
fedora setup script recommended in the Book (http://
web2py.googlecode.com/hg/scripts/setup-web2py-fedora.sh.). I include
the troubled sections of the script out
You are not the only one.
If anybody whats to work on improving it (perhaps merging the old and
new one) I'd be happy. Thins I like about the new one:
-uses skeleton (like welcome)
- shares lots of structure and files with welcome
- menu is generated from text, not an image
Massimo
On Dec 9, 12:
> I suppose you could intercept the request.vars in your controller and do
the conversion before Auth gets it.
This is OK - could you please tell me with a code how you would do it? I
want to be sure it works
and going with the debugger is time consuming if it does not.
--> what you will add he
I miss a "click here for regular website" to bypass mobile detection.
http://zerp.ly/rochacbruno
Em 09/12/2011 16:01, "Vasile Ermicioi" escreveu:
> also web2py.com website changed,
> I like old menu better than new one
>
>
> Now - I am very close to a launch live phase -
> are there a workaround like with login_email_lower?
>
I'm not sure -- I would expect the request_reset_password onvalidation to
work. I suppose you could intercept the request.vars in your controller and
do the conversion before Auth gets it
No error,
it enters in the if loop, but it seems that the
auth.settings.login_userfield = 'email' doesn't change anything
On Dec 9, 5:34 pm, Anthony wrote:
> The idea is to create the form with the 'username' field by default, but
> when submitted, if the 'username' field contains an email addres
Thank you!
Now - I am very close to a launch live phase -
are there a workaround like with login_email_lower?
I don't know how long it will take to patch but with
a workaround I am in control.
Your help is very much appreciated.
You're welcome.
On Friday, December 9, 2011 12:51:21 PM UTC-5, Cliff wrote:
>
> In real usage the likelihood is low. But I can't guarantee there will
> never be a problem caused by network latency, either.
>
> I don't use file-based sessions because I have several applications
> that work togethe
In real usage the likelihood is low. But I can't guarantee there will
never be a problem caused by network latency, either.
I don't use file-based sessions because I have several applications
that work together, as in 'cooperating applications.' Though I
suppose I could have one repository for s
This is a CSS issue. Can you help us fix it?
On Dec 9, 11:04 am, António Ramos wrote:
> BUG!
> I have windows 7
> the app wizard does not show any plugin but if i select *check all* it
> replies "23 selected"
> If i select uncheck all , nothing happens. Still 23 selected
>
> This was also a b
It is really nice. Thanks to Peter for putting it together. I hope it
prints well.That is always a gamble.
On Dec 9, 11:34 am, Bruno Rocha wrote:
> the book cover is very nice! I like that!
>
> On Fri, Dec 9, 2011 at 3:30 PM, Massimo Di Pierro
> wrote:
>
> > The book 4th edition (in print) is ava
If I recall, the problem is with the display of the options in the select
widget -- they're all shifted over to the right, so you can't see them in
the widget.
On Friday, December 9, 2011 12:04:45 PM UTC-5, Ramos wrote:
>
> BUG!
> I have windows 7
> the app wizard does not show any plugin but if
the book cover is very nice! I like that!
On Fri, Dec 9, 2011 at 3:30 PM, Massimo Di Pierro
wrote:
> The book 4th edition (in print) is available here:
>
> http://www.lulu.com/product/paperback/web2py-book-4th-edition/18738286
>
> I will post it on the web site asap and in PDF.
>
> The book des
The idea is to create the form with the 'username' field by default, but
when submitted, if the 'username' field contains an email address, change
the setting and also copy the email address to request.vars.email before
calling the login() method again. The second call to login will proceed as
The book 4th edition (in print) is available here:
http://www.lulu.com/product/paperback/web2py-book-4th-edition/18738286
I will post it on the web site asap and in PDF.
The book described web2py 1.99.3 and later.
Massimo
it seems it dosen't work.. maybe because I have a username field
defined in my auth_user?
On Dec 9, 4:46 pm, Anthony wrote:
> Not tested, but maybe something like:
>
> def user():
> custom_auth.settings.login_userfield = 'username'
> if request.args(0) == 'login':
> if request.var
In that cases I prefer to keep the generators in server side.
modules/html_helpers.py
from gluon import DIV
class MySidebar(DIV):
def __init__(self):
# do whatever you want
DIV.__init__(self)
self.append(H1("mysidebar"))
self.append(UL(*[LI().]))
def
BUG!
I have windows 7
the app wizard does not show any plugin but if i select *check all* it
replies "23 selected"
If i select uncheck all , nothing happens. Still 23 selected
This was also a bug in previous versions
2011/12/9 Ivica Kralj
> Cool :)
> Thank you
>
>
> On 9 December 2011 1
In real usage, is a user likely to be able to update the date field and
then quickly click the view link so fast that the view query happens before
the update query? If so, then your client side feedback idea is probably
the way to go.
Actually, if both the update and view requests use the sess
Cool :)
Thank you
On 9 December 2011 16:40, Massimo Di Pierro wrote:
> Make no mistakes. This is not a minor revision. This is in preparation
> for 2.0.
>
> We could not call it 1.100 because it would break the old automatic
> upgrade mechanism (1 comes before 9, yikes).
>
> There are a huge numb
Not tested, but maybe something like:
def user():
custom_auth.settings.login_userfield = 'username'
if request.args(0) == 'login':
if request.vars.username and not
IS_EMAIL()(request.vars.username)[1]:
custom_auth.settings.login_userfield = 'email'
request.
The problem occurs in many-to-many relations, as in this example
model:
db.define_table('owners', Field('name'))
db.define_table('dogs', Field('name'))
db.define_table(dog_owners',
Field('owner_id', db.owners),
Field('dog_id', 'db.dogs'),
Field('date_owner_got_dog', 'date') #This is importan
Make no mistakes. This is not a minor revision. This is in preparation
for 2.0.
We could not call it 1.100 because it would break the old automatic
upgrade mechanism (1 comes before 9, yikes).
There are a huge number of bugs fixes and many improvements.
The most important change is that the new
I submitted an issue.
On Friday, December 9, 2011 11:23:04 AM UTC-5, Anthony wrote:
>
> I agree -- I think the auth system should convert all emails to lowercase
> at all points. In particular, two accounts should not be allowed to have
> the same email address, just with different cases.
>
> I
Thank you, it would be much easier - all lower case - all major
email providers like Google, etc. prefer a better user experience
than strict protocol. I believe Massimo will agree. Massimo?
Now the last important issue:
auth.settings.reset_password_onvalidation = login_email_lower
cu
Not tested, but I'd do something like this...
#controller
def new_tank():
db.container.type.writable = False
db.container.type.readable = False
db.container.type.default = 'tank'
form = SQLFORM(db.container)
if form.process().accepted:
response.flash = 'New Question Su
I agree -- I think the auth system should convert all emails to lowercase
at all points. In particular, two accounts should not be allowed to have
the same email address, just with different cases.
I see your confusion about the naming of IS_LOWER (there are a few other
validators like that too
I checked the code in tools.py, the name of the function (list)
to be executed for 'onvalidation' for request_reset_password
is: reset_password_onvalidation (the neame is not right
it should correspond to the name of the operation -
request_reset_password - it should be renamed like:
request_reset
Thanks Massimo. I will try this first.
On Dec 9, 1:11 pm, Massimo Di Pierro
wrote:
> the proper way is using a parer but the shortcut (used in markmin) is
> using regular expressions
>
> def process(text):
> import re
> text = re.compile('\[(?P.+?)\]).sub('',text)
> # ... more for other
I would prefer that way.. I what controller function? I'm using in
form from default/user but I'm using a customauth
On Dec 9, 3:02 pm, Anthony wrote:
> Rather than write a whole new method, one trick might be in the login
> controller function, check the incoming request.vars.username to see if
Rather than write a whole new method, one trick might be in the login
controller function, check the incoming request.vars.username to see if it
is an email address (using the IS_EMAIL validator). Then, depending on
that, dynamically set auth.settings.login_userfield to either 'email' or
'usern
Yes but the {{include '...'}} should come after the {{extend '...'}}
or inside the extended view. There is no reason to do it before.
Mind that if your goal is to change a sidebar, I suggest you use
{{block sidebar}}{{end}}
On Dec 9, 4:53 am, Tito Garrido wrote:
> So, is there any way to reu
yes, i think I'm going to build a custom method for login with
username or email
On Dec 9, 2:13 pm, Anthony wrote:
> Are you saying you want users to be able to login with either their
> username or their email address? For that, I think you might need a custom
> login method. On the other hand,
Are you saying you want users to be able to login with either their
username or their email address? For that, I think you might need a custom
login method. On the other hand, if you simply want to allow users to have
a username, but always login with email address, you should be able to do:
au
I tried to connect to a MongoHQ with the last web2py source from
Google Code. It raises an exception:
Traceback (most recent call last):
File "/home/alan/web2py-hg/gluon/restricted.py", line 204, in
restricted
exec ccode in environment
File "/home/alan/web2py-hg/applications/mongo/models/d
lots of users on login form submit their email instead of the
username..
it seems that auth.define_tables(username=True) forces username login
but it is possible to have both?
Thanks a loT!
On Fri, Dec 9, 2011 at 4:59 PM, Vasile Ermicioi wrote:
> oops, not like that but like that
>
>
> import os
> from gluon.template import render
> view_content = open( os.path.join(request.folder, 'views',
> 'your_view.html')).read()
> return render(view_content,delim
So, is there any way to reuse a view function?
Thanks!
Tito
On Thu, Dec 8, 2011 at 9:47 PM, Anthony wrote:
> I don't think you can put an include before an extend (well, you can, but
> it won't insert the include code before the extended view code, so if your
> call to mysidebar() comes before
oops, not like that but like that
import os
from gluon.template import render
view_content = open( os.path.join(request.folder, 'views',
'your_view.html')).read()
return render(view_content,delimiters=('{%','%}'))
Hello to both qooxdoo and web2py developers!
Check this out :
http://demo.qooxdoo.org/1.6/apiviewer/#qx.bom.Template
Qooxdoo now got a js templating system called mustache JS
http://mustache.github.com/
here is the syntax: