[web2py] Internalization for text containing link

2016-08-17 Thread Marko Seppälä
What is the standard way to use T helper with text containing links: Please click here my friend. Do I need to have three separate T elements, like this: {{=T('Please click ')}}{{=T('here')}}{{=T(' my friend.')}} Or is there possible better syntax to handle this kind of cases? Thanks

[web2py] Include tag doesn't preserve indentation level on included text

2016-09-25 Thread Marko Seppälä
Hi, Not sure if this is expected behavior but I can't figure out any reason why it is done like this. Currently include tag messes up the indentation level. Only first line of included file is indented same level as parent file, other lines start from zero. I think indentation level should be

[web2py] Re: Include tag doesn't preserve indentation level on included text

2016-09-26 Thread Marko Seppälä
maanantai 26. syyskuuta 2016 14.17.24 UTC+3 Anthony kirjoitti: > > On Sunday, September 25, 2016 at 11:56:33 PM UTC-4, Marko Seppälä wrote: >> >> Hi, >> >> Not sure if this is expected behavior but I can't figure out any reason >> why it is done like th

[web2py] Re: Include tag doesn't preserve indentation level on included text

2016-09-26 Thread Marko Seppälä
maanantai 26. syyskuuta 2016 16.55.13 UTC+3 Anthony kirjoitti: > > > The {{include}} statement is intended to include exactly what is in the >>> included file, starting at the point of the {{include}} -- if the text in >>> the included file is not indented, then neither will it be indented once

[web2py] Re: Include tag doesn't preserve indentation level on included text

2016-09-26 Thread Marko Seppälä
maanantai 26. syyskuuta 2016 20.11.06 UTC+3 Anthony kirjoitti: > > > It actually doesn't matter that much for me, I only work with web2py >> templates. End result just looks little unprofessional since it's not >> formatted properly and I couldn't figure out any reason why not to do so. >> > >

[web2py] Setup web2py in Vagrant provision phase

2016-10-04 Thread Marko Seppälä
Hi, I'm using Vagrant to create Ubuntu 14.04 virtual server. I use setup-web2py-ubuntu.sh script in provision phase but it doesn't work out of the box with Vagrant. If I ssh to virtual server and run the script, everything works. But in "creating a self signed certificate" phase script asks so

Re: [web2py] Setup web2py in Vagrant provision phase

2016-10-05 Thread Marko Seppälä
ficate-without-prompt-in-shell-script > > Richard > > On Tue, Oct 4, 2016 at 2:04 PM, Marko Seppälä > wrote: > >> Hi, >> >> I'm using Vagrant to create Ubuntu 14.04 virtual server. I use >> setup-web2py-ubuntu.sh >> script in provision phase

[web2py] Custom formstyle for auth

2016-10-25 Thread Marko Seppälä
Hi, I'm trying to set custom form styles for auth, like register or login form. I would like to set completely new formstyle function for that, so that it's easy to use over and over again just setting formstyle = my_formstyle in appconfig.ini. How I could do that? I can use formstyle_bootstra

[web2py] How to translate dynamic data with web2py

2016-11-05 Thread Marko Seppälä
Let's say we have a table db.define_table('thing', Field('name'), Field('description', 'text'),Field('age', 'integer')) and we need to translate this to X amount of different languages and there could be potentially huge amount of these objects

[web2py] Re: How to translate dynamic data with web2py

2016-11-12 Thread Marko Seppälä
Thanks Leanel, I'll try your approaches. Especially second approach looks great! Any idea why that kind of solution isn't part of standard web2py and documented in web2py book? lauantai 5. marraskuuta 2016 19.56.03 UTC+2 Leonel Câmara kirjoitti: > > https://groups.google.com/forum/#!topic/web2p

[web2py] How to upload files programmatically from file system?

2016-03-31 Thread Marko Seppälä
Hi, I want to upload some of the images programmatically from file system, when initializing the database. Not the actual file though, just normal upload so that file stays in file system but it's accessible via database for every user. I tried something like this: db.define_table('image',

Re: [web2py] How to upload files programmatically from file system?

2016-03-31 Thread Marko Seppälä
','images/files/{*0*}'.format(file[1])) > > Richard > > On Thu, Mar 31, 2016 at 6:34 AM, Marko Seppälä > wrote: > >> Hi, >> >> I want to upload some of the images programmatically from file system, >> when initializing the database. Not the act

[web2py] Using site packages with web2py

2016-04-14 Thread Marko Seppälä
Hi, I'm trying to import openpyxl to web2py without success. What is the right way to do it? I have working openpyxl in my Windows environment and I'm able to use it without problems when testing it without web2py. If I understood right, I can either install openpyxl to web2py site packages an

[web2py] Re: Using site packages with web2py

2016-04-14 Thread Marko Seppälä
Hi, Just found that, I've always run web2py from exe-file so far, so didn't realize that before... torstai 14. huhtikuuta 2016 19.56.34 UTC+3 Niphlod kirjoitti: > > first of all, web2py is not python 3 compatible. > > On Thursday, April 14, 2016 at 6:02:20 PM UTC+

[web2py] Multi language database query

2016-04-22 Thread Marko Seppälä
Hi, I have a following database: db.define_table('language', Field('code', 'string', unique=True) ) db.define_table('translation', Field('language_id', 'reference language', notnull=True, readable=True, writable=True), auth.signature ) db.define_table('language_tr', Fie

[web2py] Re: Multi language database query

2016-04-22 Thread Marko Seppälä
27;user_selected_language') > . what do we want ? ltr.ALL, let's select it > . cook it up alltogether > db( > (lng.id == trs.language_id) & (trs.id == ltr.translation_id) & > (lng.code == 'user_selected_language') > ).select(ltr

[web2py] How to get rows in right format

2016-04-30 Thread Marko Seppälä
Hi, I have a database where following structure is quite common: db.define_table('thing', Field('name) ) db.define_table('property', Field('name) ) db.define_table('thing_has_property', Field('thing_id', 'reference thing'), Field('property_id', 'reference property'),

[web2py] Re: How to get rows in right format

2016-05-01 Thread Marko Seppälä
It works, thanks! I forgot the whole thing. When I started with web2py, one expert recommended me not to use list references but do all intermediary tables yourself. Is there any drawbacks to use list reference instead of doing those intermediary tables yourself? lauantai 30. huhtikuuta 2016

[web2py] Re: How to get rows in right format

2016-05-04 Thread Marko Seppälä
n controllers and views, so I need to reorganize the data somehow. Alex Boat, ChairBob ShoesCurt Boat Should be probably some kind of dictionary containing keys person and things, and then things is list of individual things. maanantai 2. toukokuuta 2016 20.11.33 UTC+3 Anthony kirjoitti: &