[web2py] web2py login user problem

2012-08-24 Thread Yebach
Hello So I am really struggling with web2py user registration I have a database that contains come required tables for webapp to work. Now I want to create a user register form etc. In db.py I added a create table #This is used to connect also to all other tables, SHOULD I CREATE A NEW

[web2py] Re: web2py login user problem

2012-08-27 Thread Yebach
, Anthony wrote: Also, what version of web2py are you using? On Friday, August 24, 2012 7:07:49 AM UTC-4, Anthony wrote: Can you show the traceback(). Also, maybe pack and attach a minimal app that reproduces the problem. On Friday, August 24, 2012 5:14:20 AM UTC-4, Yebach wrote: Hello So I

[web2py] user login tables

2012-08-27 Thread Yebach
Hello My problem is that my app has to go to specific database on postgres to check for users. you can visit my app on http://portal.iurnik.si/ You can see that the user select a value from popup and then the app goes to a specific database to read data. After that I want to create a login

[web2py] Re: user login tables

2012-08-28 Thread Yebach
specify it. You must have a default and a set of default values: database = session.get('database','default_database') The you can have a form that stores the one they want into session.database On Monday, 27 August 2012 10:09:34 UTC-5, Yebach wrote: Hello My problem is that my app has

[web2py] Re: user login tables

2012-08-29 Thread Yebach
-- if not, it redirects back to the home page before connecting. Anthony On Tuesday, August 28, 2012 3:21:36 AM UTC-4, Yebach wrote: Where do I put database = session.get('database','default_database') ?? In model? So if I understand correctly first there has to be a default database, but then after user

[web2py] Re: user login tables

2012-08-30 Thread Yebach
I don't understand what you mean with how is the user loging out? I used the {{='auth' in globals() and auth.navbar(separators=(' ',' | ',''))}} On Wednesday, August 29, 2012 4:37:45 PM UTC+2, Anthony wrote: And not to go to default/index page but my specific school/index. I am trying with

[web2py] Re: user login tables

2012-08-31 Thread Yebach
, 2012 2:46:40 AM UTC-4, Yebach wrote: I don't understand what you mean with how is the user loging out? I used the {{='auth' in globals() and auth.navbar(separators=(' ',' | ',''))}} Does that mean the user is logging out by clicking the Logout link in the navbar generated by auth.navbar()? --

[web2py] web2py login and register forms as part of main page

2012-09-04 Thread Yebach
Hello I would like to create a login/register forms as part of a current page not to be redirected to a new page where you login or register and then be redirected back to the main page. Now I have auth.navbar() but that one takes you to a new page any suggestion?? Thank you --

[web2py] Re: web2py login and register forms as part of main page

2012-09-05 Thread Yebach
() and auth.register() generate and process the login and register forms, respectively. You main page function could return those forms and include them in the view. Anthony On Tuesday, September 4, 2012 9:56:36 AM UTC-4, Yebach wrote: Hello I would like to create a login/register forms as part

[web2py] web2py login redirect

2012-09-05 Thread Yebach
Hello My login function doesn't work. After I try to login i am redirected to user/user/profile instead back to my main page /school/index.html Register works, everything Also, if I login and enter the url where I should be redirected again I am redirected to /user/user/profile any

[web2py] Re: web2py login redirect

2012-09-05 Thread Yebach
. :-) On Wednesday, September 5, 2012 8:15:40 AM UTC-4, Yebach wrote: Hello My login function doesn't work. After I try to login i am redirected to user/user/profile instead back to my main page /school/index.html Register works, everything Also, if I login and enter the url where I should

[web2py] Re: web2py login redirect

2012-09-06 Thread Yebach
I searched if I call the auth.register() function, but i don't. not in view, not in controler not in model. I have absolutely no idea what could and where is the problem On Wednesday, September 5, 2012 2:15:40 PM UTC+2, Yebach wrote: Hello My login function doesn't work. After I try

[web2py] web2py login in main view

2012-09-10 Thread Yebach
Hello I would like to have login (username, password) fields in my main view and not to be redirected to new page for login. But if you need to register then to be redirected to new page any suggestions? Thank you --

[web2py] registration message

2012-09-20 Thread Yebach
Hello After a new user is created I want to show the flash message and redirect a user back to home page. The redirection is done with auth.settings.register_next = URL('school','index', vars=dict(school=database)) and for message auth.messages.registration_pending ('bklabafbaklva') but

Re: [web2py] Send Email After Registration

2012-09-20 Thread Yebach
Hello I am getting an error User_Email = auth.user.email AttributeError: 'NoneType' object has no attribute 'email' On Thursday, September 20, 2012 11:15:31 AM UTC+2, Alec Taylor wrote: Nicely done. On Thu, Sep 20, 2012 at 7:13 PM, hasan alnator haln...@gardeniatelco.com javascript:

Re: [web2py] Send Email After Registration

2012-09-21 Thread Yebach
haln...@gardeniatelco.com javascript: wrote: Dear Yebach , Are you logged in ? Best Regards, On Thu, Sep 20, 2012 at 5:13 PM, Yebach vid@gmail.com javascript: wrote: Hello I am getting an error User_Email = auth.user.email AttributeError

[web2py] web2py inserting values into sessions

2012-09-21 Thread Yebach
I am having problems with session After a user selects smth from drop down menu I have to insert that value to session. I need that value to get to the database for auth tables in model (it crashes when I go to login/register form if I read from request.var). Where do I insert the value in

Re: [web2py] web2py inserting values into sessions

2012-09-21 Thread Yebach
, Yebach vid@gmail.com javascript:wrote: I am having problems with session After a user selects smth from drop down menu I have to insert that value to session. I need that value to get to the database for auth tables in model (it crashes when I go to login/register form if I read from

[web2py] post login redirection doesn't work

2012-09-21 Thread Yebach
Hello I put my working web2py app to production on linux server Everything works except the login_next redirection This is my code on my cmp auth.settings.login_url=URL('school','index?school=' + database) auth.settings.logout_next = URL('school','index', vars=dict(school=database)) and it

[web2py] Re: post login redirection doesn't work

2012-09-21 Thread Yebach
this before it didn't work now it works. beats me On Friday, September 21, 2012 1:45:08 PM UTC+2, Yebach wrote: Hello I put my working web2py app to production on linux server Everything works except the login_next redirection This is my code on my cmp auth.settings.login_url=URL('school','index

[web2py] log out user

2012-09-21 Thread Yebach
Hello You can see my app on portal.iurnik.si http://portal.urnik.si I have the following problem after user selects a school app connects to a specific database where data is read from. On that database the auth tables are created so registered users can download some documents. The problems

[web2py] Re: log out user

2012-09-24 Thread Yebach
, 21 September 2012 07:47:08 UTC-5, Yebach wrote: Hello You can see my app on portal.iurnik.si http://portal.urnik.si I have the following problem after user selects a school app connects to a specific database where data is read from. On that database the auth tables are created so

Re: [web2py] Send Email After Registration

2012-09-24 Thread Yebach
= URL('index',vars={'msg':'welcome'}) Best Regards, On Fri, Sep 21, 2012 at 5:21 PM, hasan alnator haln...@gardeniatelco.comjavascript: wrote: Dear Yebach , in db.py : auth.settings.register_next = URL('Welcome',vars={'msg':'welcome'}) in controller : def index

[web2py] Re: log out user

2012-09-24 Thread Yebach
If I put session.clear() into the controler of the default page it works Is that I good solution? It is true that a user has to log in again but it kind of works On Monday, September 24, 2012 8:48:03 AM UTC+2, Yebach wrote: Where do I insert the code? In model? this is now my code in db.py

[web2py] Re: registration message

2012-09-24 Thread Yebach
All I needed was actually add{{=response.flash or ' '}} in my view and it worked but thanx for the hint On Monday, September 24, 2012 3:46:20 PM UTC+2, Hassan Alnatour wrote: Dear Yebach , just add this in the default/school in the controller : if request.vars.school == 'database

[web2py] get new user's email and data

2013-01-24 Thread Yebach
Hello After a new user registers, I would like to send his data to my email (user email and database where it was created) I have user requires confirmation set to true and I have a couple of databases so that is a must, also to check on user I need to get his e-mail to inform him his

[web2py] Re: How to multi-line session.flash

2013-01-24 Thread Yebach
I send string to flash from my model on auth.messages.registration_pending. Since it is quite long i want to make it multiline. \n in my string do not work how to handle that? thank you best regarst On Tuesday, November 24, 2009 5:23:38 PM UTC+1, mdipierro wrote: response.flash =

Re: [web2py] get new user's email and data

2013-01-24 Thread Yebach
= myfunc Em 24/01/2013 06:24, Yebach vid@gmail.com javascript: escreveu: Hello After a new user registers, I would like to send his data to my email (user email and database where it was created) I have user requires confirmation set to true and I have a couple of databases so that is a must

Re: [web2py] get new user's email and data

2013-01-24 Thread Yebach
Thank you you saved my day :) On Thursday, January 24, 2013 2:31:16 PM UTC+1, rochacbruno wrote: auth.setting.register_onaccept = lambda form: mail.send(to=['x...@xxx.netjavascript: '], subject='web2py registration', # If reply_to is omitted, then mail.settings.sender

[web2py] web2py user login form encoding problem

2013-03-29 Thread Yebach
hello I have a login form for user registration If user writes name surname password including signs š, č, ž, ć there is an error 'ascii' codec can't decode byte 0xc5 in position 0: ordinal not in range(128) Where can I set the encoding for form?? thank you -- --- You received this

[web2py] login form registration problem with encoding

2013-05-08 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

Re: [web2py] login form registration problem with encoding

2013-05-09 Thread Yebach
' of exceptions.UnicodeDecodeError object Thank you On Wednesday, May 8, 2013 1:11:26 PM UTC+2, Ricardo Pedroso wrote: On Wed, May 8, 2013 at 7:24 AM, Yebach vid@gmail.com javascript: wrote: Hello So I am using web2py server on Linux. I also have a postgreSQL server on linux

Re: [web2py] login form registration problem with encoding

2013-05-15 Thread Yebach
I did the following. I changed the destination of database from my PC. So from my app on my local machine that works on Windows 7 I connect to Postrge database on Linux. After running it and trying to register using characters ščćž ŠČĆŽ there are no problems, also the same type of

Re: [web2py] login form registration problem with encoding

2013-05-15 Thread Yebach
Thanx I removed the 'u' infront of string and it works thanx again On Wednesday, May 15, 2013 11:29:34 AM UTC+2, Ricardo Pedroso wrote: Thank you for showing interest in resolving this. I apologize for not answering faster @Massimo - where do I set layout encoding? This is

[web2py] web2py ACE editor

2013-11-18 Thread Yebach
Hello I got the following task In my home page created with web2py I need to embed ACE editor. Then the code written in ace editor needs to be saved somewhere on server side. I copied all ACE needed files to my static folder In my view (html) I inserted the following code with source of

[web2py] calling controller from view to retrieve data

2013-11-26 Thread Yebach
Hello I menage to call my function that is in my default.py controler from my view but I cannot retrieve data that this function is suppose to retrieve function is called on button click to load some text from database into ACE editor this is some of my code in controler.py def

Re: [web2py] calling controller from view to retrieve data

2013-11-26 Thread Yebach
You mean I insert the controller code into model? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed

[web2py] server returns error but query is commited

2013-12-01 Thread Yebach
Hello I have a db insert statement in my controller code. After user inserts text, clicks save it is saved into database, but the javascript part of the code returns error. This only occurs if page is accessed from another computer.If I run it from localhost of the server no error is returned

[web2py] user profile fields for referenced table

2013-12-03 Thread Yebach
Hello I have the following question In user register I show only some fields for user, but in user profile I would like to add more fields. This fields come from tables referenced on auth_user table my db.py code so far is db.define_table('auth_user', Field('username', type='string',

[web2py] Re: user profile fields for referenced table

2013-12-03 Thread Yebach
I left the default auth.create_table(migrate = setting.migrate) then added extra fields then deffined my table organization in user profile only first name, last name and email are shown where am I going wrong? On Tuesday, December 3, 2013 11:14:45 AM UTC+1, 黄祥 wrote: i think you shouldn't

[web2py] Re: user profile fields for referenced table

2013-12-03 Thread Yebach
I meanaged to add fileds, but insted of being the fileds of referenced table they were added to auth_user table all of them of type integer I want them to be read from table organization code in db.py auth.settings.extra_fields['auth_user']= [ Field('o_name','reference

[web2py] Re: user profile fields for referenced table

2013-12-03 Thread Yebach
So how do i resolve that I have aut_user table that has a field organization (id) In table organization I have more fields (org name, adress, etc) Now I want to show this fields (almost all) of table organization to user in user profile view. ?? On Tuesday, December 3, 2013 1:34:06 PM

[web2py] Re: user profile fields for referenced table

2013-12-03 Thread Yebach
where do you put he query db.auth_user.branch_adress? On Tuesday, December 3, 2013 1:54:57 PM UTC+1, 黄祥 wrote: i think it will make the database table denormalization (make data redundancy) if you put almost all of your organization table value to your auth_user table. i think just

[web2py] Re: user profile fields for referenced table

2013-12-03 Thread Yebach
where do you put he query db.auth_user.branch_adress? I want the user to add company, not to choose from avaliable companies, but the data is inserted into organization table On Tuesday, December 3, 2013 1:54:57 PM UTC+1, 黄祥 wrote: i think it will make the database table denormalization

[web2py] response.flash to another view

2013-12-04 Thread Yebach
Hello After a new user registers I have a redirect to index page (redirect(URL(request.application, 'default', 'index'))). I would like the response.flash windows (popup or whatever you call it) such as thank you for filing the reg form to be shown in the default index.html page. any

[web2py] Re: user profile fields for referenced table

2013-12-04 Thread Yebach
So based on your answers I menaged to do my form The next question or problem I have is following. When user registers a new record is created in two tables (auth_user and organization). But when the user goes to profile page the form is empty and after filling it a new record is inserted in

[web2py] update table from sqlform

2013-12-05 Thread Yebach
Hello I am trying to update records in user profile from form I have two tables that need to be updated auth_user and organization record = db((db.auth_user.organization==db.organization.id) (db.auth_user.id == uid)).select().first() if form.process().accepted:

[web2py] Re: update table from sqlform

2013-12-05 Thread Yebach
Hello I am trying to update records in user profile from form I have two tables that need to be updated auth_user and organization record = db((db.auth_user.organization==db.organization.id) ( db.auth_user.id == uid)).select().first() if form.process().accepted:

[web2py] SQLForm set default values from database

2013-12-06 Thread Yebach
Hello I have a SQLFORM and I would like to set the default values for user profile that are already in database (it is a reference of 2 tables) this is my current solution record = db((db.auth_user.organization==db.organization.id) (db.auth_user.id == uid)).select().as_list()[0]

[web2py] dropdown menu repopulate from database

2013-12-19 Thread Yebach
Hello I have the following question On my page I have a drop down menu where user selects some texts from db and it is then inserted into into ace editor. the user then saves the script using bootstrap modal with a new name. After he enters the new name of the text it is saved, but the drop

[web2py] check if db field is empty

2014-01-22 Thread Yebach
Hello How do I check is database field is empty? eng_out = db(db.script.id == id_skripte).select(db.script.sc_engine_output) print eng_out ,eng_out ## this returns ##eng_out script.sc_engine_output ##NULL if eng_out is None: ## check for nullability print field is

[web2py] Re: check if db field is empty

2014-01-22 Thread Yebach
I tryied with eng_out = db(db.script.id == id_skripte).select(db.script.sc_engine_output)[0]['sc_engine_output'] print eng_out , eng_out if eng_out is None: print Ni podatkov but I am sure there has to be a better way. thanx again -- Resources: - http://web2py.com -

[web2py] user roles

2014-06-02 Thread Yebach
Hello I am trying to get user's role looking into membership table etc. Following all the codes on majority of forums my code does not work. this is my controller from gluon.tools import Auth database = request.cookies['mycookie'].value db =

[web2py] Re: user roles

2014-06-03 Thread Yebach
of the user's roles. You can also use auth.has_membership('role name') to check membership. You can search auth.user_groups for a role, e.g., if any (role in ['customer_service', 'admin'] for role in auth.user_groups .itervalues()): On Monday, June 2, 2014 8:53:55 AM UTC-4, Yebach wrote

[web2py] Editing tables with datatables

2014-07-07 Thread Yebach
Hello I am using datatables plugin to dynamically edit table of workers which are read from database my code on client side is JAVASCRIPT var getTableData = function (){ var table = $('#example').tableToJSON(), // Convert the table into a javascript object datas = JSON.stringify(table);

[web2py] SQLFORM.grid changes request

2014-07-08 Thread Yebach
Hello When I try to put form = SQLFORM.grid(db.mytable) in my controller the request changes to my/web/site/view?_signature=520af19b1095db04dda2f1b6cbea3a03c3551e13 which causes my if statement in controller to collapse. Can smbd please explain why this happens? thank you -- Resources: -

[web2py] SQLform.Grid problems with lookout and url

2014-07-14 Thread Yebach
If anyone can hellp me with this I have a page with embeded htmls. One of them should have a SQLForm.grid to manage table of workers I am having difficulties because SQLForm.grid is in edit function. Besides the fact that it looks awful it also does not work properly I asked a question on

[web2py] SQLFORM smart grid child table fields and editing excelike

2014-07-15 Thread Yebach
Hello I am using SQLFORM smartgrid. My child table field is not shown on my form (status.s_code). Why? Also. If I (user) click(s) on edit, all fields are editable. how do I set which fileds are or can be editable and which one not. Is it possible to create a form that is click in editable

[web2py] Re: smartgrid: linked_tables=dict(parent=['child'], child=[''])

2014-07-15 Thread Yebach
How did you insert icons for edit in your form I am using SQLFORM.smartgrid and I want my grid to be more bootstrap like. Also I am having problems with displaying my child table fields (They are not displayed :)) Any suggestions? Here is my code workers = db(db.worker.w_organisation ==

[web2py] Re: SQLFORM smart grid child table fields and editing excelike

2014-07-16 Thread Yebach
models for two tables that need to be shown db.define_table('worker', Field('id', type ='id'), Field('w_organisation', type ='integer'), Field('w_user', type ='integer'), Field('w_status', 'reference status'), Field('w_first_name',type='text'), Field('w_last_name',type='text'),

[web2py] Re: SQLFORM smart grid child table fields and editing excelike

2014-07-16 Thread Yebach
validator for field ) but size of fileds is still too big. On Tuesday, July 15, 2014 3:58:17 PM UTC+2, Anthony wrote: On Tuesday, July 15, 2014 6:58:28 AM UTC-4, Yebach wrote: Hello I am using SQLFORM smartgrid. My child table field is not shown on my form (status.s_code). Why? Can you

[web2py] SQLFORM grid process not working

2014-07-21 Thread Yebach
Hello I have a SQLForm.grid. I want to create a response.flash message but on my if evaluation I get an error when my edit view is done type 'exceptions.AttributeError' 'DIV' object has no attribute 'process' even on my sqlform.grid view this is my controller function form =

[web2py] json parsing and db insert problem

2014-07-25 Thread Yebach
Hello OK can smbd. explains this S4!#T to me. I am sending json string from my view to controller. in request.vars['value'] there is a string /dict and for easier handling I want to convert it to a dict. Now this code works. def saveAsFormData(): import json #data =

[web2py] multiple SQLFORM.grid on tabs

2014-08-11 Thread Yebach
Hello I am trying to create a view where I have tabs and each tab has its own view. All tabs are included into main view. lets call it settings. In settings there are tabs for user to insert workers into tables, posts, etc etc. all the (un)necessary stuff. For each I would like to use

[web2py] sqlform.grid edit view back button

2014-08-19 Thread Yebach
Hello I have to create multiple sqlform.grids in my page i used bootstrap tabs to load different htmls with different controller functions (each for every grid) It works ok and does the trick except when I edit record I and click the back button the link is not back to the page it was so I

[web2py] web2py postgres sort by

2014-11-03 Thread Yebach
Hello I have a postgres db with encoding and collation settings CREATE DATABASE algit_osnovna_sola WITH OWNER = postgres ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8' CONNECTION LIMIT = -1; When I use select

Re: [web2py] Re: web2py postgres sort by

2014-11-05 Thread Yebach
database with proper collations. See on postgresql.org how to do it. mic 2014-11-04 9:56 GMT+01:00 Niphlod nip...@gmail.com javascript:: this is more suited to a postgresql forum than a web2py's one On Tuesday, November 4, 2014 8:52:54 AM UTC+1, Yebach wrote: Hello I have

[web2py] registration settings not working

2014-11-10 Thread Yebach
Hello In my db.py i have the following settings auth.settings.registration_requires_verification = True auth.settings.registration_requires_approval = True/False - it is always Fasle - user can login even if I set to True?? auth.settings.reset_password_requires_verification = True

[web2py] send mail error

2014-11-12 Thread Yebach
Hello I am getting this error on my local Windows machine where I run my web2py server web2py:Mail.send failure:[Errno 10061] No connection could be made because the target machine actively refused it Any suggestions? Thank you -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] How to automatically send emails to users if they perform an action like sign up...

2014-11-12 Thread Yebach
My login settings such as auth.settings.registration_requires_verification = True auth.settings.registration_requires_approval = False auth.settings.reset_password_requires_verification = True are not working Any idea why? On Monday, January 21, 2013 2:26:31 PM UTC+1, rochacbruno wrote:

[web2py] get record id to delete row in table

2014-11-26 Thread Yebach
Hello I have a table and a SQLFORM.grid in my view. In SQLFORM.grid I show list of active workers and in my table I show all inactive workers. I am not using a SQLFROM for both since showing two results in double forms after edit/view click In my table of inactive workers I have a button

[web2py] autofill noneditable field in SQLFORM.grid

2014-11-28 Thread Yebach
Hello I have a SQLFROM.grid and some fields are not editable but the value is calculated based on two other fields a user inserts and should be seen for user after he inserts the values for them e.g.: start time : 9:00 --user inserts end time : 11:00 --user inserts duration: 2:00 - calculated

[web2py] SQLFORM.grid field is not empty if another field is full

2014-12-01 Thread Yebach
Hello I have a SQLFORM.grid and I have to raise error for user if he inserts value into one field and not another. Example start 1 10:00 end 1 12:00 - has to show error if field is empty - start 2 16:00 - not necessary to be inserted end 2 20:00 - has to show error if start 2 is not empty

[web2py] Re: SQLFORM.grid field is not empty if another field is full

2014-12-01 Thread Yebach
, Yebach wrote: Hello I have a SQLFORM.grid and I have to raise error for user if he inserts value into one field and not another. Example start 1 10:00 end 1 12:00 - has to show error if field is empty - start 2 16:00 - not necessary to be inserted end 2 20:00 - has to show error

[web2py] SQLFORM.grid extra button

2014-12-02 Thread Yebach
Hello I have a SQLFORM.grid and beside the default buttons (edit,view, delete,...) I would like to add a new one to change a status in my database table. Any suggestions? thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: Rendering null values in SQLFORM.grid

2014-12-02 Thread Yebach
Since I have time and integer fields I cannot set default to ''. What do you suggest for a solution? On Monday, June 10, 2013 5:32:33 PM UTC+2, Niphlod wrote: The second one you said (i.e. altering the default repr for None values). From a theoretical standpoint, a null value is not an

[web2py] Re: python in javascript extension file (*.js)

2014-12-02 Thread Yebach
Is it possible to include {{=T()}} in my static js file?? Smth like $('.multiselectDays').multiselect({ numberDisplayed: 5, nonSelectedText: 'Izberite dneve', // {{=T('Select days')}} includeSelectAllOption: true, selectAllText: 'Izberi vse' //{{=T('Select all')}} }); I need it for

[web2py] SQLFORM.grid stylize

2014-12-04 Thread Yebach
Hello What is the best way to stylize my SQLFORM.grid form E.g.: my dropdown field is smaller the others also the edit form is as wide as the page I would like to reduce the size, etc. thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] presenting None values in SQLFORM.grid

2014-12-11 Thread Yebach
Hello In my SQLFORM.grid I have fields of type integer (as in database) and if they are null the presentation in my view is None. I would like to change them to be presented as empty Any suggestions? thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Verification email is not sent

2014-12-11 Thread Yebach
These are my settings. Are you using standard form for registration or custom form? ## configure email mail = auth.settings.mailer mail.settings.server = 'mx.fdff.si:25' mail.settings.sender = '' mail.settings.login = 'ix' mail.settings.tls = False auth.messages.verify_email = T('Click

[web2py] adding html to SQLform.grid

2014-12-24 Thread Yebach
Hello Is it possible to add html (span) to SQLFORM.grid. I have a color picker widget and it works ok but it colors the whole field. I would like to add a new html tag inside a table where color picker would be presentet. It is possible to do this inside web2py or do I have to write JS code.

[web2py] database select from set encoding

2014-12-29 Thread Yebach
hello I have a postgres dabatabase with utf8 encoding after executing workersDb = db(db.worker.w_organisation == org).select(db.worker.id, db.worker.w_nick_name).as_list() I get a list of dict where my strings are endoed as 'Moj\xc4\x8dca' where it should write Mojčca How do i set the

[web2py] navbar in sqlform.grid

2014-12-29 Thread Yebach
Hello My navbar user button does not show dropdown options when I am in a view where SQLFORM.grid is? Any suggestions why? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: export table to csv

2015-01-22 Thread Yebach
I managed to solve the issue with the following code def csvExport(): scriptId = request.args[0] #rows = db(query,ignore_common_filters=True).select() rows = db(db.result.r_id_script == scriptId).select(db.result.r_item1_name, db.result.r_date,

[web2py] export table to csv

2015-01-21 Thread Yebach
Hello I am trying to create a one button click export to csv, so if a user click he gets a download popup without redirect to new page my controller (script.py) @auth.requires_login() def excelExport(): import csv import cStringIO scriptId = request.args[0] rows = db(db.result.r_id_script ==

[web2py] auth_user table referenced table

2015-02-12 Thread Yebach
Hello I have a question regarding adding extra fields to auth_user table now I saw a couple of posts but none answers my question I have a table organization. On user registration user adds organization name in form. this value should be inserted into table organization and id of the record

[web2py] return javascript alert from contorler without redirection

2015-02-19 Thread Yebach
Hello I have a button for user to export some data from db. If he does not have the right privileges (that is checked on server) I would like to return an alert (possible modal or smth) without redirection after he clicks ok So far I have an alert but user is redirected to an empty page

[web2py] SQLFORM.grid check if record in db

2015-01-27 Thread Yebach
Hello I have a SQLFORM.grid page Values for one filed (code) in add or edit view is filed with js code from values of two other fields. User can deactivate this record - it can not be deleted only status is set to e.g. 100 If user creates a new record that creates the same values for code

[web2py] logging exceptions

2015-01-28 Thread Yebach
Hello In my app I have a lot of functions with try: exception: What would be the best way to catch and log exceptions in a file ? thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] on user registration insert user id into referenced table

2015-01-12 Thread Yebach
Hello I would like to insert a new registered user Id into another table. What would be the easiest way without controller code? thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] submenus in layout

2015-02-10 Thread Yebach
I would like to create a drop down menu in my layout. The data for menu is read from menu.py this is my list for menu response.menu_logged = [ (T('Schedules'),URL('default','index')==URL(),URL('default','index')), (T('New schedule'),URL('script','edit')==URL(),URL('script','edit',

[web2py] web2py shutil move or delete

2015-02-10 Thread Yebach
Hello I encounter an interesting problem or bug I have a app that runs some *.exe program that returns a file (*.out) to be processed every couple of second. If I want to stop this exe from working I delete *.lls file. So if a user hits play button I create lls file put it in a directory, sets

[web2py] Re: auth_user table referenced table

2015-02-12 Thread Yebach
organization id. Try removing the wizard from extra fields to guess more. Just in case, you can try this other syntax: auth.settings.register_onvalidation.append(lambda form: add_organization( form)) Regards. El jueves, 12 de febrero de 2015, 10:18:46 (UTC+1), Yebach escribió: Hello

[web2py] Re: web2py shutil move or delete

2015-02-10 Thread Yebach
What do you suggest then? This part work? the problem is inside if script.sc_status == 11: On Tuesday, February 10, 2015 at 2:21:13 PM UTC+1, Niphlod wrote: oh please DON'T chdir ! it's not thread safe On Tuesday, February 10, 2015 at 11:19:18 AM UTC+1, Yebach wrote: Hello I encounter

Re: [web2py] Re: navbar in sqlform.grid

2015-01-08 Thread Yebach
Do you mean in auth tables or other tables In auth tables I do not have, only thing is I added one field I have in other tables On Friday, January 2, 2015 8:16:42 PM UTC+1, Alex Glaros wrote: just guessing do you have the requires clause in your db.py file? E.g.:

[web2py] return server error to uese

2015-03-26 Thread Yebach
Hello What would be the best way to return server error in try, except to user I have multiple functions and i have try, except in each and I would like to show user in alert what the error was (only for selected functions) my except is except Exception as e:

[web2py] try exception update does not work

2015-03-26 Thread Yebach
Hello In my controller function I have a couple of try excepts. In case of except I want to update db record status to different value based on where the error occurred. somehow update record is not executed any suggestions why? here is my controller function def runWoshi(scriptId, script,

[web2py] Re: serving a zip file

2015-01-30 Thread Yebach
Using parts of your code I have a problem with zip file. It appends text to new file in my zip So first worker has in his ics file his data but second one has his and from previous This is my code cal = Calendar() import zipfile, cStringIO exported_chunks_zip = cStringIO.StringIO()

[web2py] concatenating strings in group by select

2015-06-04 Thread Yebach
Hello I have the following SQL for PostgreSQL select rw_worker , rw_date , array_to_string(array_agg(distinct results_woshi.rw_shift),'') AS shifts from results_woshi where rw_date '2015-01-01' and rw_script = 42 group by rw_worker, rw_date order by rw_date The result is

Re: [web2py] Re: one to many relationship

2015-08-11 Thread Yebach
To create one to many form i tried to follow the post from this guy http://blog.jotbe-fx.de/articles/2522/web2py-Normalized-many-to-many-model-with-multiselect-drop-down Also to create the dropdown etc. The thing worked kind of but the problem was that my grid was not getting populated once

  1   2   >