[web2py] multiple views same controller

2014-05-19 Thread ctrlSoft
Hi, what is the best way to make multiple views for the same controller. i have an application with multiple domains .com .de .it co.uk for every domain the controllers, models is the same but in views i have to make some changes it's different for every domain for static files i used routes, but

[web2py] submit twice form to update in DB

2014-03-12 Thread ctrlSoft
I have a form, so i have to submit twice to see changes in database, on first submit data is null import json record = db(db.sf_contract.sf_login_id == auth.user.id).select().first() form_ccdata = json.dumps({"credit_card_type":request.vars.credit_card_type,"card_holder_name":request.vars.ca

[web2py] populate extra elements from one db field and table field

2014-03-12 Thread ctrlSoft
hi db.define_table('sf_contract', Field('id','id', readable=False), Field('sf_login_id', readable=False, writable=False, requires=IS_IN_DB(db, db.sf_login.id)), #. Field('ccdata')) # this field contains a json in ccdata i have to store a json {"expiration_year": "2014", "credit_c

[web2py] custom login_bare()

2013-05-28 Thread ctrlSoft
i want keep users in the same table (default auth), and i have 2 kind of auth. 1 basic and second is oauth.(facebook) in basic auth i use standart authentification, but with oauth i want to verify users by email, name .. token once auth object password is required i decided for oauth do defi

[web2py] Re: add items in navbar .. mode=dropdown

2013-04-30 Thread ctrlSoft
by default i have, login, logout register, i wish i could append some links only if auth.user -- --- 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+

[web2py] add items in navbar .. mode=dropdown

2013-04-30 Thread ctrlSoft
hi, how to add items in ... ... ... generated by auth.navbar(mode="dropdown"), -- --- 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...@google

[web2py] Re: pass db,tablename,fields ... values to module or define table in module?

2013-04-10 Thread ctrlSoft
thanks a lot for your sugetions and quick responses. -- --- 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,

[web2py] Re: pass db,tablename,fields ... values to module or define table in module?

2013-04-10 Thread ctrlSoft
in model dbtables.py #. #. db.define_table('wishlist', Field('user_id', db.auth_user, requires=IS_IN_DB(db,'auth_user.id','%(username)s')), Field('offer_id', db.offer, requires=IS_IN_DB(db,'offer.id','%(title)s')), Field('created_on', type='datetime', default=request.now, writable=False))

[web2py] pass db,tablename,fields ... values to module or define table in module?

2013-04-10 Thread ctrlSoft
my db.tables are defined in model, i have 3 controllers, and i have some functions that are used in all 3, so i decided to create an module. now i'm a little confused, i saw some examples where tables are defined in module, and other posts where is talinkg about import wich is the best way?

[web2py] Re: auth.settings.extra_fields

2013-04-05 Thread ctrlSoft
models are executed in alphabetical order. db.py and after that companies.py, you make reference to a non define table. you sould define companies table right after auth = Auth(db) and before auth.settings. extra_fields['auth_user'] = auth = Auth(db) # # # # db.define_table('compa

[web2py] Re: how to send bulk emails with web2py

2013-04-05 Thread ctrlSoft
Amazon Simple Email Service (Amazon SES) http://aws.amazon.com/ses/ -- --- 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. Fo

[web2py] Re: OAuth2/Facebook auth alongside standard authentication

2013-04-03 Thread ctrlSoft
din you successfully implemented this? -- --- 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:/

[web2py] guidelines to implement oauth with basic web2py auth (noob question)

2013-04-03 Thread ctrlSoft
i want in my application to implement 2 kind of auth(basic and oauth in my case facebook) 1)should i keep it separate? or to generate an entry in basic for every external first login 2)posibility to merge them latter 3)should i create a custom Auth() for external login? i'm a little confused wit

[web2py] Re: [solved] Re: Facebook conect and ExtendedLoginForm()

2013-04-01 Thread ctrlSoft
hi, i try to use web2social example, but got an error, { "error": { "message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.", "type": "OAuthException", "code": 191 } } i setup, in facebook apps dashboard site url http://mysite.com/w

[web2py] facebook connect

2013-03-26 Thread ctrlSoft
hi, i want to implement 2 kind of login on my app. 1) basic auth 2) facebook connect i extended auth_user auth.settings.extra_fields['auth_user']= [ Field('ballance', type='double', default=0, writable=False, readable=False), Field('image', type='string'), Field('phone', type='integer'),

[web2py] strange error

2012-12-24 Thread ctrlSoft
[Errno 1] _ssl.c:503: error:140943FC:SSL routines:SSL3_READ_BYTES:sslv3 alert bad record mac --

[web2py] Re: authentification,registration fails

2012-08-12 Thread ctrlSoft
version is 1.99.7, i have 10 websites (10 apps in applications/ folder) in 4 from its, i periodicaly make chages, but i dont think that code from one application can affect all applications. in web2py code i didn't made any changes or upgrades. --

[web2py] authentification,registration fails

2012-08-12 Thread ctrlSoft
hi, my web2py app is hosted on webfaction. everything worked fine. about 3 weeks ago authentification,registration stopped working. first in chrome not worked after a few days in firefox http://agsystem.md/welcome/default/user/register?_next=/welcome/default/index does anybody has the sam

Re: [web2py] Re: prettydate question

2012-07-25 Thread ctrlSoft
On Wednesday, July 25, 2012 7:17:43 PM UTC+3, Alec Taylor wrote: > > On Tue, Jul 24, 2012 at 2:28 AM, ctrlSoft wrote: > >> yes. >>>> >>> http://i.imgur.com/jaeop.jpg >> >> http://i.imgur.com/xPBG1.jpg >> >> Quick aside, that vi

Re: [web2py] prettydate question

2012-07-25 Thread ctrlSoft
browser is set up to english, but in model i do T.force('ro'). without forced translation result is the same -- # coding: utf8 { '!=': '!=', '!langcode!': 'ro', '!langname!': 'Rom?n?', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a

Re: [web2py] prettydate question

2012-07-25 Thread ctrlSoft
but with translation wont work, i have al translation files in languages folder. --

Re: [web2py] prettydate question

2012-07-25 Thread ctrlSoft
On Tuesday, July 24, 2012 5:58:16 PM UTC+3, dbdeveloper wrote: > > ctrlSoft, is issue still present ? > > Vladyslav Kozlovskyy (Ukraine) > > 23.07.12 13:32, ctrlSoft написав(ла): > > datetime format is: 2012-07-18 10:00:00 > > hi in view i have f

[web2py] Re: prettydate question

2012-07-23 Thread ctrlSoft
> > yes. >> > http://i.imgur.com/jaeop.jpg http://i.imgur.com/xPBG1.jpg --

[web2py] prettydate question

2012-07-23 Thread ctrlSoft
datetime format is: 2012-07-18 10:00:00 hi in view i have following code: {{=prettydate(row.deadline,T)}} but result is : %d days ago %d days ago %d days ago %d days ago ... 1 week ago 1 week ago ... %d weeks ago %d weeks ago %d weeks ago how to display 4 days ago 5 days ago ... 2

[web2py] image thumb

2012-06-28 Thread ctrlSoft
hi i would like to implement in my app a feature , create thumbs runtime like in picasa or imgur original image http://i.imgur.com/E9az6.jpg thumb croped http://i.imgur.com/E9az6*b*.jpg or in picasa original image: https://lh3.googleusercontent.com/-iNUvq0K9l24/T

[web2py] date/datetime format question

2012-06-23 Thread ctrlSoft
hi, my datetime field format is Field('deadline','datetime', requires=IS_DATETIME(format=('%d-%m-%Y %H:%M:%S')), label=T('Deadline')), but in view row.deadline is displayed in this format 2012-06-27 11:00:00 and in exported csv the same. how do i set datetime format that is displayed in vi

Re: [web2py] count current visitors

2012-06-18 Thread ctrlSoft
with page views i understand. but without any analitycs tools, is there a method to count active/oline visitors not registered users. i want to display on my page: total visits: 01234... today:01234.. *online:5*

Re: [web2py] count current visitors

2012-06-18 Thread ctrlSoft
thanks, very helpfull

[web2py] count current visitors

2012-06-18 Thread ctrlSoft
hi, how to count current site visitors? smth like in google analitycs ... real-time visitors.

[web2py] Re: sqlform.grid html text

2012-06-03 Thread CtrlSoft
thanks! On Tuesday, May 29, 2012 1:14:54 AM UTC+3, villas wrote: > > You could try to use .represent. I mean something a bit like this... > > db.yourtable.yourfield.represent = lambda yourfield,row: XML(yourfield) > query = db > grid = SQLFORM.grid(query.) > return dict(grid=grid) > > Ho

[web2py] Re: appadmin in Romanian (for Massimo)

2012-06-03 Thread CtrlSoft
salut Ioane! )

[web2py] sqlform.grid html text

2012-05-26 Thread CtrlSoft
hi, how to display in sqlform.grid -> viewhtml formated text? i mean: *someText lazy** fox* instead ofsomeText lazy fox

[web2py] Re: pass table name in rows

2012-05-24 Thread CtrlSoft
added_on field is datetime, so i want to sort rows by date time rows = rows.sort(lambda row: row.added_on) the main idea consist in showing last 10 added articles or news, ordered by added_on field it can be 7 news or 3 articles 5 news 5 articles 1 news 9 artilces

[web2py] pass table name in rows

2012-05-23 Thread CtrlSoft
hi, i have this controller: def index(): rows1 = db(db.news.public == True).select(orderby=~db.news.added_on, limitby=(0,10)) rows2 = db(db.articles.public == True).select(orderby=~db.articles.added_on, limitby=(0,10)) rows = rows1.as_list()+rows2.as_list() return dict(ro

[web2py] orderby from 2 tables

2012-05-06 Thread CtrlSoft
hi, i have 2 tables both has "added_on" field i need last 'n'(lets assume n=5) rows from both tables ordered by added_on. it can be 1 from first table and 4 from second or 2|3 rows1 =db(db.table1).select(orderby=~db.table1.added_on, limitby=(0,5)) rows2 =db(db.table2).select(orderby=~db.table2.

[web2py] Re: plugin from dev.s-cubism.com question

2012-05-05 Thread CtrlSoft
On Saturday, May 5, 2012 2:40:52 PM UTC+3, kenji4569 wrote: > > I think so, but I don't have any clue for this session problem.. > > 2012年5月5日土曜日 19時58分19秒 UTC+9 CtrlSoft: >> >> on localhost works fine beacause, it is using the same session, but on >> server

[web2py] Re: plugin from dev.s-cubism.com question

2012-05-05 Thread CtrlSoft
on localhost works fine beacause, it is using the same session, but on server, when i acces page app creates one session and when i submit the upload form it creates another one session, i think the problem is that there is different sessions. app remember previous session but form pass another

[web2py] Re: plugin from dev.s-cubism.com question

2012-05-05 Thread CtrlSoft
u can check above links, still not solved problem

[web2py] Re: plugin from dev.s-cubism.com question

2012-05-05 Thread CtrlSoft
this is my online version > http://agsystem.md/upload/plugin_elrte_widget/index >> >> > local host version can be accesed here: http://89.28.110.232:8100/upload/plugin_elrte_widget/index is the same application

[web2py] plugin from dev.s-cubism.com question

2012-05-04 Thread CtrlSoft
hi i installed this plugin from dev.s-cubism.com http://dev.s-cubism.com/plugin_elrte_widget i have a problem with upload/list uploaded files on local host works fine, but when i upload it to server, upload is done, but the uploaded file is not listing/appear in dialog anybody used it? to give

[web2py] update images computed field .. again

2012-05-01 Thread CtrlSoft
hi i have a resize function wich creates image thumbanils... def THUMB(image, nx=120, ny=120): from PIL import Image import os try: img = Image.open(request.folder + 'static/img_folder/' + image) img.thumbnail((nx,ny), Image.ANTIALIAS) root,ext = os.path.spli

Re: [web2py] autodelete image computed field

2012-04-29 Thread CtrlSoft
on row delete works, but on row edit when i change row image or delete only image, image_thumb stil remains on disk

[web2py] autodelete image computed field

2012-04-28 Thread CtrlSoft
hi i have a resize function wich creates image thumbanils... def THUMB(image, nx=120, ny=120): from PIL import Image import os try: img = Image.open(request.folder + 'static/img_folder/' + image) img.thumbnail((nx,ny), Image.ANTIALIAS) root,ext = os.path.spl

Re: [web2py] response.view html file from static

2012-04-26 Thread CtrlSoft
ns/files.html' > > return dict() > > > response.render uses /view as root folder, so you can navigate from there. > > On Thu, Apr 26, 2012 at 4:53 PM, CtrlSoft wrote: > >> def myfunction(): >> >> response.view = 'static/tinymce/jscripts/tiny_

[web2py] response.view html file from static

2012-04-26 Thread CtrlSoft
i have a file located under static folder that i want to return as view i tried this: def myfunction(): response.view = 'static/tinymce/jscripts/tiny_mce/plugins/files.html' return dict() but doesnt workt any ideas?

[web2py] Re: object is not callable

2012-04-24 Thread CtrlSoft
> > i think the problem is in request.args so i tried smth like this: > arg = request.args[0] rows = db(db.articles.reference == arg).select(*articles,limitby=(0,30)) return dict(row=db.menu[arg], rows = rows) and still have problems but another error: Traceback (most recent

[web2py] object is not callable

2012-04-24 Thread CtrlSoft
hi, my application on local host works fine but when i upload to server i got this error Traceback (most recent call last): File "/home/zerooo123/web2py/gluon/restricted.py", line 205, in restricted exec ccode in environment File "/home/zerooo123/web2py/applications/orhei/controllers/defa

[web2py] Re: filename in dal

2012-04-22 Thread CtrlSoft
> > oh, thanks, next time i will check the book before ask here : > >

[web2py] filename in dal

2012-04-22 Thread CtrlSoft
hi, it's possible in dal to write smth like this: db.define_table("files", Field('file', 'upload', uploadfolder=request.folder+'static/docs'), Field('filename',type='string', default=request.vars.file.filename), ) i tried but got some errors, can anyone help me

[web2py] process args

2012-04-09 Thread CtrlSoft
how to process args early than my model? i want to split a unicode string that are in request.args for example: in view: "+str(b.title)+" b.id = 15 b.title = "аыв ывташгытацуокц-" in controller: def menu(): #return dict(row=db.menu[request.args[0].split('-')[0]]) # here i want to

[web2py] request.vars in DAL

2012-04-05 Thread CtrlSoft
hi i'm little confused with request. ... model: db.define_table('menu', Field('parent',type='integer', requires=IS_EMPTY_OR(IS_IN_DB(db, 'menu.id', '%(title)s'))), Field('title', type='string',label=T('Title')), Field('content', type='text',label=T('Content')), Field('menu_type', type='stri

Re: [web2py] is_in_db two tables

2012-04-04 Thread CtrlSoft
> > many thanks > >

[web2py] membership

2012-04-01 Thread CtrlSoft
how to hide tables based on user membership? i have following functin in controller: def view(): table = request.args(0) grid = SQLFORM.grid(db[table],args=request.args[:1], ui = dict(widget='', header='', content='', default='', cornerall='',

Re: [web2py] is_in_db two tables

2012-04-01 Thread CtrlSoft
it's a good idea, but i'm using sqlform.grid in app admin and this will create confusion in rows ..., i need to hide rows that are in sidemenu or in top menu.

[web2py] is_in_db two tables

2012-04-01 Thread CtrlSoft
i have the follwing tables: db.define_table('topmenu', Field('parent',type='integer', requires=IS_EMPTY_OR(IS_IN_DB(db, 'topmenu.id', '%(title)s'))), Field('link', type='string', label=T('Link')), Field('title', type='string',label=T('Title Ro')), Field('content', type='text',labe

[web2py] common row for multiple fildes names

2012-02-12 Thread Td CtrlSoft
in model: db.define_table("news", Field("title_en",requires=IS_NOT_EMPTY()), Field("conten_en" ,type='text'), Field("title_fr",requires=IS_NOT_EMPTY()), Field("conten_fr" ,type='text'), Field("title_de",requires=IS_NOT_EMPTY()), Field("conten_de" ,type='text'),