Seems that the best way to do this is
@auth.requires_login()
def index():
"""
Redirects user to the appropriate controller based on the group user
belongs
to
"""
if auth.has_membership('student'):
redirect(URL(f=workspace))
elif auth.has_membership('instructor'):
> You just have to upload and submit the plugin_wiki file throught /appadmin,
Just like another app, correct?
I am asking because I got and error saying like auth_user table does
not exists.
What if I would like to use the plugin without authentication?
When I expose this function in controller locatormail:
def send_mail():
m_list=db(...) .select(...)
for item in m_list:
context=dict(item=item)
message=response.render('locatormail/send_mail.html',context)
recipient=item.contactpersoon.email
boolean=mail.sen
Not quite.
Make a new app.
Open the app in design/admin.
Install the plug-in by scrolling down to the bottom of the admin page
to where it says install plug-in.
Good luck!
On Oct 20, 8:57 am, Timmie wrote:
> > You just have to upload and submit the plugin_wiki file throught /appadmin,
>
> Just
I'm using plugin_wiki to build a blog and wiki site. (plugin_wiki is
fantastic for this - thanks Massimo!)
I would like to use a jQuery syntax highlighter instead of the built-in one.
Most of these highlighters require 2 CSS classes, eg:
def test():
blah blah
If I use the markmin code syn
How do I enter the T() stuff in pages created with plugin_wiki?
Regards
Johann
--
May grace and peace be yours in abundance through the full knowledge
of God and of Jesus our Lord! His divine power has given us
everything we need for life and godliness through the full knowledge
of the one wh
That makes sense about routes.py for multiple sites not being a production
setting because web2py will be serving static files. Also, this is the same
for the "Tip of the day. The power of routes" setup (perfect for me now with
small development sites but hopefully not in the future)!
Going back
Hi,
I'm trying to set up a controler with a form that reproduce some fields
of a db table I have in my models because I want to mix information that
goes in db table with other fields I need. The problem is when I try to
reproduce a field (the last one here under) that is an external
reference
Hello again.
I have a new question.
The current way of using jqgrid is with plugin_wiki? Even in the view
or controller?
How would I do to implement a grid like this:
Table user
id, name, email, money, deposit, withdraw
The id field must have a link for editing the user.
Add and drop fields sho
thanks richard, this a personal project. Google analytic in the next
beta i will add as a widget. I want to do my own implementation of
lightbox, but i have some others priorities, but you can always can
add yours javascripts, i recommend you to take a look to customization
in project page, you can
http://www.web2py.com/book/default/chapter/12?search=populate
On Oct 20, 1:09 am, Luther Goh Lu Feng wrote:
> I am also trying to prepopulate my database with records similar
> tohttp://groups.google.com/group/web2py/browse_thread/thread/4a80b47d81...
>
> What is the best way to achieve this in w
Sorry. You cannot.
On Oct 20, 5:36 am, Tom Atkins wrote:
> I'm using plugin_wiki to build a blog and wiki site. (plugin_wiki is
> fantastic for this - thanks Massimo!)
>
> I would like to use a jQuery syntax highlighter instead of the built-in one.
> Most of these highlighters require 2 CSS clas
You cannot. You can try
``
{{=plugin_wiki.render(str(T(data))}}
``:template
where data contains plugins wiki markup
On Oct 20, 5:37 am, Johann Spies wrote:
> How do I enter the T() stuff in pages created with plugin_wiki?
>
> Regards
> Johann
>
> --
> May grace and peace be yours in abundance
My best guess is that the problem is here:
dbutils.getAllColumns(pgdb_th2,session.nome_tabella)
and if session.nome_tabella contains something invalid you get an
invalid SQL query which aborts the transaction.
On Oct 20, 6:27 am, Manuele Pesenti wrote:
> Hi,
> I'm trying to set up a controler w
In model:
db.table.field.represent=lambda value:A('click me',_href=value))
and this will be used by jqgrid
On Oct 20, 6:41 am, Savio Sabino wrote:
> Hello again.
> I have a new question.
> The current way of using jqgrid is with plugin_wiki? Even in the view
> or controller?
>
> How would I do
Hi Mart,
Thanks for your detailed explanation. I had tried before with out any
results. I tried it again anyway from scratch and here is the error I
get when trying to import MySQLdb
>>> import MySQLdb
Traceback (most recent call last):
File "", line 1, in
File "build/bdist.macosx-10.6-univ
Thanks this is nice solution. And very thanks for the great
framework.
And now... How do I add the two fields (deposit and withdraw) that no
store data and be used only in the view?
Must create a virtual copy of this table for and add fields? How?
Take this opportunity to mention that I am newbie
I never tried but you can try define virtualfields:
http://www.web2py.com/book/default/chapter/06?search=virtualfield
and they should appear in jqgrid
On Oct 20, 9:35 am, Savio Sabino wrote:
> Thanks this is nice solution. And very thanks for the great
> framework.
>
> And now... How do I add
I think it's more or less what I'm looking for. The difference is that
instead of making a calculation as in the example, I put the onclick
event which calls the ajax function to load a template type and puts
the data in one modal.
Overall, things became more practical than I thought.
Now I'm going
did you specified both migrate and fake_migrate ?
2010/10/20 mart
> forgot to mention something a well...
>
> I think the issue I had was related to yours with the migration,
> because creating a table, without specifying migrate= produces the
> following exception while defining a table. That
In my experience the dal.py does not work stand alone, however sql.py does.
Table migrations have always worked for me when using standalone.
--
Thadeus
On Wed, Oct 20, 2010 at 9:58 AM, Bruno Rocha wrote:
> did you specified both migrate and fake_migrate ?
>
> 2010/10/20 mart
>
> forgot to
Near of it... Your list comprehension is doing much simpler then I were
doing what it should do.
But the problem is still there...
First the
[f for f in db['table1'].fields if f not in BlackList]
Return a list (['field1','field2', etc.]) without the rest of the
information needed : "db.table"
I have had similar problem. Here is what you could do. Dont think about the
page you click on but where you are redirecting. Get or post the parameters you
want into the next page that is telling you to wait. Then on the "telling you
to wait" page you take the parameters and start looking. As lo
Hello,
I try to develop a generic function that could show a data grid and expose
differents fields depending of specific group of users. So I have a series
of table that are very similar. They contain fields that are not necessarily
usefull for all users so I do not want to show these fields.
SQ
Just to test...
There is often a lag time between the time I sent an email and the time it
appears on the list.
Richard
There are two options. First is HTML refresh:
which will request your page every 5s and then you show either "please
wait" message or the results of the background processing if it's
finished.
Second is Javascript + AJAX asynchronous poll, see the examples in the
web2py book:
http://web2py.com/bo
The first version protects from the case m_list is empty so IMHO it is
better. I don't think that is what you are experiencing with the local
vs remote web server observation.
On Oct 20, 3:00 am, annet wrote:
> When I expose this function in controller locatormail:
>
> def send_mail():
> m_li
I am using sql.py, but migrations is not working
2010/10/20 Thadeus Burgess
> In my experience the dal.py does not work stand alone, however sql.py does.
>
> Table migrations have always worked for me when using standalone.
>
> --
> Thadeus
>
>
>
>
>
> On Wed, Oct 20, 2010 at 9:58 AM, Bruno Roch
look:
"connect.py"
>>> from gluon.sql import *
>>> db = DAL('sqlite://timeclock1.db')
>>> Track =
db.define_table('track',Field('regnumber','integer'),Field('action','integer'),Field('timestamp','datetime'),migrate='track.table')
"Form_workflow.py"
>>> Track.insert(regnumber=123,action=2,timestam
I sent it on monday to your @cs.depaul.edu account
On Oct 18, 10:33 am, mdipierro wrote:
> can you please email it to me?
>
> On Oct 18, 10:30 am, Josh J wrote:
>
> > Hey Massimo,
>
> > I've taken the initiative and built a patch to allow encoded
> > credentials in database URIs.
>
> > The follo
hum.. interesting... just got what you meant by dal vs sql now
that I think of it, Massimo did mention that dal was a 2nd rev of sql
and that it was experimental. but, that said. I have been using dal,
not sql. I did have to tweak a few things to make it work, but in
general, works great for m
That error only gets called for two reasons.
1. The table has already been defined.
2. The tablename starts with a _
Your entire application is getting restarted yes/no? The DAL object gets
instantiated with *every* request in web2py, it only stays in memory during
the life of the request, not th
It seems to be a bug that web2py is not reporting the correct error message.
It says invalid tablename if it is already defined, yet it should report
that the table already exists... I'll send a patch to Massimo.
--
Thadeus
On Wed, Oct 20, 2010 at 11:28 AM, mart wrote:
> hum.. interesting...
I would try this:
trackTable = track.table (just something that is clearly different
where trackTable is just a string. I'm a little paranoid when coding,
so I would probably add something to check the type, then a
str(tackTable)... but, that's probably over doing it ;)
I think the issue really
few questions:
* were you able to install it without any errors?
* that pah below... is pointing to temp... Can you check where it has
been installed to and are sure that what you have os for 2.6, and not
2.7? - 2.6 is you current version and you have a a path set to it?
(pointing to the actual f
Are there no arg in response.menu? If not I can build it different, but
I thought it would so I can do some special menu items.
:/ Innerestin'
---
BR,
Jason
<>
Hi Jason,
Thank you for your reply. I think I have tried something similar to
your suggestion.
The user clicks a link to advance to the wait page from a page I'll
call first page...
{{extend 'layout.html'}}
You are playing as a responder in this game...
{{=A(B(T("Click to enter game")), _hre
Let's start with your database query... it should not be in your view.
That will help...
What you do it you can have a page that is queried with .load (it's ajax
jquery stuff)... it will query a page for you every second or so if you
use the right kind of js.
When the page your looking at every sec
Hi Jason,
Thanks for the reply. I think I have tried something similar to your
suggestion.
>From a first page click a link that directs to the wait page...
{{extend 'layout.html'}}
You are playing as a responder in this game...
{{=A(B(T("Click to enter game")), _href=URL('responder_waits'))}
I can see it in google, I can use cär and it works...
Why or how can I use äöå in that area or is there some other way to use
it as a parameter when sending data to a page...
BR,
Jason Brower
Oh... having the database query in the view was not my first
choice :) I originally had it a controller (where it belongs) but the
corresponding page would not display until the controller function
(the query) completed. I thought if I placed the code in the view, the
wait message would display AN
Thanks for the references, Wikus. I will review those as you
suggested.
Cheers... Mike
On Oct 20, 10:02 am, Wikus van de Merwe
wrote:
> There are two options. First is HTML refresh:
>
> which will request your page every 5s and then you show either "please
> wait" message or the results of the
db.table.field.readable=False
On Oct 20, 10:30 am, Richard Vézina
wrote:
> Hello,
>
> I try to develop a generic function that could show a data grid and expose
> differents fields depending of specific group of users. So I have a series
> of table that are very similar. They contain fields that
?
On Oct 20, 12:26 pm, Jason Brower wrote:
> Are there no arg in response.menu? If not I can build it different, but
> I thought it would so I can do some special menu items.
> :/ Innerestin'
> ---
> BR,
> Jason
>
> face-uncertain.png
> 1KViewDownload
Not working in 1.83.2 and in 1.87.3
Richard
On Wed, Oct 20, 2010 at 2:25 PM, mdipierro wrote:
> db.table.field.readable=False
>
> On Oct 20, 10:30 am, Richard Vézina
> wrote:
> > Hello,
> >
> > I try to develop a generic function that could show a data grid and
> expose
> > differents fields d
Hello Massimo,
Is there something wrong with that?
@auth.requires_login()
def select():
db['test_activity']['sdate'].readable=False
db.test_activity.sdate.readable=False
db['test_activity'].sdate.readable=False
db[request.args(0)].sdate.readable=False
table=crud.select(db[requ
Hi,
I use httplib2 to query an url of the running roket server in web2py.
This is my simple code:
def POST(url, dictdata):
h = httplib2.Http()
resp, content = h.request("%s" % url,
'POST',
body=urlencode(dictdata),
Above the text area in the online IDE when a controller is opened, the relevant
views as shown eg:
edit views: index, users, user
However, after saving the controller, this line disappears. Is this intended?
Hey there, I'm a long time Django programmer getting to know web2py
and I've loved it so far.
I have a simple question: how do I access another function inside
another controller?
lets say that Im building an URL like this
{{=LI(A(image.title, _href=URL("show", args=image.id)))}}
that is assum
try the following
headers = {'Content-type': 'application/x-www-form-urlencoded'}
2010/10/20 leone :
> Hi,
> I use httplib2 to query an url of the running roket server in web2py.
> This is my simple code:
>
> def POST(url, dictdata):
> h = httplib2.Http()
> resp, content = h.request("%s" % u
Timmie,
plugin wiki depends on authentication - not sure about making it work
without auth. (that would allow just anyone to create pages with no
accountability, perhaps not the best of ideas for a public site)
I did send a suggested patch to allow it to work with custom named
auth tables that i
Vlad,
URL is quite versatile. Not only can you do URL('function') for a
function in the current controller, you can use
URL('controller','function') or even
URL('application','controller','function') if you need.
I hope I was able to help.
-Eric
On Oct 20, 11:37 am, Alucard wrote:
> Hey there,
> Make a new app.
> Open the app in design/admin.
> Install the plug-in by scrolling down to the bottom of the admin page
> to where it says install plug-in.
Could you please add this to the book online?
It's not descibed there.
Hello,
would it respresent a lot of effort to extend the DAL functionality to
spatial capabilities?
Examples can be found here:
* http://www.geoalchemy.org/tutorial.html#performing-spatial-queries
*
http://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/#spatial-queries
Where could we sta
hello,
I don't know if this is a bad idea, but ...
I'ld like to use some of my PyJamas pages into a Web2Py site.
And in more general, I'ld like to use PyJamas as a standard tool within Web2Py
for detailing the GUI
and the client side JS to handle that GUI.
Now the web2py book contains an exampl
thanks Martin, will let you know if I get stuck.
On Oct 20, 10:56 pm, "Martin.Mulone" wrote:
> thanks richard, this a personal project. Google analytic in the next
> beta i will add as a widget. I want to do my own implementation of
> lightbox, but i have some others priorities, but you can alwa
would be nice to replace this with a web2py version - the "eat your
own dogfood" approach.
Perhaps with pystack:
http://www.techfuel.net/zblog/blog/view/24
On Oct 20, 1:03 pm, Bruno Rocha wrote:
> Nice!
>
> in web2py site we have a link tohttp://web2py.uservoice.com, which is a
> place where ev
My mother's a teacher, who has "challenges" with the ownership of the
content she creates. Legally, she owns the content, and should control
where and how it's made available; however (as I understand it), current
systems act as though the school owns all content *and* are structured such
that cop
What you say is important and different schools have different
policies. My schools for example does not claim copyright ownership on
faculty content (unless negotiated otherwise).
I am not convinced that the solution to the problem is a technical
one.
Massimo
On Oct 20, 7:50 pm, David Mitchell
WOW! Very Nice
Should include the "Layouts" item to the sidebar
2010/10/20 mdipierro
> http://web2py.com/layouts
>
> I deleted a lot of the crappy layouts and fixed the good ones. Now
> they all support menus, navbar and flash.
> If you install one of them it will overwrite your layout.html
>
>
What about the ZenGarden plugin (http://web2py.com/zengarden) -- can/
should these be combined somehow?
On Oct 20, 9:04 pm, mdipierro wrote:
> http://web2py.com/layouts
>
> I deleted a lot of the crappy layouts and fixed the good ones. Now
> they all support menus, navbar and flash.
> If you inst
There's also this: http://web2py.com/appliances/default/show/39
On Oct 20, 9:48 pm, Anthony wrote:
> What about the ZenGarden plugin (http://web2py.com/zengarden) -- can/
> should these be combined somehow?
>
> On Oct 20, 9:04 pm, mdipierro wrote:
>
>
>
> >http://web2py.com/layouts
>
> > I dele
I'll take the patch, although I have almost finished a new admin
wizard that uses json to the templates directly from the site without
need to download.
On Oct 20, 8:15 pm, Bruno Rocha wrote:
> WOW! Very Nice
>
> Should include the "Layouts" item to the sidebar
>
> 2010/10/20 mdipierro
>
> >http
They are not production quality, just a proof of concept.
On Oct 20, 8:48 pm, Anthony wrote:
> What about the ZenGarden plugin (http://web2py.com/zengarden) -- can/
> should these be combined somehow?
>
> On Oct 20, 9:04 pm, mdipierro wrote:
>
> >http://web2py.com/layouts
>
> > I deleted a lot o
It should be easy to do... The specs are easy a layout plugin must
jave plugin
- name web2py.plugin.layout_.w2p
- contain
views/layout.html
views//plugin_layouts/layouts/.html (same as views/layout.html)
static/plugin_layouts/layouts//preview.png
static/plugin_layouts/layouts//index.html
static/p
If you like logo #5 (i.e., the current logo on www.web2py.com) but
voted for one of its close variants (i.e., #8, #17, #37, #38, #124, or
some other logo you like to a similar degree), you might consider
switching your vote to #5 (http://blouweb.com/logovote/default/index?
logoid=5). Otherwise, sup
Note, you can switch your vote simply by clicking on the "Vote This"
link for logo #5:
http://blouweb.com/logovote/default/vote/5
On Oct 20, 10:15 pm, Anthony wrote:
> If you like logo #5 (i.e., the current logo onwww.web2py.com) but
> voted for one of its close variants (i.e., #8, #17, #37, #38
It really depends on how you select and which row indexing you want.
To use db().select(...)
you have to specify table.field pairs in the select (without the db
part)
and to obtain the value of field1 you use row['table.field1'].
If you are selecting fields from only one table the alternative wou
I have vote this! the best choice IMO.
Other good logos could be used for another web2py projects,
After that, we should start a web2pyslices logo contest! Lets draw your
Pizza!
2010/10/21 Anthony
> Note, you can switch your vote simply by clicking on the "Vote This"
> link for logo #5:
>
Isn't campaigning during the voting process electioneering? Seems
inappropriate for this competition, too. I think you made your choice
clear during the design submission phase. Let's let this vote be a
clean one, please.
response.menu = [
(T('Home'), False, URL(request.application,'default','index'), []),
(T('Products'), False,
URL(request.application,'default','products'), []),
(T('Used Products'), False,
URL(request.application,'default','products'), []),
(T('Company'), False, URL(request.applicat
Woah... I thought you had to do...
URL(r=request, c='defaut', f='index',args=[1,2,3])
I am such an old school web2py'r
:)
Jason
On Wed, 2010-10-20 at 15:22 -0700, Eric Vicenti wrote:
> Vlad,
>
> URL is quite versatile. Not only can you do URL('function') for a
> function in the current controller
I think I see where your going with this.
Are you going to implement this in your recent work with the
"application builder"?
BR,
Jason
On Wed, 2010-10-20 at 18:04 -0700, mdipierro wrote:
> http://web2py.com/layouts
>
> I deleted a lot of the crappy layouts and fixed the good ones. Now
> they a
For example, if I put...
http://127.0.0.1:8000/furniture/default/results/sdfsafsdfa%C3%A4%C3%A4%
C3%A4
It will not work and tells me I have an invalid controller.
http://127.0.0.1:8000/furniture/default/results/sdfsafs
Works.
Any solution for this?
BR,
Jason Brower
On Wed, 2010-10-20 at 20:52 +030
On Oct 20, 2010, at 7:52 PM, Jason Brower wrote:
> For example, if I put...
> http://127.0.0.1:8000/furniture/default/results/sdfsafsdfa%C3%A4%C3%A4%C3%A4
> It will not work and tells me I have an invalid controller.
> http://127.0.0.1:8000/furniture/default/results/sdfsafs
> Works.
> Any solution
Render as a SELECT(OPTION(...))
On Oct 20, 1:12 am, Chris wrote:
> I'm trying to make an HTML widget that saves its data as a
> list:string.
>
> Currently I'm using a hidden control and saving data joined by '|',
> like 'M|T|W', but that only appears to work in displaying the data,
> not when sav
On Oct 20, 10:32 pm, weheh wrote:
> Isn't campaigning during the voting process electioneering? Seems
> inappropriate for this competition, too. I think you made your choice
> clear during the design submission phase. Let's let this vote be a
> clean one, please.
Sorry if my suggestion came acros
A tip, for those who are running on a cheap shared server, where have no
access to /admin but has SSH or FTP
Just access the app folder
$ cd web2py/applications/yourapp/
$ wget http://web2py.com/layouts/static/plugin_layouts/plugins/web2py.plugin
..w2p
$ tar -xzvf web2py.plugin..w2p
This will un
Isn't the voting going to be done such that votes for clone designs
will be aggregated? If so, artificially directing people to vote for
one of the designs might, in fact, skew the results and rob you of
useful information that might be used to improve the final pick. I
think it's best right now to
Oh, and don't forget to make SELECT(..., _multiple='multiple', ...)
Thanks. While I'd like to do that, I can't here, because I'm doing a
custom input scheme with a different UI. That does give me an idea
though. I'll try and copy the POST a SELECT multiple would send.
On Oct 20, 11:29 pm, weheh wrote:
> Oh, and don't forget to make SELECT(..., _multiple='multiple
On Oct 20, 11:27 pm, weheh wrote:
> Isn't the voting going to be done such that votes for clone designs
> will be aggregated? If so, artificially directing people to vote for
> one of the designs might, in fact, skew the results and rob you of
> useful information that might be used to improve the
This code is a hybrid that will let you use a hidden control while
messing about with it in your own HTML/XML:
def day_selector_widget(field, value):
xml_stuff = XML(response.render("widgets/
day_selector.html",
_id = str(field).replace('.','_'))
It is trunk and I will post a video soon...
On Oct 20, 9:47 pm, Jason Brower wrote:
> I think I see where your going with this.
> Are you going to implement this in your recent work with the
> "application builder"?
> BR,
> Jason
>
> On Wed, 2010-10-20 at 18:04 -0700, mdipierro wrote:
> >http://w
Let's see if we have a clear winner. If we do not we can have a run-
off.
Massimo
On Oct 20, 10:56 pm, Anthony wrote:
> On Oct 20, 11:27 pm, weheh wrote:
>
> > Isn't the voting going to be done such that votes for clone designs
> > will be aggregated? If so, artificially directing people to vot
FYI
The 10th Free Software Regional Conference will be held next week in Argentina.
About web2py, Massimo Di Piero will give a presentation on Web
Development and possibly there will be an introductory tutorial.
Free registration is open:
http://www.jornadasregionales.org/jrsl2010v2/user/regist
That works, but how do I load that data?
On Wed, 2010-10-20 at 19:57 -0700, Jonathan Lundell wrote:
> On Oct 20, 2010, at 7:52 PM, Jason Brower wrote:
>
> > For example, if I put...
> > http://127.0.0.1:8000/furniture/default/results/sdfsafsdfa%C3%A4%C3%
> > A4%C3%A4
> > It will not work and t
This works
URL(request.application,'default','products/used'), [])
On Oct 20, 7:40 pm, Jason Brower wrote:
> response.menu = [
> (T('Home'), False, URL(request.application,'default','index'), []),
> (T('Products'), False,
> URL(request.application,'default','products'), []),
> (T('U
On Oct 20, 2010, at 10:34 PM, Jason Brower wrote:
> That works, but how do I load that data?
What do you want to do with it? It should show up in request.vars, I think.
>
> On Wed, 2010-10-20 at 19:57 -0700, Jonathan Lundell wrote:
>> On Oct 20, 2010, at 7:52 PM, Jason Brower wrote:
>>> For exa
On Oct 20, 2010, at 10:44 PM, ron_m wrote:
>
> This works
>
> URL(request.application,'default','products/used'), [])
You can also do something like this, which to my mind is more readable:
URL('default', 'products', args=['used'])
or equivalently, and even more readable:
URL(c='default', f='
http://vimeo.com/16048970
Now I am going to sleep a few ours
Certainly the way you describe is in the book and is right, what I
suggest is something I have done that works. However it could be one
of things that bites later because I am depending on the current
mapping of args to additional path elements and am essentially
bypassing what the API should be do
Hi all,
I'd like to introduce you all to a very simple uservoice clone app
made in web2py: http://github.com/adsahay/web2py_feedback
It is still work in progress. The main motivation for this app is that
the existing feedback applications, apart from being sometimes
ridiculously priced, force use
Sorry that was a really dumb moment. Of course I can just put it in the
URL. :P Sorry about that.
On Wed, 2010-10-20 at 22:44 -0700, ron_m wrote:
> This works
>
> URL(request.application,'default','products/used'), [])
>
> On Oct 20, 7:40 pm, Jason Brower wrote:
> > response.menu = [
> >
94 matches
Mail list logo