On Wed, 9 Nov 2011 02:26:44 -0200
Vinicius Assef
wrote:
> Massimo,
> what about putting the book text in a dvcs? (git, hg, etc.)
+1
Sincerely,
Gour
--
Those who are on this path are resolute in purpose,
and their aim is one. O beloved child of the Kurus,
the intelligence of those who are
Appreciate it...
I think only texts are sufficient.
We can send patches to Massimo (or somebody else) merge them in.
--
Vinicius Assef.
On Wed, Nov 9, 2011 at 4:36 AM, Anthony wrote:
> On Tuesday, November 8, 2011 11:26:44 PM UTC-5, viniciusban wrote:
>>
>> Massimo,
>> what about putting the book text in a dvc
On Tuesday, November 8, 2011 11:26:44 PM UTC-5, viniciusban wrote:
>
> Massimo,
> what about putting the book text in a dvcs? (git, hg, etc.)
>
> Wouldn't it simplify updates?
>
Should include the whole book app -- otherwise it would be difficult to see
the results of edits made on your local mach
No, that should never have worked. To do 'if table:', 'table' does have to
be defined, and it will only be defined if passed from the controller.
Here's what you can do:
{{if 'table' in globals():}}
or if there's a chance that when 'table' is actually returned it could be
None/False/empty and
I have a controller/view like these:
def control():
if some_condition():
return dict(form=form)
else:
return dict(form=form, table=get_table())
{{extend 'layout.html'}}
{{=form}}
{{if table:}}{{=table}}{{pass}}
i.e. 'form' is always present in the view and 'table' sometim
Use RBAC after referring book . Web2py having very good Roll
based authentication and access control . Can you please define your
problem in more precise manner .
Massimo,
what about putting the book text in a dvcs? (git, hg, etc.)
Wouldn't it simplify updates?
--
Vinicius Assef.
On Wed, Nov 9, 2011 at 1:15 AM, Massimo Di Pierro
wrote:
> No but email me.
> On Nov 8, 2011, at 6:54 PM, mikech wrote:
>
>> I was wondering if there was any 'bug' tracking in
ok, i have done so much using this really really cool technique.
anyway, how do i pass a function reference to a "global" storage
context so that the standard views that are stored under views are
rendered properly, like in the above examples?
lucas
This is my 7th day using web2py. I have my CAS working properly. But I
have to manually login with same username to each app. Is this normal?
How to make it automatically once login for all? All apps are on the
same domain. Actually I haven't set anything or change any code. The
new web2py did it f
No but email me.
On Nov 8, 2011, at 6:54 PM, mikech wrote:
I was wondering if there was any 'bug' tracking in relation to the
documentation. It might be a good idea to track the corrections,
and changes.
Very nice summary. Thanks.
On Tuesday, November 8, 2011 6:30:26 PM UTC-5, BrendanC wrote:
>
> FWIW - I just create a new posting with some code that addresses the
> issues mentioned here.
>
> Here's the link:
> https://groups.google.com/forum/#!topic/web2py/CEHLCbMCPw0
>
> Over and Out
> Brend
oh ! I could did it.
As I suspected, my "image=form.vars['test']" was not correct.
Here is the solution :
db.image.insert(name='test',
image=db.image.store(form.vars['test'].file))
On Nov 9, 9:57 am, Alex wrote:
> I'm creating a field and add it to the form like this :
>
> form = SQLFORM(db.ima
When I looked at how the generated sample app handled showing that
there was an error with logging in, it showed the message in a flash
area in the view. To be clear here: the controller is a two-liner:
def user():
return dict(form=auth())
so there is no setup in the controller, as it relates
I'm creating a field and add it to the form like this :
form = SQLFORM(db.image)
my_extra_element = TR(LABEL('test') ,INPUT(_name='test',_type='file'))
form[0].insert(-1,my_extra_element)
if form.process().accepted:
db.image.insert(name='test', image=form.vars['test'])
Maybe my "image=fo
I was wondering if there was any 'bug' tracking in relation to the
documentation. It might be a good idea to track the corrections, and
changes.
I am wondering about that. mmm
On 11/03/2011 10:53 PM, apple wrote:
My mistake. I tend to redirect because I need some extra processing
but grid does actually produce a basic edit form. If you do use the
grid generated form then the submit should work as normal though. You
should check where it
With the hint from SAE Python maintainer, I use __file__ to solve the
path problem.
$ pwd
~/src/web2py_sae/3
$ gvim config.py &
import os
app_root = os.path.dirname(__file__)
$ gvim gluon/main.py &
from config import app_root
version_path = os.path.join(app_root, 'VERSION')
version_info = open(ver
FWIW - I just create a new posting with some code that addresses the issues
mentioned here.
Here's the link: https://groups.google.com/forum/#!topic/web2py/CEHLCbMCPw0
Over and Out
BrendanC
OK - I posted earlier on this thread
https://groups.google.com/forum/#!topic/web2py/8yypDdtmG9g and vented some
frustration re the handling of computed columns. Rather than clutter up the
old threat I'm creating a new thread that contains the code that solves my
problem.
Feel free to offer alt
What is this code supposed to do?
records=db(query).select()
for record in records:
Ct=Ct+record.CtReb
if selection.accepts(request.vars,keepvalues=True):
pass
On Nov 8, 8:02 am, JmiXIII wrote:
> Hello,
>
> I have something like:
>
> selection=FORM(TABLE(TR(
>
Is there a div with the id of 'flash' in your view?
On Nov 8, 11:14 am, Matt wrote:
> Greetings,
> We are currently experiencing an issue with invalid logins not showing
> errors. For auth we are using a combination of basic auth and PAM, and
> the actual controller/view combo for the login form
db.define_table("company",
Field("name", "string"),
Field("guilds", db.guilds)
)
Also, see IS_NOT_IN_DB and IS_IN_DB in the online book,
http://www.web2py.com/book/default/chapter/07
On Nov 8, 1:18 pm, demetrio wrote:
> Hi everyone,
>
> i'm starting a new project with web2py, and now i
On Tuesday, November 8, 2011 4:20:32 PM UTC-5, Zphen wrote:
>
> I've been working around it to date but been thinking of delving into
> the world of the JSON serializer to see how hard it would be to make
> the _extra fields come through properly.
>
web2py's custom JSON serializer first calls th
Not sure if I understand your issue. Have you set up the session.flash
in your controller and the value of it is not showing off ? Are you
doing a redirect when the login failed ?
Maybe if you show us a sample of your code we may have a better
understanding of your issue.
Cheers,
On Nov 8, 11:1
Ive got to say that this is an annoyance for me too.
I've been working around it to date but been thinking of delving into
the world of the JSON serializer to see how hard it would be to make
the _extra fields come through properly.
Problem is that DAL would also have to be touched to provide the
Forgot this link :
http://web2py.com/book/default/chapter/07#One-form-for-multiple-tables
On Tue, Nov 8, 2011 at 4:04 PM, Richard Vézina
wrote:
> Hello Daniel,
>
> I suggest you to normalized your schema before using feature like
> list:reference that impose denormalisation to work... If your mod
Hello Daniel,
I suggest you to normalized your schema before using feature like
list:reference that impose denormalisation to work... If your model is only
a bit complexe you will be rapidly always making trade off between ease of
implementation of interface with web2py feature and good design
pra
Hello,
Im not sure if I fully understand your example but I believe that the
relation:
"Contruction and Company" is a many to many relationship so you just
need to have a third table in the middle
Construction <---> Reference <> Company
and Reference is a third table that keep track of the com
another :p
and it is used internally by the *SQLFORM.gird *and SQLFORM.smartgrid.
Should be SQLFORM.grid instead of SQLFORM.gird
in http://web2py.com/book/default/chapter/06#smart_query-%28experimental%29
On Mon, Nov 7, 2011 at 5:54 PM, Anthony wrote:
> FYI, I am not specifically looking for
On Tuesday, November 8, 2011 2:18:59 PM UTC-5, BrendanC wrote:
>
> After 4/5 years of development I can't be the first person to deal with
> this issue.
>
Perhaps, but it's the first time I've seen it come up.
>>
as you have discovered, there are issues when converting to formats like
JSON.
>>
Agreed - In an 'Ajaxy' web world it it important to 'play nice' with
things like json and making this clean this should not be an afterthought.
(FWIW/BTW If I were comparing frameworks for serious Web develop
It worked !!
Thanks again!
On Nov 8, 12:43 pm, Paolo Caruccio wrote:
> Omi,
>
> please try the following:
>
> in vhost_web2py.conf replace
>
>
> ServerName ochiba-183
>
> with
>
> ServerName ochiba-183
>
> where LIP is the server's IP
>
> See for reference my previous post (STEP D)
>
> Let me k
On Tuesday, November 8, 2011 1:42:25 PM UTC-5, BrendanC wrote:
>
> In the case of computed columns it took me a while to understand the use
> of the '_extra' construct.
>
I agree. I'm working on better documentation of the use of expressions in
general, and in selects (i.e., computed columns) in
Omi,
please try the following:
in vhost_web2py.conf replace
ServerName ochiba-183
with
ServerName ochiba-183
where LIP is the server's IP
See for reference my previous post (STEP D)
Let me know if it works.
Paolo
P.S. Moreover what do you think about to change the thread title to Windo
Anthony,
Thx for your feedback - I agree that this should be handlled on the server
- I just wanted to illustrate how ugly the response processing becomes
using the default features of web2py.
BTW/Off topic - Web2py is great and the user community/support is active.
However as someone just di
Hi everyone,
i'm starting a new project with web2py, and now i'm defining the model
of the app and i have some questions.
the "classical" and simplified model (there are lots of tables but the
questions are about those) is something like:
Table 'companies'
- id_company
- name
-
Tabl
The problem with using a view is that Web2py/Django/Rails is that they all
expect a unique id field in the result set. If you create your views with a
dummy id field you may be able to use it as a 'pseudo' table. However you
still need to somehow populate that field with a unique value. Also
u
On Tuesday, November 8, 2011 1:01:08 PM UTC-5, BrendanC wrote:
>
> @Massimo - your response assumes the data is being consumed in python, not
> in a json response which is where it gets ugly - see the code below.
>
> @Anthony,
> per your suggestion I think the data needs some additional processi
Thanks Anthony. It's all working as expected now.
My confusion was between calling the filename through form and calling it
through db.
On Tue, Nov 8, 2011 at 11:33 AM, Anthony wrote:
> The new name is stored in the 'attachment' field of the record inserted.
> After the form.accepts, you can a
@Massimo - your response assumes the data is being consumed in python, not
in a json response which is where it gets ugly - see the code below.
@Anthony,
per your suggestion I think the data needs some additional processing
before returning a response - in which case why not skip the dal and
Looks great,
Nevertheless
http://web2py.com/new_examples/default/what
After The best way
=> too much to read and to compact, a more visual,structured presentation
would be easier to read
i have so many group, i want according to group user can access the
data. For example admin have all controls of CURD,normal user can
view data , manager van view and edit, some other user can view only
few tabs of menu.Please help me i am able to do . i have more then 50
tabs, tab have also show
i want to configure the mail in google appengine. i try in smtp server
gae , but its not work.
h..
Seems that I need to return js code lines (not js function) from
controller & get going ahead.
btw, I have found one line jquery code for selecting value of select
box.
"$('#element_id option[value=%s]').attr('selected', 'selected');" %
adict['key']
Thanks for your responses Anthony.
---
Not sure Why but it just doesn't happen anything:
from gluon.contrib.login_methods.ldap_auth import ldap_auth
auth.settings.login_methods=[ldap_auth(mode='company',server='mycompany.com
',base_dn='ou=myou,o=mycompany.com')]
auth.settings.actions_disabled=['register','change_password','request_rese
h..
Seems that I need to return js code from controller.
btw, I have found a one-line jquery code for this-->
"$('#element_id option[value=%s]').attr('selected', 'selected');" %
dict_obj['key']
This works & I will proceed with this, for time being.
Thanks for your responses Anthony.
--- Vine
The new name is stored in the 'attachment' field of the record inserted.
After the form.accepts, you can also access it via form.vars.attachment
(and for backward compatibility, form.vars.attachment_newfilename).
Anthony
On Tuesday, November 8, 2011 10:33:07 AM UTC-5, D.P. wrote:
>
> Thanks for
Greetings,
We are currently experiencing an issue with invalid logins not showing
errors. For auth we are using a combination of basic auth and PAM, and
the actual controller/view combo for the login form is basically the
same as the generated scaffolding. When an invalid username/password
is enter
_extra is how web2py stores non-field values (e.g., the results of
expressions, such as aggregate functions) within Row objects. When you
access the item directly by subscripting the Row object, web2py
transparently retrieves it -- that is, tagsummary[0](count) will retrieve
the count from the
How?
On Nov 8, 7:04 am, Tito Garrido wrote:
> Hi folks!
>
> I'm trying to redirect to a different page after login using ldap
> authentication but it just sends me to index... is it a bug?
>
> Regards,
>
> Tito
>
> --
>
> Linux User #387870
> .
> _/_õ|__|
> ..º[ .-.___.-._| . . .
for row in tagsummary: print row(count)
On Nov 8, 2:09 am, BrendanC wrote:
> I'm trying to retrieve some summary data via an Ajax request with the
> following controller method.
> This is just a simple result set containing a list of tag names and usage
> counts retrieved in a JOIN query. Here's
Thanks for the information Andy.
The documentation states that you can retrieve renamed file from the
'attachment' field, but I'm not sure exactly how. I can get the pointer
(', mode 'w+b' at 0x02549440>) by using
request.args.attachment.file and also the temp filename by adding
.name--but that s
Paolo,
People can access the site by server name but not IP.
Do you know how to change the configuration ?
http://ochiba-183/welcome/default/index (OK)
http://10.30.6.122/welcome/default/index (NG)
On Oct 12, 1:14 pm, Paolo Caruccio wrote:
> Well done!
>
> Paolo
Yes, that thread describes the problem. I had realized it had to do
with the URL and found a different workaround. Instead of building a
new URL and passing it to crud via next=, I set up an 'onaccept'
function which sets up a session.flash and then redirects as desired.
This is working! Still,
In my application I use computed fields in two ways. Examples:
Name is represented in record as separate fields, e.g., Title, First
name, Last name, Suffix. Use a computed field to concatenate last+first
+title+suffix and convert to lower case to make a field for use in
sorting for display.
Use a
On page: http://web2py.com/new_examples/default/download
"Nightly Built" should be "Nightly Build"
Otherwise, the site looks very nice.
On Mon, Nov 7, 2011 at 4:31 PM, Omi Chiba wrote:
> Looks great !
>
> Can you add the link to web2py Japan under Documentation - Community
> sources - Sites ?
>
My new index.wsgi is as follow:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sae
from gluon.settings import global_settings
global_settings.web2py_runtime_gae = True
import gluon.main
app = gluon.main.wsgibase
application = sae.create_wsgi_app(app)
#application = app
And I also have
Here is what you are looking for
https://github.com/lucasdavila/web2py-cms
Import wordpress xml into web2py-cms automatic, implement ckeditor, and
others functions.
Ovidio Marinho Falcao Neto
Web Developer
ovidio...@gmail.com
ovidiomari...@itjp.net
I think you need .options[i] rather than .options(i). Anyway, it's
generally easier to do this kind of thing with jQuery rather than raw
Javascript.
Anthony
On Tuesday, November 8, 2011 9:04:41 AM UTC-5, Vineet wrote:
>
> Something is wrong in the function.
> I defined a test js function in Vi
Has anyone successfully implemented the HTML5 offline storage
capability using web2py running on its native rocket server?
I keep getting a "Application Cache Error event: Invalid manifest mime
type (text/plain) " on Google chrome for the cache.manifest file and I
don't know how to configure the ro
I checked the js returned from controller function.
It is
selbx('edit_freq','daily');
selbx function is there in the View.
-- Vineet
On Nov 8, 7:04 pm, Vineet wrote:
> Something is wrong in the function.
> I defined a test js function in View.
>
> function alrt(mesg) {
> alert(mesg) };
>
>
No. I said probably you're using format() in a version it is not
supported yet. But I'm not sure about it.
I never lay on server locale dependancy.
I live in Brazil, and here we have numbers formatted this way:
"1.000,00". (dot separates thousands. Comma separates decimal).
So, I did this simple
Something is wrong in the function.
I defined a test js function in View.
function alrt(mesg) {
alert(mesg) };
And in Controller,
return "alrt('Hello World!');"
It works.
The actual js function is---
(it sees which value of select box matches the one returned from
controller; then sets the valu
Hi,
Ok this sound good, I figured i could, I was thinking of storing
session in database, but I don't think user will be logged into the 2
apps at the same time, and I don't really want a complicated CAS
setup.
Regards,
Nils
On Tue, Nov 8, 2011 at 12:55 PM, Anthony wrote:
> On Tuesday, Novembe
On Tuesday, November 8, 2011 8:44:07 AM UTC-5, rochacbruno wrote:
>
> if you store sessions in a shared database you can be logged in both apps.
>
Oh, right.
> I still have no success running cas with a custom auth table.
>
Did you submit an issue?
On Tuesday, November 8, 2011 8:17:41 AM UTC-5, Vineet wrote:
>
> > If 'myvar' is a Python variable, you're going
>
> 'myvar' is a not a python variable.
> I pass the id of html element as argument.
> Javascript code sets the value of that html element.
OK, but same problem -- 'myvar1' isn't a
if you store sessions in a shared database you can be logged in both apps.
I still have no success running cas with a custom auth table.
http://zerp.ly/rochacbruno
Em 08/11/2011 10:55, "Anthony" escreveu:
> On Tuesday, November 8, 2011 7:08:08 AM UTC-5, rochacbruno wrote:
>>
>> Yes it works wel
On Mon, 7 Nov 2011 05:41:23 -0800 (PST)
Ross Peoples
wrote:
> Since I would regularly use and CMS/Blog functionality, I would be
> happy to contribute code and test it, as I would probably be using it
> every day. I would also have regular users play with it and
> incorporate their feedback into
> Probably a typo, but missing the closing single quote (') after the }} for
> the URL.
It is a typo here. It is correct in actual code.
> If 'myvar' is a Python variable, you're going
'myvar' is a not a python variable.
I pass the id of html element as argument.
Javascript code sets the value o
Hi Vinicius,
You mean I can use str.format() to format numbers with thousand
separators instead of my function ?, that would be great Could you
give me an example ??
Thanks
On Nov 7, 6:42 pm, Vinicius Assef wrote:
> Possibly the python version in your production server.
>
> str.format() is avai
On Tuesday, November 8, 2011 7:45:59 AM UTC-5, Vineet wrote:
>
> In a View, there is --> ajax('{{=URL("salhead_edit")}}, [],
> ':eval');
>
Probably a typo, but missing the closing single quote (') after the }} for
the URL.
> "salhead_edit" returns js function --> 'abc(myvar1)'
>
Unless 'm
Hi folks!
I'm trying to redirect to a different page after login using ldap
authentication but it just sends me to index... is it a bug?
Regards,
Tito
--
Linux User #387870
.
_/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:___
Hello,
I have something like:
selection=FORM(TABLE(TR(
TD('Début',INPUT(_name='Deb'),
_class="date", requires = IS_DATE(error_message=T('Doit être de la forme
-MM-JJ !'))),
TD('Fin',INPUT(_name='Fin',_class="date", requires =
IS_DATE(error_message=T('Doit
Sorry I open a new discussion
Hello,
I have something like:
selection=FORM(TABLE(TR(
TD('Début',INPUT(_name='Deb'),_class="date", requires =
IS_DATE(error_message=T('Doit être de la forme -MM-JJ !'))),
TD('Fin',INPUT(_name='Fin',_class="date", requires =
IS_DATE(error_message=T('Doit
On Tuesday, November 8, 2011 7:08:08 AM UTC-5, rochacbruno wrote:
>
> Yes it works well.
>
> You can also use *cas* to share authentication between applications.
>
> But the approach using same db for both applications is better, but note
> that both applications should have the same *hmac_key* fo
How this sharing one database works with SQLLite file lockig?
It looks like you have attempted to directly store the cgi.FieldStorage
object in the db field, which won't work. Please show the code used to get
the file uploaded.
On Tuesday, November 8, 2011 6:16:11 AM UTC-5, Alex wrote:
>
> I don't know why, but when I upload an image, the uploads folder is
In layout.html, I have
{{response.files.append(URL(r=request,c='static',f='js/xyz.js'))}}
xyz.js contains a function abc(x){ code line1; code line 2;
In a View, there is --> ajax('{{=URL("salhead_edit")}}, [],
':eval');
"salhead_edit" returns js function --> 'abc(myvar1)'
But it is not ev
In layout.html, I have
{{response.files.append(URL(r=request,c='static',f='js/xyz.js'))}}
xyz.js contains a function abc(){ code line1; code line 2;
In a View, there is --> ajax('{{=URL("salhead_edit")}}, [],
':eval');
"salhead_edit" returns js function --> 'abc(myvar1)'
But it is not eval
I can help with development. We need this functionality. Sort of like a
reverse Drupal in that web2py would be a framework that also does CMS.
In layout.html, I have
{{response.files.append(URL(r=request,c='static',f='js/xyz.js'))}}
xyz.js contains a function abc(){ code line1; code line 2;
In a View, there is --> ajax('{{=URL("salhead_edit")}}, [],
':eval');
"salhead_edit" returns js function --> 'abc(myvar1)'
But it is not eval
Yes it works well.
You can also use *cas* to share authentication between applications.
But the approach using same db for both applications is better, but note
that both applications should have the same *hmac_key* for auth instance.
On Tue, Nov 8, 2011 at 9:06 AM, Nils Olofsson wrote:
> Hi,
>
Yes, you can use CAS pointed to just one application ... very easy to setup
... see here
http://www.web2py.com/book/default/chapter/08#Central-Authentication-Service
2011/11/8 danto that was me, sorry
>
> 2011/11/8 BrendanC
>
>> Daniel,
>> Not sure what you are asking, but this might help you:
>>
>> Virtual fields are otherwise known as 'computed columns' in database
>> terms - if that is what you are familiar with. e.g. Sum, Count, Min, Max,
>> etc
2011/11/8 BrendanC
> Daniel,
> Not sure what you are asking, but this might help you:
>
> Virtual fields are otherwise known as 'computed columns' in database terms
> - if that is what you are familiar with. e.g. Sum, Count, Min, Max, etc as
> these values are derived from underlying table data i
I don't know why, but when I upload an image, the uploads folder is
empty !
In my table I can see :
FieldStorage('800x480', 'a800x480.jpg', '\xff\x . xe0\x00')
In my view I'm doing this :
{{=myTable.name}}
I can see the name of my image, but no image (that makes sense because
my uploads fo
I'm also very interested in getting more CMS functions into web2py.
I can help with:
- testing
- server resources if needed
- setting up bugtracker, wikipage
I think a own mailinglist and a wiki page first. Very soon a bugtracker.
Maybe a web2py based bugtracker.
Kenneth
I have
Hi,
Just wondering if this is possible, I think it should be...
I have a 2 web2py application, but i want them to have a common
authentication db.
I was thinking of doing this in the model DB for both.
authdb = DAL('mysql database')
Then
auth = Auth(globals(),authdb)
I have now tested this
Hello,
I am trying to integrate the Janrain Social Widget to my project.
For the moment i have user authentication with Janrain but i am having
problems adding the Social Widget.
The instructions from Janrain say:
1) Download the rpx_xdcomm.html file and place it in the root
directory of your w
I can help with docs.
On Tue, Nov 8, 2011 at 2:44 AM, ~redShadow~ wrote:
> I have quite large experience with Drupal, which I used since 2006 tu
> build pretty much everything web-related, from websites to applications,
> often using it more as a framework than a CMS.
> That project is great, but
Daniel,
Not sure what you are asking, but this might help you:
Virtual fields are otherwise known as 'computed columns' in database terms
- if that is what you are familiar with. e.g. Sum, Count, Min, Max, etc as
these values are derived from underlying table data in a database.
A database view
I'm trying to retrieve some summary data via an Ajax request with the
following controller method.
This is just a simple result set containing a list of tag names and usage
counts retrieved in a JOIN query. Here's the code:
def gettagsummary():
'''
Get list of tags and related counts (fr
94 matches
Mail list logo