Re: [web2py] rad2py

2013-05-07 Thread Mariano Reingart
rad2py is in stand-by, I plan to finish it as my master thesis (maybe the next semester). It should be usable (including the debugger), but not for begginers right now as it needs more testing and bug-fixing. I'm working in gui2py that was the only big missing part (pythoncard "fork" with web2py "

[web2py] Populate a field only with the admins

2013-05-07 Thread José Manuel López
Hi, I've a " form = SQLFORM.grid " that let the user edit the rows. In the edit form I want that one of the field populated only with "Admins". Now I have this field populated with all the db.auth_user and is huge and very hard to find the correct user. How can I do it?, I'm thinking in someth

[web2py] Re: Populate a field only with the admins

2013-05-07 Thread 黄祥
i think you can achieve it (in controller using grid) with editable = auth.has_membership('Admin') e.g. def booking(): has_membership=auth.has_membership('Admin') grid=SQLFORM.grid(db.booking, editable=has_membership) return locals() best regards On Tuesday, May 7, 2013 3:16:11 PM U

Re: [web2py] Re: password encrypt during insert

2013-05-07 Thread vikas gupta
something weird here, my messages arent getting reflected... trying again. this is what i get from the print statement: the bulk insert was successful... i can see the records in the db. password is encrypted. -- --- You received this message because you are subscribed to the Google Groups

Re: [web2py] Re: DAL documentation: executesql

2013-05-07 Thread Martin Weissenboeck
a very interesting explanation - thank you! regards, martin -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more

[web2py] Re: Populate a field only with the admins

2013-05-07 Thread José Manuel López
Hi!, Thank you for your answer, but it's not exactly what I want. I'll explain better: Let's say I have this table: db.define_table('Hotel', Field('name', label="Nombre del Hotel "), Field('hotel_type', db.BookingCategory), Field('h

Re: [web2py] Re: DAL documentation: executesql

2013-05-07 Thread Niphlod
no problem. you can file a "bug report" so the request for new docs gets "tracked" or (even better) send a patch for updating the book . the source code is on github On Tuesday, May 7, 2013 8:29:38 AM UTC+2, Johann Spies wrote: > Thanks! > > Shouldn't there be something like this explanatio

[web2py] Smartgrid not working, error given

2013-05-07 Thread José Manuel López
Hi, Lets say I have this table: db.define_table('OffersCity', Field('city', db.City), Field('offer', db.Offer), Field('hotel', db.Hotel)) I want to create a smartgrid, but it's not working... I don't know why: Here it's my code: table = SQLFORM.s

[web2py] Re: Smartgrid not working, error given

2013-05-07 Thread 黄祥
it seems that you have a space on your table. table = SQLFORM.smartgrid(db. OffersCity, constraints=None) should be table = SQLFORM.smartgrid(db.OffersCity, constraints=None) best regards On Tuesday, May 7, 2013 7:29:49 AM UTC-4, José Manuel López wrote: > > Hi, > Lets say I have this table: >

[web2py] Re: Populate a field only with the admins

2013-05-07 Thread 黄祥
yes, you are right, db.auth_user will return all the users table. please try to change Field('hotel_chain_manager', db.auth_user) into Field('hotel_chain_manager', 'reference auth_user', default=auth.has_membership('Admin')) hope this can help best regards On Tuesday, May 7, 2013 7:24:05 AM UT

[web2py] Re: Passing javascript data to web2py controller using json?

2013-05-07 Thread Alan Etkin
> > But I'm not sure how to tie this all together. The anchor tag needs an > onclick which points to the function add_item() in util.js. The util.js > should execute that function and do a post to the web2py controller, which > would then do an insert into the database. Could someone help me ou

[web2py] Re: Nasty redirect in Ajax call. 'web2py-redirect-location' header breaks website.

2013-05-07 Thread Massimo Di Pierro
In trunk you now do, in db.py auth.settings.client_side = False On Tuesday, 7 May 2013 01:03:38 UTC-5, Aris Green wrote: > > So, do you plan to change this? Should I for now I could use > auth.login_bare(...) and avoid the redirect with client_side=True? > > Aris > -- --- You received this

Re: [web2py] Re: password encrypt during insert

2013-05-07 Thread Massimo Di Pierro
I now see the problem: encpasswd=db.auth_user.password.validate(mypassword)[0] logger.debug("encrypted passwd - %s" % encpasswd) should be encpasswd=db.auth_user.password.validate(mypassword)[0] logger.debug("encrypted passwd - %s" % str(encpasswd)) because the encrypted password is not a strin

[web2py] Re: Scheduler - calling functions outside a model?

2013-05-07 Thread Niphlod
this shouldn't be a problem sql.log should be writable . what web2py version are you on ? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+uns

[web2py] Re: Populate a field only with the admins

2013-05-07 Thread José Manuel López
It's not working for me :/ ... still the drop down list contains all the users On Tuesday, May 7, 2013 1:52:45 PM UTC+2, 黄祥 wrote: > > yes, you are right, db.auth_user will return all the users table. > please try to change > Field('hotel_chain_manager', db.auth_user) > into > Field('hotel_chain

[web2py] Re: Smartgrid not working, error given

2013-05-07 Thread José Manuel López
Thank you Steve :), unfortunately it's no the error I've it ok in my code (maybe a problem while coping it here) On Tuesday, May 7, 2013 1:46:43 PM UTC+2, 黄祥 wrote: > > it seems that you have a space on your table. > table = SQLFORM.smartgrid(db. OffersCity, constraints=None) > should be > table

[web2py] Re: Populate a field only with the admins

2013-05-07 Thread Anthony
> > yes, you are right, db.auth_user will return all the users table. please try to change > Field('hotel_chain_manager', db.auth_user) > into > Field('hotel_chain_manager', 'reference auth_user', > default=auth.has_membership('Admin')) > He wants to limit the options shown in the dropdown, no

[web2py] Re: Smartgrid not working, error given

2013-05-07 Thread LightDot
This is not your entire database definition, is it? It might help if you post more of your code. Regards, Ales On Tuesday, May 7, 2013 3:36:52 PM UTC+2, José Manuel López wrote: > > Thank you Steve :), unfortunately it's no the error I've it ok in my code > (maybe a problem while coping it here

[web2py] Re: Populate a field only with the admins

2013-05-07 Thread 黄祥
query = (db.Hotel.chainManager == auth.has_membership('Admin')) db.table.field.requires = IS_IN_DB(db(query), db.auth_user.id, '%(first_name)s %(last_name)s') not tested ref: http://web2py.com/books/default/chapter/29/07#Database-validators best regards On Tuesday, May 7, 2013 8:35:

[web2py] Re: Populate a field only with the admins

2013-05-07 Thread 黄祥
> He wants to limit the options shown in the dropdown, not set a single > default value (also, auth.has_membership() returns True/False, not a user > ID). > thanks for correct and explain to me, anthony best regards > -- --- You received this message because you are subscribed to the Goo

[web2py] Re: Populate a field only with the admins

2013-05-07 Thread José Manuel López
Thank you Anthony for your help, The problem now is this: Too many tables selected Can be a problem that I'm over GAE? On Tuesday, May 7, 2013 3:43:32 PM UTC+2, Anthony wrote: > > yes, you are right, db.auth_user will return all the users table. > > please try to change >> Field('hotel_chain_m

Re: [web2py] Re: password encrypt during insert

2013-05-07 Thread vikas gupta
I tried that.. now the logger statement throws the same error: File "/home/www-data/web2py/applications/trotez/controllers/default.py", line 185, in userRegister logger.debug("encrypted passwd - %s" % str(encpasswd)) File "/home/www-data/web2py/gluon/validators.py", line 2760, in __str__

[web2py] Re: Populate a field only with the admins

2013-05-07 Thread Anthony
OK, then maybe: admin_users = db(db.auth_membership.group_id == auth.id_group('Admin'))\ .select(db.auth_membership.user_id, projection=True) ... requires=IS_IN_DB(db(db.auth_user.id.belongs([r.id for r in admin_users])), ...) I think GAE may limit the .belongs() to only 30 items,

[web2py] Re: Populate a field only with the admins

2013-05-07 Thread 黄祥
might i know what projection=True used for? thank you > > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more op

[web2py] Re: Smartgrid not working, error given

2013-05-07 Thread José Manuel López
Hi!, Thank you for your interest Ales, This is my entire table, now it has other fields: db.define_table('OffersCity', Field('city', db.City), Field('offer', db.Offer), Field('hotel', db.Hotel), Field('order', 'decimal(3,0)', defa

[web2py] Re: Populate a field only with the admins

2013-05-07 Thread Anthony
It is specific to GAE: https://developers.google.com/appengine/docs/python/datastore/projectionqueries On Tuesday, May 7, 2013 10:15:06 AM UTC-4, 黄祥 wrote: > > might i know what projection=

[web2py] Re: Passing javascript data to web2py controller using json?

2013-05-07 Thread bracquet
I'm not familiar with website design, so I wrote the util.js because I thought it might make things a bit simpler to handle. If I wanted a delete function, I would just add that in util.js and call the doPost() with the correct callback function. The doPost() would pass that to the respective c

[web2py] Re: Passing javascript data to web2py controller using json?

2013-05-07 Thread bracquet
the plugin-clientapi seems neat. I kind of want to get my hands dirty by doing things myself first, but I'll definitely look into the plugin. Thanks! -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop

[web2py] Re: Populate a field only with the admins

2013-05-07 Thread José Manuel López
Hi Anthony, Yes you are right, only 30 (because they say so :)). Maybe IS_IN_SET approach can work. I'll come back to copy the solution if I'm be able to make it work. Thank you very much for your time! On Tuesday, May 7, 2013 4:11:00 PM UTC+2, Anthony wrote: > > OK, then maybe: > > admin_users

[web2py] Re: Populate a field only with the admins

2013-05-07 Thread Anthony
Also, if admin users don't get added very often, you might consider caching the set of users so you don't need the queries on every request. Anthony On Tuesday, May 7, 2013 10:45:57 AM UTC-4, José Manuel López wrote: > > Hi Anthony, > Yes you are right, only 30 (because they say so :)). > Mayb

[web2py] web2py on apache 'exceptions.MemoryError'

2013-05-07 Thread Omi Chiba
I'm using the latest web2py 2.4.6-stable+timestamp.2013.04.06.17.37.38 (Running on Apache) with Windows 2012 Server 64bit. Everytime I do the following, I got ticket link, when I click the link, it will generate another error ticket and says 'exceptions.MemoryError'. Do you have any idea? - Cre

[web2py] Re: Passing javascript data to web2py controller using json?

2013-05-07 Thread bracquet
No, add_item doesn't have an associated view with it. I tried doing just a "return" and also tried omitting the return statement entirely. jquery still tells me it's failed. On Monday, May 6, 2013 5:33:04 PM UTC-4, Anthony wrote: > > 1. For some reason every click results in a javascript alert

[web2py] Re: FullCalendar Example Question

2013-05-07 Thread Doug Girard
Ok, I kinda got it working based on your suggestion, I had to add an 'eventRender' object to the script, then I was able to use the tip event object: $('#calendar').fullCalendar({ editable: true, events: [ {{for i,row in enumerate(rows):}}{{if i!=0:}},{{pass}

[web2py] Re: Passing javascript data to web2py controller using json?

2013-05-07 Thread Anthony
If you use the browser tools to inspect the request/response, what do you see? Do you get a 200 status? On Tuesday, May 7, 2013 11:35:21 AM UTC-4, brac...@gmail.com wrote: > > No, add_item doesn't have an associated view with it. I tried doing just a > "return" and also tried omitting the return

[web2py] Dynamically change highlighted class for response.menu

2013-05-07 Thread Omi Chiba
I have a following response.menu in my menu.py. By default Home is highlighted but I want to highlight the menu clicked by the user. For example, when user click contact, 'highlighted' class should be added to contact and removed from home. response.menu = [ (SPAN('Home', _class='highlighte

[web2py] Re: Dynamically change highlighted class for response.menu

2013-05-07 Thread Niphlod
javascript .. something like $('all a in the menu').click(function(e) { $('all a in the menu').removeClass('highlighted'); $(this).addClass('highlighted'); }) should work . You can even generalize it to highlight the current page url automatically. var path = location.pa

[web2py] Re: Dynamically change highlighted class for response.menu

2013-05-07 Thread Omi Chiba
Niphlod , thank you for the reply! Can you provide me actual code workis on new app? I'm not sure where I should put the javascript and what value should I specify for 'all a in the menu'. On Tuesday, May 7, 2013 11:05:27 AM UTC-5, Niphlod wrote: > > javascript .. > > something like > >

Re: [web2py] rad2py

2013-05-07 Thread Monte Milanuk
Hello Mariano, Thanks for the update. I fully understand the life priority thing! I was just curious what the status is/was. Sounds like it's probably a little ways beyond my level just yet; I'll keep an eye out for it anyways. Monte -- --- You received this message because you are subsc

[web2py] Anybody in Delhi?

2013-05-07 Thread Massimo Di Pierro
Please contact me personally. I need help with an issue. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more opti

Re: [web2py] Re: password encrypt during insert

2013-05-07 Thread Massimo Di Pierro
What is the un-encrypted password? I suspect, there is something in there which is not unicode. On Tuesday, 7 May 2013 09:01:53 UTC-5, vikas gupta wrote: > > I tried that.. now the logger statement throws the same error: > > File "/home/www-data/web2py/applications/trotez/controllers/default.py",

Re: [web2py] web2py on apache 'exceptions.MemoryError'

2013-05-07 Thread Marin Pranjić
Can you check app/errors content? How many tickets there? What is their size in total? On Tue, May 7, 2013 at 5:28 PM, Omi Chiba wrote: > I'm using the latest web2py 2.4.6-stable+timestamp.2013.04.06.17.37.38 > (Running > on Apache) with Windows 2012 Server 64bit. Everytime I do the following

Re: [web2py] web2py on apache 'exceptions.MemoryError'

2013-05-07 Thread Omi Chiba
It's empty... On Tuesday, May 7, 2013 11:37:11 AM UTC-5, Marin Pranjić wrote: > > Can you check app/errors content? How many tickets there? What is their > size in total? > > > > On Tue, May 7, 2013 at 5:28 PM, Omi Chiba > > wrote: > >> I'm using the latest web2py 2.4.6-stable+timestamp.2013.04.

Re: [web2py] Re: password encrypt during insert

2013-05-07 Thread vikas gupta
i havent specified unicode.. passwd is abc123 On Tuesday, May 7, 2013 10:02:07 PM UTC+5:30, Massimo Di Pierro wrote: > > What is the un-encrypted password? I suspect, there is something in there > which is not unicode. > > On Tuesday, 7 May 2013 09:01:53 UTC-5, vikas gupta wrote: >> >> I tried th

Re: [web2py] web2py on apache 'exceptions.MemoryError'

2013-05-07 Thread Marin Pranjić
well if you got a ticket link, something should be there On Tue, May 7, 2013 at 6:39 PM, Omi Chiba wrote: > It's empty... > > > On Tuesday, May 7, 2013 11:37:11 AM UTC-5, Marin Pranjić wrote: > >> Can you check app/errors content? How many tickets there? What is their >> size in total? >> >> >>

[web2py] Error when Inserting a new user programmatically with web2py, v2.4.6, TypeError: character mapping

2013-05-07 Thread Stan Lexow
* Inserting a new user programmatically with web2py, v2.4.6 I apologize for the re post. I have read many threads on this subject, including several from Massimo, but I am still having trouble inserting a new user record. I just upgraded web2py to 2.4.6 from version 2012/3/4 1.99.7. The inse

[web2py] Simple Select Query Question

2013-05-07 Thread Doug Girard
Below is a snippet of my code, where I am using FullCalendar. This code is working, giving me a 'tooltip' when hovering over an event, but my tip: * =db(db.tech.id==row.tech).select(db.tech.first_name, db.tech.last_name)* Returns a full table like: tech.first_nametech.last_name on and on wi

[web2py] Re: Error when Inserting a new user programmatically with web2py, v2.4.6, TypeError: character mapping

2013-05-07 Thread Stan Lexow
One more piece of the puzzle, not sure if this helps... In our app's models/db.py there are a couple of potential relevant differences: 1) db initialization: db = DAL('sqlite://storage.sqlite', migrate=False)vs. db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all']) 2) auth initi

[web2py] Re: Passing javascript data to web2py controller using json?

2013-05-07 Thread bracquet
I think something odd is going on. The Failed message never appears if I set breakpoints and step through the javascript in firebug. When I do this, I can see that the eventual post request has a status 200, but no success message is ever alerted. If I remove the breakpoints and let the program

Re: [web2py] Re: password encrypt during insert

2013-05-07 Thread vikas gupta
another message disappeared... i think i clicked the wrong button, reply to author instead of post... sorry massimo, my messages might come to you as a PM. will be careful in future. I got the insert to work with this, I guess unicode is needed. db.auth_user.bulk_insert([{'first_name' :

[web2py] Re: Simple Select Query Question

2013-05-07 Thread Anthony
db(db.tech.id==row.tech).select(db.tech.first_name, db.tech.last_name) The above returns a Rows object. When you do {{=rows_object}} in a view, it gets serialzied into HTML via SQLTABLE. If you want to extract the first and last names from just a single row, then you'll have to do so explicitly.

[web2py] Re: Anyone used WHOOSH as search engine with web2py?

2013-05-07 Thread Brian Erickson
All, thanks for responses. I had not properly considered or reviewed Giewiki. That looks like 90% of what I need! Thanks VERY much for putting it back on my radar. I am developing the web2pyTW with a friend - but I think that now, we will investigate the feasibility of porting the GIE code to we

[web2py] Re: Simple Select Query Question

2013-05-07 Thread Doug Girard
I'm creating a dict 'rows' from the controller that uses the view which has FullCalendar in it. Here is the controller: @auth.requires_login() def mycal(): rows=db(db.work_order.tech==auth.user.id).select() return dict(rows=rows) db.work_order has a 'tech' column, which i'm sure you can

[web2py] Re: Passing javascript data to web2py controller using json?

2013-05-07 Thread bracquet
I thought maybe this was an asynchronous problem or something similar, so I modified the util.js to do this: function do Post(callback, data) { $.post(callback, data).then(doSuccess, doFail); function doSuccess(data) { alert('Success!'); } function doFail(data) { alert('Failed!'); }

[web2py] Re: Passing javascript data to web2py controller using json?

2013-05-07 Thread bracquet
Sorry, I had a typo in the last email: I meant to write "doPost()" and not "do Post()" On Tuesday, May 7, 2013 3:00:57 PM UTC-4, brac...@gmail.com wrote: > > I thought maybe this was an asynchronous problem or something similar, so > I modified the util.js to do this: > > function do Post(callba

[web2py] Disable auto-migration for auth tables.

2013-05-07 Thread Omi Chiba
I'm using CAS so new app is sharing the same auth tables so it doesn't have to be created. But it's trying to create one and get already existing error... I can do migrate_enabled=Falese in DAL but then I cannot migrate any other tables used in the app. Can we just disable auto-migration only f

Re: [web2py] Disable auto-migration for auth tables.

2013-05-07 Thread Ricardo Pedroso
On Tue, May 7, 2013 at 8:05 PM, Omi Chiba wrote: > I'm using CAS so new app is sharing the same auth tables so it doesn't have > to be created. But it's trying to create one and get already existing > error... > > I can do migrate_enabled=Falese in DAL but then I cannot migrate any other > tables

Re: [web2py] Re: FullCalendar Example Question

2013-05-07 Thread Richard Vézina
Take care, there is a memory leak in the AppointmentManagement app... I solve it for my need by changing the way the data are provided to FullCalendar... I create a json dump function and I let FullCalender consume it througth it didicated API function... So, my guess is that the memory leak where

Re: [web2py] Disable auto-migration for auth tables.

2013-05-07 Thread Omi Chiba
It works! Thanks a lot. On Tuesday, May 7, 2013 2:26:34 PM UTC-5, Ricardo Pedroso wrote: > > On Tue, May 7, 2013 at 8:05 PM, Omi Chiba > > wrote: > > I'm using CAS so new app is sharing the same auth tables so it doesn't > have > > to be created. But it's trying to create one and get already e

[web2py] Re: Dynamically change highlighted class for response.menu

2013-05-07 Thread Niphlod
well, that is a snippet that needs to be adjusted to the menu classes in your layout the point more or less is: you have a "menu" that has no children changing the highlight on the clicked one leaves you nowhere, cause once a link has been clicked you jump to the other page, so the sec

[web2py] Re: Simple Select Query Question

2013-05-07 Thread Anthony
> > *tip: '{{db.executesql('SELECT first_name, last_name FROM tech WHERE id = > 'row.tech';')}}',* There are several things wrong with the above. First, you're getting a syntax error because you've got 'row.tech' in single quotes inside a string that is also in single quotes. Second, the SQL

[web2py] Re: Scheduler - calling functions outside a model?

2013-05-07 Thread Simon Ashley
2.4.6 - stable -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/group

[web2py] Re: Error when Inserting a new user programmatically with web2py, v2.4.6, TypeError: character mapping

2013-05-07 Thread Dirk
json.loads() returns a unicode string which * db.auth_user.password.validate() doesn't like -- try converting your password variable to a string first as follows: * * password = str(db.auth_user.password.validate(str(password))[0]) Don't forget to str() the result of the db.auth_user.passwo

[web2py] Re: Scheduler - calling functions outside a model?

2013-05-07 Thread Niphlod
uhm. funny. I just tested scheduler.py (or any model) def queue_me(): LOAD('default', 'test') default.py controller def test(): db.auth_user.insert(first_name='foo') #just to see if it's db related return 1 and then verified that def anotherindex(): retur

[web2py] Errors with couchdb and mongodb connection

2013-05-07 Thread Manuele Pesenti
I added this ticket... https://code.google.com/p/web2py/issues/detail?id=1481&thanks=1481&ts=1367959002 does anybody noticed this behaviuor? I get errors with both this two lines of code: DAL('mongodb://username:passwd@localhost:27017/dbname', do_connect=False, attempts=1) DAL('couchdb://127.0.0.

[web2py] Re: web2py dropbox integration

2013-05-07 Thread Jesus Alvaro
I think that the problem is the use of the function index() for checking the Authentication. See my response in the ticket However I've found another issue, as described in https://code.google.com/p/web2py/issues/detail?id=1479 El domingo, 7 de abril de 2013 03:10:15 UTC+2, Yassine Elouri escr

Re: [web2py] web2py on apache 'exceptions.MemoryError'

2013-05-07 Thread Omi Chiba
I think I'm OK now. I gave full control for web2py folder for users and it starts working fine... On Tuesday, May 7, 2013 11:48:54 AM UTC-5, Omi Chiba wrote: > > Oh, my mistake. It was there under admin/errors. > > I clear all the error files and try to create new app called hello. > Please see t

[web2py] Re: wget and basic authentication

2013-05-07 Thread Ian MacKinnon
Was a ticket ever filed for this? I'm encountering the same issue and I couldn't find a ticket for this issue. Ian On Monday, 31 October 2011 20:09:49 UTC-7, Massimo Di Pierro wrote: > > Please open a ticket. this is easy and I can take of it tomorrow. > > On Oct 31, 7:58 pm, mdorval wrote: >

[web2py] How to make a counter

2013-05-07 Thread sasogeek
How do I make a counter? basically i want to make a button that increases a counter number when it is clicked... more like a voting button. anytime it is clicked, the counter goes up by one. and every user can click the vote button only once... How do I achieve that -- --- You received t

[web2py] Re: How to make a counter

2013-05-07 Thread 黄祥
please take a look at the book : http://web2py.com/books/default/chapter/29/11#Voting-and-rating and do a little modification on the table should have field to store the user clicked and on controller that check condition if the user ever clicked. best regards On Wednesday, May 8, 2013 6:34:41

[web2py] response.menu URLs

2013-05-07 Thread Monte Milanuk
So... I have a couple functions defined in default.py: @auth.requires_login() def index(): response.flash = T('Welcome!') grid = SQLFORM.grid(db.project, create=False, fields=[db.project.name, db.project.employee_name, db.project.company_name, db.project.start_d

[web2py] Re: response.menu URLs

2013-05-07 Thread 黄祥
please check the book on : http://web2py.com/books/default/chapter/29/05?search=menu#Page-layout response.menu menu is a list of 3-tuples or 4-tuples. The three elements are: the link name, a boolean representing whether the link is active (is the current link), and the URL of the linked page. F

[web2py] Markmin components

2013-05-07 Thread villas
I was just reading the Markmin code and trying to figure out what support there is for loading components. I would like to load the return string from a function into some Markmin text. I have seen @{component:... @a/c/f and suchlike, but cannot make that work. Perhaps someone could expla

[web2py] Re: Markmin components

2013-05-07 Thread villas
I can do something like this... mytext = """ ``default/get_cms_article/4``:component """ def __component(text): items = text.split('/') controller, function, args = items[0], items[1], items[2:] return LOAD(controller, function, args=args, ajax=True).xml() MARKMIN_ENV = dict( c

[web2py] login form registration problem with encoding

2013-05-07 Thread Yebach
Hello I was scouting the internet(s) and could not found the solution for my problem So I am using web2py server on Linux. I also have a postgreSQL server on linux and when a user tries to login via login form and uses letters in name and surname such as š ž č ć the following error appears 'a