Omi Chiba,
Thanks VERY MUCH for your effort on building the web2py installation
package (a.k.a. library on fluxflex). Deploying web2py on a hosting
server has never been so easy! (I start crying for the hours I spent
in setting up my first web2py instance on my previous hosting
provider.)
One thi
Great advice, I'll do that :)
Thanks, Bruno!
On Aug 22, 4:46 pm, Bruno Rocha wrote:
> I guess it is not wrong, but I do not recommend too much code in
> controllers, controllers should be for decide the app flow.
>
> I reccomend you to create a module in /modules
>
> # modules/myobjects.py
> fro
1 more thing, could you explain these lines please:
from gluon import *
request = current.request
On Aug 22, 4:46 pm, Bruno Rocha wrote:
> I guess it is not wrong, but I do not recommend too much code in
> controllers, controllers should be for decide the app flow.
>
> I reccomend you to create
I've run into a problem, why won't this work:
# controllers/default.py
def search():
return dict(showsearch=objects.Search.show(db))
# controllers/default.py
# modules/objects.py
from gluon import *
request = current.request
class Search(object):
def show(self, db):
search =
db(d
ok small corretion, you need it as staticmethod (or need a instance before
calling)
change to:
class Search(object):
@*staticmethod*
def show(db):
*Explanations about imports:*
from gluon impot *
The above is to have access to web2py helpers and other gluon modules, if
you d
:( making an instance or adding @staticmethod won't work either, why
is it returning the error saying it has no attribute 'show'? why is it
looking for an attribute shouldn't it be saying it has no function at
least?
On Aug 22, 6:38 pm, Bruno Rocha wrote:
> ok small corretion, you need it as stat
default/index.html:
{{extend 'layout.html'}}
cavityflow
{{=form}}
{{if image:}}
Figure
{{pass}}
default.py:
def index():
form=FORM('nx:', INPUT(_name='nx', _value=20.0), BR(), 'ny:',
INPUT(_name='ny', _value=20.0), BR(), 'nt:', INPUT(_name='nt',
_value=100.0), BR(), 'nit:', INPUT(_name='nit'
did you imported in this way:
from objects import Search
return dict(search=Search.show(db))
???
Yep just tried it then, same error unfortunately :(
On Aug 22, 8:15 pm, Bruno Rocha wrote:
> did you imported in this way:
>
> from objects import Search
>
> return dict(search=Search.show(db))
>
> ???
I am trying to fully understand purpose of roles when it comes to
creating groups. It seems very simple but i need to understand it
more to be comfortable with my understanding of it.
Thanks in advance !
I just realized another benefit, for some reason you can create and
validate/store forms directly in views.
{{=SQLFORM(db.auth_group).process()}}
share your whole code in some pastie, gist or send the .py files I will take
a look and try it here.
Module:
http://pastie.org/2411032
Controller:
http://pastie.org/2411038
View:
http://pastie.org/2411047
That should be everything, thanks for the help man, I really
appreciate it! :)
On Aug 22, 9:27 pm, Bruno Rocha wrote:
> share your whole code in some pastie, gist or send the .py files I wil
Is there anyway to use both Janrain and give users to option to register for
a local account using Auth? I've looked and looked and can't find anything.
I can get my app to let users register for a local account, but then I
can't find anyway to include that option on the login page in addition to
Cosider this code for an app named test:
Model: db.py
db = DAL('postgres://user:@localhost/mydb') # Replace with db =
DAL('sqlite://mydb.sqlite') to see it working well
from gluon.tools import Mail, Auth, Crud, Service, PluginManager,
prettydate
db.define_table('test', Field('title'))
sess
I'm not sure why you're getting that specific error, but I see a few
problems:
This may be a typo, but your module pastie says the module is named
object.py (which is probably not a good idea, since 'object' is a Python
builtin), but the controller says 'from objects import Search' (note the
See the Multiple Login Forms section at the end of this section:
http://web2py.com/book/default/chapter/08#Other-Login-Methods-and-Login-Forms.
There's also this: http://www.web2pyslices.com/slices/take_slice/124.
Anthony
On Monday, August 22, 2011 8:30:18 AM UTC-4, Eric Scott wrote:
> Is the
I'd just like to add, that I looked into the session table, and it
seem to create a new entry for every click I have in the website, when
I'm using postgres, while in sqlite, no new entry created.
On Aug 22, 4:26 pm, guruyaya wrote:
> Cosider this code for an app named test:
> Model: db.py
>
> db
Sounds like it keeps creating new sessions. Is the session cookie coming
back with each request?
On Monday, August 22, 2011 9:45:32 AM UTC-4, guruyaya wrote:
> I'd just like to add, that I looked into the session table, and it
> seem to create a new entry for every click I have in the website,
On Sunday, August 21, 2011 11:10:23 PM UTC-4, pbreit wrote:
>
> That seems unnecessary to me. Easy enough to command-click a link to open
> in a new tab/window.
I think most users won't know/bother to command-click, so a modal might be a
reasonable option.
> And you might not want to reload
User is a member of a group that is assing in auth_membership table... Then
for each group you need to define permission in auth_permission for the
group...
You have to give the group the permission :
create or read or update or delete or select
And the table you want the user in a particular gr
Forget... You need those line at least in the db.py to activate the crud :
from gluon.tools import *
auth=Auth(globals(),db)
Richard
On Mon, Aug 22, 2011 at 10:00 AM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:
> User is a member of a group that is assing in auth_membership table... Th
I have triying like this but not succeeded yet,
table += ""+ str(A(_href=URL('a', 'preview')) ,
IMG(_src=URL(r=request,c='static',f='images/preview.png'),_width="15",
_height="15" )) +""
+1 for modal option.
Why not make it optional.
Kenneth
On Sunday, August 21, 2011 11:10:23 PM UTC-4, pbreit wrote:
That seems unnecessary to me. Easy enough to command-click a link
to open in a new tab/window.
I think most users won't know/bother to command-click, so a modal
might
On Monday, August 22, 2011 11:11:12 AM UTC-4, sagar wrote:
> I have triying like this but not succeeded yet,
>
> table += ""+ str(A(_href=URL('a', 'preview')) ,
> IMG(_src=URL(r=request,c='static',f='images/preview.png'),_width="15",
> _height="15" )) +""
>
>
A few things:
- Do you
You can do this. This example comes straight from the web2py book.
http://web2py.com/book/default/chapter/05#Built-in-Helpers
A(IMG(_src=URL('static','logo.png'), _alt="My Logo"),
_href=URL('default','index'))
Matt Gorecki
On Aug 22, 9:11 am, sagar wrote:
> I have triying like this but not suc
Thanks Anthony and Matt
On Mon, Aug 22, 2011 at 9:24 PM, Matt Gorecki wrote:
> You can do this. This example comes straight from the web2py book.
> http://web2py.com/book/default/chapter/05#Built-in-Helpers
>
> A(IMG(_src=URL('static','logo.png'), _alt="My Logo"),
> _href=URL('default','index'))
hello , i downloaded the mercurial web2py and when i do
python.exe web2py.py and enter password in the initial server start, i got
the webpage of welcome app.
To enter the administrative interface i click and i got this error
*admin disabled because no admin password*
*
*
i was never asked the
Use the -a command line flag.
python web2py.py -a yourpassword
Matt
On Aug 22, 10:40 am, António Ramos wrote:
> hello , i downloaded the mercurial web2py and when i do
>
> python.exe web2py.py and enter password in the initial server start, i got
> the webpage of welcome app.
>
> To enter the
python web2py.py -a yourpassword
does not work
the error again
admin disabled because no admin password
2011/8/22 Matt Gorecki
> Use the -a command line flag.
>
> python web2py.py -a yourpassword
>
> Matt
>
> On Aug 22, 10:40 am, António Ramos wrote:
> > hello , i downloaded the mercurial
Try with a password longer than 5 characters
"António Ramos" escribió:
>python web2py.py -a yourpassword
>
> does not work
>the error again
> admin disabled because no admin password
>
>
>2011/8/22 Matt Gorecki
>
>> Use the -a command line flag.
>>
>> python web2py.py -a yourpassword
>>
>> Mat
On 22 ago, 14:14, António Ramos wrote:
> python web2py.py -a yourpassword
>
> does not work
> the error again
> admin disabled because no admin password
>
Tested to put a password longer.
Jose
I am using nyroModal which I think is a very nice modal plugin, but I really
think it is time to include jQuery UI in to web2py scaffold. so we an use
jQueryUI dialog.
This should work
http://pastie.org/2412537
Yes, there was a recent change in trunk -- the CRYPT validator now requires
passwords to be at least 4 characters, so I'm guessing that's the problem.
Anthony
On Monday, August 22, 2011 1:16:33 PM UTC-4, Roberto Perdomo wrote:
> Try with a password longer than 5 characters
>
> "António Ramos"
FYI, it appears this is now requiring at least a 4 character password for
'admin' (fine for production, but possibly annoying on local machine). Also,
note that if you enter a password shorter than 4 characters for 'admin', you
get no error feedback -- instead, when you later attempt to access '
Yeh, that's what I've found myself doing. Now that I'm just assuming
that the datastore is a list of objects identified by keys, I'm
getting on much better with it (although like you say, some of my
controller code is a little ugly but worth the price I think!)
Cheers
Dave
On Aug 21, 11:56 pm, h
I report this last week
Here :
http://groups.google.com/group/fameisfame/browse_thread/thread/8a65568330aa25dd/2014ffb6852c4874?lnk=raot&pli=1
I think I should open a issue...
Richard
On Mon, Aug 22, 2011 at 2:27 PM, fishwebby wrote:
> Yeh, that's what I've found myself doing. Now that I'm ju
Forget my comment... I didn't read carefully what you were trying to do...
I forgot also that my issue was only with self-referenced table...
Richard
On Mon, Aug 22, 2011 at 3:07 PM, Richard Vézina wrote:
> I report this last week
>
> Here :
> http://groups.google.com/group/fameisfame/browse_t
It's actually created by nus (Yota Ichino).
https://github.com/nus/web2py-for-fluxflex
You can send messages and ask questions from there.
On Aug 22, 2:24 am, Iceberg wrote:
> Omi Chiba,
>
> Thanks VERY MUCH for your effort on building the web2py installation
> package (a.k.a. library on fluxfl
Any ideas?
On 22 elo, 13:10, Henri Heinonen wrote:
> default/index.html:
> {{extend 'layout.html'}}
> cavityflow
> {{=form}}
> {{if image:}}
>
> Figure
>
> {{pass}}
>
> default.py:
> def index():
> form=FORM('nx:', INPUT(_name='nx', _value=20.0), BR(), 'ny:',
> INPUT(_name='ny', _value=20.0
where is cavityflow.gif fisically placed (i.e. in which folder)?
On 23 elo, 00:38, Niphlod wrote:
> where is cavityflow.gif fisically placed (i.e. in which folder)?
In the web2py folder, but I think I already know how to move it to
static/images folder with os.system, if necessary...
Any ideas?
Anyone planing to visit the European Capital of Culture a.k.a. Turku on
17-18.10 and maybe visiting PyCon Turku at the same time?
Kenneth
And the address is: http://fi.pycon.org/2011/
Anyone planing to visit the European Capital of Culture a.k.a. Turku
on 17-18.10 and maybe visiting PyCon Turku at the same time?
Kenneth
I get the same error? :(
On Aug 23, 3:50 am, Bruno Rocha wrote:
> This should work
>
> http://pastie.org/2412537
I just noticed when I try and use that class inside my search function
(in controllers/default.py) it works fine. So it must be something to
do with importing and using it?
On Aug 23, 3:50 am, Bruno Rocha wrote:
> This should work
>
> http://pastie.org/2412537
What have you tried?
Have you ever gotten *any* graphic image onto a web page with web2py?
I'd start with a known image at a known location.
and for debugging purposes, I'd add to your default/index.html a line
that said
Image from url: {{=image}}
Just to make sure I passed the right URL to the
Are you able to save the image files to /static/images?
If so, then you should be able to display them on a web page with this HTML
in your view:
Thanks Richard, i didnt quite understand your explanation but i think
i understand what role is based on this snippet from the book:
" Each group is identified by a name/role. Groups have permissions.
Users have permissions because of the groups they belong to."
Therefore it seems that Role is ju
I have a custom form for a SQLFORM.factory.
The form has two buttons:
Clicking either button will submit the form and request.vars will have
the correct value.
This works great until I try to LOAD my form as a component.
I was able to find out that when I LOAD my form, request.vars no
longer
This looks fantastic.
Got web2py up and running in 2 mins as advertised.
However when I tried to install the plugin_wiki I got the following
error.
"""
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the ser
I installed by pushing to github. That is the way.
http://zerp.ly/rochacbruno
Em 22/08/2011 23:00, "nic" escreveu:
> This looks fantastic.
> Got web2py up and running in 2 mins as advertised.
> However when I tried to install the plugin_wiki I got the following
> error.
>
> """
> Internal Server
The way Ajax form submissions are being done with jQuery, the value of the
submit button does not get sent with the post data. See
https://groups.google.com/d/msg/web2py/708hxAdDGKY/2bNwbQVXc04J for more
details (and possible workaround).
Anthony
On Monday, August 22, 2011 9:06:12 PM UTC-4, T
Thanks. Will fix it. I also have a pending patch to fix a concurrency
issue.
On Aug 22, 1:26 am, Adi wrote:
> Hi Massimo,
>
> Is there some sample code (a sample tasks.py) which we can look at
> while testing the new gluon/scheduler.py as an alternate to cron jobs?
>
> Also, in scheduler.py, I sp
The problem with modal is there are two ways to implement it:
1) using an ajax callback
2) loading one form per item with the page
1) is not a good solution because would require the programmer to
create the callback. It is one more step and one that scares lots of
people.
2) will make ages heavy
>
> Anyway, let me know how you think it should work, perhaps I am missing
> something and I am sure it can be improved.
Welcome already comes with default/data which is an API for crud, I do that
in PowerGrid plugin, buttons calls default/data passing record id (with
signature).
No need to writ
You are right. check trunk, there is a solution.
On Aug 22, 12:03 am, Jonathan Lundell wrote:
> On Aug 21, 2011, at 8:17 PM, Massimo Di Pierro wrote:
>
> > Do you suggest reverting the patch?
>
> It does break existing installations.
>
> The real fix is to enforce password-strength rules when pas
I think there should be a recommended way to created branded versions
of web2py.
I would recommend:
- getting the latest official stable
- unzip
- add your own "init" app, with landing branded page etc, linking
admin.
- have a standard mechanism to add a brand logo to admin as well
- rezip and dis
CRYPT is a filter and it output the hashed password. I do not see how
one could perform any other validation on the hashed string. One could
do something more sophisticated with the line below but I do not see
what case would be catching.
On Aug 22, 10:19 pm, Anthony wrote:
> On Monday, August 22
On Monday, August 22, 2011 10:47:05 PM UTC-4, Massimo Di Pierro wrote:
>
> You are right. check trunk, there is a solution.
>
*try: table_user[passfield].requires[-1].min_length = 0*
Why do you only reset min_length to 0 if CRYPT is the last validator in
requires? Would it be safer to specific
So you agree this can be done by simply using custom links?
Would be nice to see an example.
On Aug 22, 9:44 pm, Bruno Rocha wrote:
> > Anyway, let me know how you think it should work, perhaps I am missing
> > something and I am sure it can be improved.
>
> Welcome already comes with default/dat
I am a bit lazy to hack my own register form,
is there a simple way to remove the need of "Verify Password from
auth/register?
I want the user only to use [name, email, password, submit], I know how to
do that hacking a bit or using custom forms. But, is there an API way?
( auth.settings.verify
Good point, I wasn't thinking about that. Actually, probably worth
mentioning in the book (i.e., if you're using CRYPT, generally a good idea
to make it the last validator).
Anthony
On Monday, August 22, 2011 11:27:16 PM UTC-4, Massimo Di Pierro wrote:
> CRYPT is a filter and it output the ha
No but there will be in 2 minutes.
auth.settings.login_verify_password = False
On Aug 22, 10:37 pm, Bruno Rocha wrote:
> I am a bit lazy to hack my own register form,
>
> is there a simple way to remove the need of "Verify Password from
> auth/register?
>
> I want the user only to use [name, em
Well, you had to wait a whole 20 minutes, but Massimo is on the case:
http://code.google.com/p/web2py/source/detail?r=2c1f4c7f4f8e7e286d561688a16b08d139d5ea62
.
Maybe it should be called settings.register_verify_password, since it's on
the registration form, not the login form.
Anthony
On Mo
For us newbe's, will there be a small tutorial or blogpost showing us
how to use it. That will be really cool...good work guys!!
On Aug 22, 8:29 pm, Massimo Di Pierro
wrote:
> So you agree this can be done by simply using custom links?
> Would be nice to see an example.
>
> On Aug 22, 9:4
web2py is amazing! I love it!
Thannk you Massimo!
When you come to Brazil, I will buy you a coffee (or a beer) :P
On Tue, Aug 23, 2011 at 1:04 AM, Anthony wrote:
> Well, you had to wait a whole 20 minutes, but Massimo is on the case:
> http://code.google.com/p/web2py/source/detail?r=2c1f4c7f
Please also post a little tutorial - like running a background task defined
in a module periodically - a good sample mytasks.py with code snippets to
run those tasks programmatically. Thanks.
On Tue, Aug 23, 2011 at 8:03 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> Thanks. Will fi
Response:
Set-Cookie session_id_test="20:77d04bbb-ef21-4a1b-9dd2-b11c05a893c3";
Path=/
F5
Request:
Cookie ... session_id_test="20:77d04bbb-ef21-4a1b-9dd2-
b11c05a893c3"; ...
Reponse:
Set-Cookie session_id_test="21:ea5b59f9-0f3e-4da0-be10-62dbead8502a";
Path=/
These are the database reco
70 matches
Mail list logo