[web2py] Setting up wiki is not as simple as stated in default.py

2014-05-16 Thread Rufus
I wanted to create a wiki on PythonAnywhere, so I did the most straightforward thing. I went to my site manager, said create simple app. MyWiki. edited default.py and changed the index controller to: return auth_wiki() save and view got: 401 UNAUTHORIZED any clues? -- Resources: - http

[web2py] Re: Custom login form error

2014-05-16 Thread Anthony
The form validators check for errors in the form inputs, not failed authentication. Once the form is accepted, the auth.login() method then checks to see if the user exists and the proper password was submitted. If not, it sets session.flash to auth.messages.invalid_login and then does a redire

[web2py] Re: routes not setting request.vars

2014-05-16 Thread Massimo Di Pierro
I cannot reproduce it. try this simple routes.py routes_in = ( ('/$language/$anything','/$anything?lang=$language'), ) then visit: http://127.0.0.1:8000/en/examples/simple_examples/status the ?lang=en is in there. On Friday, 16 May 2014 20:56:19 UTC-5, Manoj Sonawane wrote: > > bumping.

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread Massimo Di Pierro
I do not think the issue with your code. The issue with corrupted data in database. You seem to have an integer that contains list data. Perhaps one of your fields was a "list:integer" or "list:reference" type and then you changed it to "integer" or "reference" type. You ended up with corrupted

[web2py] Live data

2014-05-16 Thread Jesse Ferguson
I'm building a single page app with a lot of data from the database displayed, I would like to have it auto-refresh or update the tables with the newest information. Its not time critical (ie it doesnt need to be instantanous maybe every 60secs) What are my options? AJAX timebased ca

[web2py] Re: routes not setting request.vars

2014-05-16 Thread Manoj Sonawane
bumping. if anyone can show way it will be great On Friday, May 16, 2014 9:02:32 AM UTC+8, Manoj Sonawane wrote: > > Hello, > Following is my main routes.py > > logging = 'debug' > default_application = "myshop" > routes_app = ((r'/(?Pwelcome|admin|app)\b.*', r'\g'), >(r'(.*)', r'm

Re: [web2py] how string_agg for groupby?

2014-05-16 Thread Joe Barnhart
Hi Richard -- When using special DB features, sometimes it's best just to fall back to the old "executesql" function. It works really well for those complex joins and special functions that are just too seldom-used to be special-cased in the DAL. In fact, when I was forced to use it not long

[web2py] Re: Customize bootstrap 3 forms

2014-05-16 Thread Joe Barnhart
Formstyle can be a callable function, which allows you to do exactly what you want. To add parameters to a formstyle function, you first create your own version of the basic formstyle (as you did with your version of the bootstrap3 form), then "wrap" it in a lambda which presets the new values

[web2py] Custom login form error

2014-05-16 Thread 'sasogeek' via web2py-users
I have a custom login form that displays the error when the email is invalid (eg. like someone submits an email with a wrong email format, i.e, without @domain.com for example), but when an email that's not in the database is submitted, nothing happens, the page just reloads. Also, if an email

[web2py] Re: reddit clone - foreign key constraint failed

2014-05-16 Thread Derek
probably this line here: Field('parent_comm', 'reference comm') the parent has to exist before you can reference it. Take a look at line 196+ of populate.py - it tries to get a list of all possible values to reference, but it can't since none exist, so it tries to reference ID zero, but that do

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread LaDarrius Stewart
I deleted previous post stating it was working it's not im tired... On Friday, May 16, 2014 3:28:49 PM UTC-5, LaDarrius Stewart wrote: > > Omitted quite a bit Anthony but I feel I included the valuable > information. Considering minus the record value of the SQLFORM the > functionality works as

Re: [web2py] Social Login

2014-05-16 Thread Michele Comitini
Twitter is on OAuth 1.0a so you must use gluon.contrib.login_methods. oauth10a_account https://dev.twitter.com/docs/auth/oauth If you get too many redirection check what you get as token. install the ipdb module on your machine: $ pip install ipdb then add the following at the beginning of the ge

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread LaDarrius Stewart
I fixed it im not sure why because I thought these two parameters were the same but i changed it from: form3=SQLFORM(db.Company,a,formstyle="bootstrap") To this: form3=SQLFORM(db.Company,record_id=a,formstyle="bootstrap") And its working fine... :( -- Resources: - http://web2py.com - http://

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread LaDarrius Stewart
Omitted quite a bit Anthony but I feel I included the valuable information. Considering minus the record value of the SQLFORM the functionality works as intended. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https:/

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread LaDarrius Stewart
links = [lambda row: BUTTON('Profile',_onclick="jQuery('#id5').val('%s'); ajax('new', ['id'], 'ab');" % str(row.id), **{'_data-toggle': 'collapse', '_data-target' : '#ab', '_class' : 'two btn btn-success', '_type' : 'submit', '_value' : 'Submit', '_id' : 'ld'} )] # Companysearch method grid lin

[web2py] Re: Customize bootstrap 3 forms

2014-05-16 Thread Chris DeGroot
I closed the pull request at the request of niphlod. I have squashed my commits. The branch can be found here: https://github.com/ctdegroot/web2py/tree/CustomBootstrapForms Anyways, I'm new to contributing to web2py, but I would really like to contribute what I can. These changes are somethi

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread Anthony
It might help if you can show more of the controller code and the view code so we can get a better idea of what's going on. On Friday, May 16, 2014 3:23:12 PM UTC-4, LaDarrius Stewart wrote: > > Yeah there is only that one. Also there our other lines using variable "a" > and they are acting fine

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread LaDarrius Stewart
Yeah there is only that one. Also there our other lines using variable "a" and they are acting fine each time I click another button. Like "Company = db(db.Company.id==a).select().first()" so its not that the value is incorrect because everything else it works fine with. Its only with the SQLFO

[web2py] Re: Id set to None on save record

2014-05-16 Thread Dave S
On Friday, May 16, 2014 9:45:00 AM UTC-7, Ramos wrote: > > I use sqlite as db > Yesterday i had to alter a column (apt_medicaval) to remove not null > contraint. > I used sqliteman to do it.The side effect is that it changed also the id. > Stupid software!!! > > I noticed now when i go to sqli

[web2py] Re: why huge memory requirment

2014-05-16 Thread Niphlod
it's probably due to your app code. did you try hosting the welcome app and see if the memory goes down ? On Wednesday, May 14, 2014 10:47:04 PM UTC+2, Bapi Roy wrote: > > Why web2py application take 420 MB to run one instance in ningx server > . I am using Cloud VPS from Digital Ocean with 512

[web2py] Re: Component error SQLFORM with record

2014-05-16 Thread Niphlod
are you aware that ajax('new' ['id'], 'ab') it takes all input with name = id and pass those as an argument ? On Friday, May 16, 2014 7:27:47 AM UTC+2, LaDarrius Stewart wrote: > > Im loading a component from a grid with a button you can see the code > below in grid "links=links". My issue is th

[web2py] Re: Id set to None on save record

2014-05-16 Thread António Ramos
I use sqlite as db Yesterday i had to alter a column (apt_medicaval) to remove not null contraint. I used sqliteman to do it.The side effect is that it changed also the id. Stupid software!!! I noticed now when i go to sqliteman, the id field is set as follows CREATE TABLE trabalhador ( * "id"

[web2py] Id set to None on save record

2014-05-16 Thread António Ramos
Mayday, mayday, I have a "bug" in my app. Sudenly i detect records with no id set i go to admin to create one record in the "buggy" table and the id is not set. All other tables are fine just in case , my model db.define_table('trabalhador', Field('empresa',db.empresa,readable=True,writable=

[web2py] Re: Form Action

2014-05-16 Thread Massimo Di Pierro
def getdata_form(): form=FORM('Start Date:', INPUT(_id='startdate', _name='startdate', _class='date'), 'End Date:', INPUT(_id='enddate', _name='enddate', _class='date'),INPUT(_type='submit'), _action=URL('grabvoltrindata')).process() if form.accepted: dosomethingwith(form.va

[web2py] Re: My RFID Project with Web2py and the Internet of Things for realtime update...

2014-05-16 Thread Massimo Di Pierro
This is really nice. On Thursday, 15 May 2014 04:54:16 UTC-5, Ramos wrote: > > Hello, just to let you know that i have running an app in the cloud > (webfaction) that uses external hardware with an rfid reader to control > outside workers in my company > It uses websockets to update some webpage

Re: [web2py] web2py conference - online talks

2014-05-16 Thread Massimo Di Pierro
No but I do not like angular. It constrains the JS programming too much for my taste. I use ractive.js with bootstrap already without problems. On Wednesday, 14 May 2014 03:37:59 UTC-5, Ramos wrote: > > Massimo, > have you tried Angular-ui? > http://angular-ui.github.io/bootstrap/ > > > 2014-05-

[web2py] Re: {{include}} not being rendered

2014-05-16 Thread Annet
Hi Chris, Thanks for your reply. Can you check if there are any errors given by your browser about the files > not being found? > Firebug does not report any errors. > Maybe take a look at the html that is generated and see what is there. > Paths should be relative to the /views folder; c

Re: [web2py] Social Login

2014-05-16 Thread Frank Buibish
I just downloaded web2py like a month and a half ago. How do I check if I have the latest version? but I'm pretty sure it's a oauth issue. So I was able to use firefox to trace the networks calls and the response was empty, however I went to the logs directory and it's empty. I am on a Mac is

[web2py] Re: "auth.settings.email_case_sensitive=False" not working?

2014-05-16 Thread Horst Horst
I did't know the lower case conversion was done using table validators. I had set email_case_sensitive = False after define_tables(). Setting it before naturally fixes the problem. Thanks for putting me on the right track. Am Freitag, 16. Mai 2014 15:05:53 UTC+2 schrieb Anthony: > > Have you c

[web2py] Re: "auth.settings.email_case_sensitive=False" not working?

2014-05-16 Thread Horst Horst
Nothing besides adding a bunch of extra fields: auth.settings.extra_fields[auth.settings.table_user_name]= [ Field("nickname", "string", length=80), Field("city", "string", length=80), Field("country", "string", length=80), ] Am Freitag, 16. Mai 2014 15:05:53 UTC+

[web2py] Re: missing pass in view

2014-05-16 Thread LaDarrius Stewart
Can you post the code? On Friday, May 16, 2014 5:01:40 AM UTC-5, Nikunj Agarwal wrote: > > i am getting an error "Missing pass in view" although I had written all > the {{pass}} statements wherever required in the program(after an if-else > block and a for loop)...what could be the possible solu

[web2py] Re: help with helper!

2014-05-16 Thread Danel Segarra
You are right. item is in the code. Is it reserved? going to try changing it. Thanks On Thursday, May 15, 2014 11:58:36 AM UTC-7, Dave S wrote: > > > > On Thursday, May 15, 2014 10:21:48 AM UTC-7, greenpoise wrote: >> >> Yes font-awesome is what I am trying to use. Both attempts, yours and

[web2py] missing pass in view

2014-05-16 Thread Nikunj Agarwal
i am getting an error "Missing pass in view" although I had written all the {{pass}} statements wherever required in the program(after an if-else block and a for loop)...what could be the possible solution to the problem?? -- Resources: - http://web2py.com - http://web2py.com/book (Documentatio

[web2py] Form Action

2014-05-16 Thread Tom Russell
I have a form that is not connected to a db table. Its a simple form: def getdata_form(): form=FORM('Start Date:', INPUT(_id='startdate', _name='date', _class='date'), 'End Date:', INPUT(_id='enddate', _name='date', _class='date'),INPUT(_type='submit'), _action=URL('grabvoltrindata'))

[web2py] Re: "auth.settings.email_case_sensitive=False" not working?

2014-05-16 Thread Anthony
Have you customized the auth_user table in any way (in particular, anything that would prevent the default validators from being added to the email field)? On Friday, May 16, 2014 8:05:22 AM UTC-4, Horst Horst wrote: > > It seems (at least in my case) the conversion to lowercase before storing

[web2py] Re: "auth.settings.email_case_sensitive=False" not working?

2014-05-16 Thread Horst Horst
It seems (at least in my case) the conversion to lowercase before storing the email address in the database doesn't happen. I've just tried it with the auth settings below, and the auth.user record contains the email as registered. Perhaps there's a different control flow when using email verif

[web2py] Re: "auth.settings.email_case_sensitive=False" not working?

2014-05-16 Thread Anthony
Did you set email_case_sensitive = False *after* those users had already registered? With that setting, upon registration, it converts the email to lowercase before storing in the database, and then on login, it looks for the lowercase version of the email in the database. Try converting all em

[web2py] "auth.settings.email_case_sensitive=False" not working?

2014-05-16 Thread Horst Horst
I'm running web2py 2.9.5 and set auth.settings.email_case_sensitive to False in my app, because I thought it'd be a good idea. Now I have a bunch of users complaining that they can't log in, and figured out that they registered with an email address which contains capital letters. I tried mysel

Re: [web2py] Re: My RFID Project with Web2py and the Internet of Things for realtime update...

2014-05-16 Thread António Ramos
Only for registered users http://empre.cires.pt/empre 2014-05-16 0:47 GMT+01:00 samuel bonill : > grate, where is the link ??? > > El jueves, 15 de mayo de 2014 04:54:16 UTC-5, Ramos escribió: > >> Hello, just to let you know that i have running an app in the cloud >> (webfaction) that uses