[web2py] SOLVED: Where does configuration.get() look for files? Or does it?

2018-05-03 Thread Tom Campbell
Ah. It's AppConfig (see http://web2py.com/books/default/chapter/29/13/deployment-recipes?search=AppConfig#AppConfig-module). The values are stored in .ini format in the /private directory, which is not supposed to be part of the Git repo. On Thursday, May 3, 2018 at 1:40:44 AM UTC-7, Tom Campb

[web2py] [SOLVED] Problem sending email with new web2py version on Apache 2.4

2017-06-07 Thread e27gis
I have finally solved my email sending problem on port 587 with APACHE 2.4, It was due to the fact that the *Web2py 2.14.6, Apache 2.4.23 and my Python 2.7.10 are just incompatible when dealing to starttls() or import ssl.Any version Python version above 2.7.9 does not work.* I have reinstal

[web2py] [solved] unable to install application on Windows Server and IIS

2017-05-19 Thread Carlos Kitu
Just to share a finding, I was getting crazy with a simple installation of a new application on Windows Server and Internet Information Server. Many applications in production with no issues, I could upload any other application, but was getting the "unable to install application" with an speci

[web2py] [Solved] "file inaccessible" on GAE for error handlers

2016-05-24 Thread Mathieu Clabaut
Hello, I had some difficulties to set up some "routes_onerror" files on GAE. It worked perfectly on a local instance, but each time an HTTP exception was raised, GAE issued a "file inaccessible" error (status 500). The problem comes from the fact that static files are treated specially on GAE a

[web2py] [SOLVED] Custom form not accepted (formkey missing)

2016-03-11 Thread Carlos Kitu
Hi guys, I don't show up here too often because all the issues I find use to be solved here. Good job. Today I was going nuts with one issue, and I would like to share my findings for other developer's shake. I was generating a form with SQLFORM.factory: form= SQLFORM.factory(...) In the contr

[web2py] [solved] Weird 'Row' object has no attribute 'id' and Ñ error

2015-01-10 Thread Carlos Kitu
Hi, just for other developers sake to save some time. I was getting this error: 'Row' object has no attribute 'id' Versión web2py™ Version 2.9.11-stable+timestamp.2014.09.15.23.35.11 Traceback (most recent call last): File "./web2py/gluon/restricted.py", line 224, in restricted exec cco

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-05-02 Thread Mariano Reingart
Could you send me a complete example? Are you using the updated version of pyfpdf? Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com On Thu, May 2, 2013 at 12:39 PM, Martin Weissenboeck wrote: > Thank you, I have tried u"World äöü éè €" and > "World äöü éè €" > > an

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-05-02 Thread Martin Weissenboeck
Thank you, I have tried u"World äöü éè €" and "World äöü éè €" and both table =TAG.font(table, _face="DejaVu") html = str(XML(table, sanitize=False)) pdf.write_html(html) and html = str(XML(table, sanitize=False)) html="%s" % html pdf.write_html(html) The result is the

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-05-02 Thread Jurgis Pralgauskis
by the way, not sure, if there is need to write u"World äöü éè €" or just "World äöü éè €" seems, both work On Thu, May 2, 2013 at 3:00 PM, Martin Weissenboeck wrote: > Some hours later... > Now I have tried to use the Arial-font: > > pdf.set_font('Arial','',10) > > There is always the same fo

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-05-02 Thread Jurgis Pralgauskis
try pdf.write_html("%s" % html ) On Thu, May 2, 2013 at 9:34 AM, Martin Weissenboeck wrote: > Hi, > I have tried again to generate a pdf file from an htlm file with someunicode > characters. > There is my test program. It's a simplified version, in the original > program there is a lot of addit

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-05-02 Thread Martin Weissenboeck
Some hours later... Now I have tried to use the Arial-font: pdf.set_font('Arial','',10) There is always the same font - set_font seems to do nothing. 2013/5/2 Martin Weissenboeck > Hi, > I have tried again to generate a pdf file from an htlm file with someunicode > characters. > There is

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-05-01 Thread Martin Weissenboeck
Hi, I have tried again to generate a pdf file from an htlm file with someunicode characters. There is my test program. It's a simplified version, in the original program there is a lot of additional test lines. def pp(): from gluon.contrib.pyfpdf import FPDF, HTMLMixin class MyFPDF(FPDF,

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-30 Thread Jurgis Pralgauskis
> Which font do you want to include? DejaVu - I guess it covers western languages.. (could be withouth bold/italics to save space) Another one could be for eastern chars (buy I don't know anything about them...) > I gave you contributor access Thanks :) On Wed, May 1, 2013 at 12:22 AM, Marian

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-30 Thread Mariano Reingart
Which font do you want to include? The font pack is 15MB, I don't know if it could be included with web2py. Also, the problem is that no one is complete (you need several fonts to cover west / east languages) https://pyfpdf.googlecode.com/files/fpdf_unicode_font_pack.zip BTW, thanks for you comm

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-28 Thread Jurgis Pralgauskis
by the way -- would it be possible to pack at least one ttf with web2py, and in normalize_text , when it notices unicode, automatically add (and set) default ttf font (if such is not set) to render ok ? On Sun, Apr 28, 2013 at 12:18 PM, Jurgis Pralgauskis < jurgis.pralgaus...@gmail.com> wrote:

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-28 Thread Jurgis Pralgauskis
SOLVED - the problem was that I needed to reload web2py -- for changed html.py to make effect ;) one more issue that after write_html(..) it "forgets" the previously set font (should be at least mentioned in docs.. :) https://code.google.com/p/pyfpdf/issues/detail?id=54#c2 On Sat, Apr 27, 20

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-27 Thread Mariano Reingart
Yes, sure, using jasper reports and java :-) Of course pyfpdf is not the silver bullet, but if users help to improve it with bug reports, test cases & tentative features or even ideas, surely it could be more powerful. That's the way open source works, and maybe we can reach even a simpler and mor

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-27 Thread Ovidio Marinho
This all ends with this tool made ​​by lucas davila. https://github.com/simpleservices/app_report-python/wiki/Using-the-AppReport-client-on-Web2py-Apps Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com 83 8826 9088 - Oi

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-27 Thread Mariano Reingart
Did you add the TTF unicode font with add_font? Can you post a complete example (ie a script.py just with the code to test), so I can reproduce it easily. Best regards, Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com On Sat, Apr 27, 2013 at 7:30 AM, Jurgis Pralgau

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-27 Thread Jurgis Pralgauskis
I see 2 lines were changed, the main - if 'face' in attrs and attrs['face'].lower() in self.font_list: + if 'face' in attrs: but I still get File "/home/jurgis/web2py/applications/apskaitele/controllers/default.py"

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-26 Thread Mariano Reingart
Sorry, I misread the email. Unicode fonts were not supported in html2pdf. I've made a change to allow them, please update html.py: https://pyfpdf.googlecode.com/hg/fpdf/html.py Then, you need to load a ttf unicode font, and then pass it in face attribute: pdf=MyFPDF() # add utf8 font pdf.add_

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-26 Thread Mariano Reingart
On Fri, Apr 26, 2013 at 11:42 PM, Mariano Reingart wrote: > On Fri, Apr 26, 2013 at 6:34 PM, Jonathan Lundell wrote: >> On 26 Apr 2013, at 1:17 PM, Jurgis Pralgauskis >> wrote: >> >> ok, SOLVED ttf issue for unicode example >> http://code.google.com/p/pyfpdf/wiki/Unicode >> just needed to creat

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-26 Thread Mariano Reingart
On Fri, Apr 26, 2013 at 6:34 PM, Jonathan Lundell wrote: > On 26 Apr 2013, at 1:17 PM, Jurgis Pralgauskis > wrote: > > ok, SOLVED ttf issue for unicode example > http://code.google.com/p/pyfpdf/wiki/Unicode > just needed to create directorygluon > contrib > fpdf > font > and place needed ttf

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-26 Thread Jonathan Lundell
On 26 Apr 2013, at 1:17 PM, Jurgis Pralgauskis wrote: > ok, SOLVED ttf issue for unicode example > http://code.google.com/p/pyfpdf/wiki/Unicode > just needed to create directorygluon > contrib > fpdf > font > and place needed ttf files insited it :) > then pdf.write(8, u"Ąžuolas") works fi

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

2013-03-06 Thread Relsi Hur Maron
Hi, I managed to solve it using the Diego Sorrilha sample [1]. If more anyone to need, gets the reference. =) [1] https://github.com/r4bugento/web2social Em terça-feira, 5 de março de 2013 00h17min48s UTC-3, Relsi Hur Maron escreveu: > > Hi guys!! >

[web2py] SOLVED 'efficiently search by tag' with postgres

2012-09-24 Thread andrej burja
hi it works thank you andrej On Sunday, September 23, 2012 12:18:32 AM UTC+2, Massimo Di Pierro wrote: > > Looks like postgres is picky and wants in groupby all the selected fields > in distinct. This should work: > > rows = db(data.id==tag.record_id)\ > (tag.name.belongs(tags)).select( >

[web2py] [Solved] Re: update() is creating a new item

2012-06-08 Thread Relsi Hur
Em sexta-feira, 8 de junho de 2012 12h32min12s UTC-3, Anthony escreveu: > > By default, form.process() does an insert of the submitted record. If you > don't want that, you can do: > > if form.process(..., dbio=False).accepted: > > or > > if form.validate(...): > > The only difference between pr

[web2py] [Solved] How to compute Field on update based on previous value.

2012-05-01 Thread François Delpierre
So both solutions are working. One on the form in the controller, one as compute in the models when defining the table. Thanks, Le mardi 1 mai 2012 21:38:59 UTC+2, François Delpierre a écrit : > > Hi Anthony, > > The proposal does not work as is. It looks like there is > no request.vars._formna

[web2py] SOLVED Re: Inline image generation with matplotlib

2012-01-16 Thread andrej burja
this works controller: def image(): return dict(a=IMG(_src=URL('myimage'+'.png'))) view: {{extend 'layout.html'}} This is the graph/image.html template {{=a}} but this doesn't controller: def image(): return myimage() view: {{extend 'layout.html'}} This is the graph/slika1.html template {{

[web2py] [solved] Doubt about multi-tenancy

2011-12-01 Thread Vinicius Assef
I found the solution: http://groups.google.com/group/web2py/browse_thread/thread/38a07b7e00b789ac/6bae4627c7587ddd?lnk=gst&q=tenant#6bae4627c7587ddd On Thu, Dec 1, 2011 at 1:52 PM, Vinicius Assef wrote: > Actually, may I remake my question. > > Taking the book example of multi-tenancy, what if

[web2py] SOLVED join and sum - display in view

2011-10-21 Thread andrej burja
working example controller: def person(): sum = db.t_payement.f_value.sum() rows= db().select(db.t_person.f_name,db.t_person.f_surname,db.t_person.f_city, sum, groupby=db.t_person.id, left=db.t_payement.on(db.t_person.id==db.t_payement.f_person)) return dict(rows=rows, sum=sum) vi

[web2py] SOLVED join and sum - display in view

2011-10-20 Thread andrej burja
this one works TD(row['SUM(t_payement.f_value)']) and also this TD(row._extra['SUM(t_payement.f_value)'])

[web2py] SOLVED: compute field and reference

2011-10-14 Thread andrej burja
there are two ways: db.define_table('quantity', Field('value','integer')) db.define_table('item', Field('unit_price','double'), Field('quantity',db.quantity), Field('total_price', compute=lambda r: r['unit_price']*db.quantity[r.quantity].value)) or

[web2py] [SOLVED] how to do db administration of default auth tables?

2011-10-06 Thread stefaan
Near the top of the scaffolding application, it said: db = DAL('sqlite://storage.sqlite') Near the bottom of the application i had copied from my old application the following: db = SQLDB('sqlite://db.db') So the variable db was used twice to indicate different tables. I have no idea now how a

Re: [web2py] [SOLVED] Call web2py from a microcontroller

2011-08-16 Thread Angelo Compagnucci
You are absolutely right! I'm aware of the generic view issue, but I've completely forgotten! Thank you very much for your help! 2011/8/16 Ross Peoples : > I should probably clarify "why" this is happening. The line I mentioned > checks to see if the client is running on the localhost (i.e. the

Re: [web2py] SOLVED - list:string - IS_IN_SET

2011-07-15 Thread Anthony
Looks like it has something to do with the use of an uppercase letter in itemType (the keyerror indicates it is looking for 'itemtype' -- no uppercase). Maybe related to https://groups.google.com/d/topic/web2py/tziBAOJFzJE/discussion. Anthony On Friday, July 15, 2011 3:23:21 PM UTC-4, Jim S w

Re: [web2py] SOLVED - list:string - IS_IN_SET

2011-07-15 Thread Jim Steil
I just went and recreated my db from scratch and then sync'd my old records over. No big deal this time... On 7/15/2011 2:15 PM, Jim Steil wrote: Did that already and couldn't find anything. On 7/15/2011 2:16 PM, Anthony wrote: Not sure about that -- check out http://web2py.com/book/defaul

Re: [web2py] SOLVED - list:string - IS_IN_SET

2011-07-15 Thread Jim Steil
Did that already and couldn't find anything. On 7/15/2011 2:16 PM, Anthony wrote: Not sure about that -- check out http://web2py.com/book/default/chapter/06#Fixing-Broken-Migrations. On Friday, July 15, 2011 3:09:37 PM UTC-4, Jim S wrote: Ok, I updated my table def here to be Field(

Re: [web2py] SOLVED - list:string - IS_IN_SET

2011-07-15 Thread Anthony
Not sure about that -- check out http://web2py.com/book/default/chapter/06#Fixing-Broken-Migrations. On Friday, July 15, 2011 3:09:37 PM UTC-4, Jim S wrote: > Ok, I updated my table def here to be > > Field('itemType', length=50, required=True, label='Item Type'), > > , ran with migrate=False,

Re: [web2py] SOLVED - list:string - IS_IN_SET

2011-07-15 Thread Jim Steil
Ok, I updated my table def here to be Field('itemType', length=50, required=True, label='Item Type'), , ran with migrate=False, fake_migrate=True and everything works. When I remove migrate=False, fake_migrate=True, then I get the following traceback: Traceback(most recent call last): Fil

Re: [web2py] SOLVED - list:string - IS_IN_SET

2011-07-15 Thread Anthony
And if you did need list:string, then I think you'd want to set multiple=True in the IS_IN_SET validator. On Friday, July 15, 2011 2:05:21 PM UTC-4, Jim S wrote: > Found this one myself. Don't use 'list:string'. This is just a regular > string field. > > On 7/15/2011 12:55 PM, Jim Steil wrot

Re: [web2py] SOLVED - list:string - IS_IN_SET

2011-07-15 Thread Jim Steil
Found this one myself. Don't use 'list:string'. This is just a regular string field. On 7/15/2011 12:55 PM, Jim Steil wrote: Hi Having another problem today with the following: table defined as: priceBackerItem = db.define_table('priceBackerItem', Field('priceBackerItemId', 'id

[web2py] [SOLVED] cannot import name DateTime

2011-04-03 Thread villas
It was due to package dependency in kinterbasdb. I always seem to have such a struggle setting up Firebird and Kinterbasdb. I've tried to retrace my steps and look at how I solved the problem in case anyone else gets it. Hopefully hereunder will be a clue for you :) ### Ubuntu 10.04 LTS Lucid Lyn

[web2py] SOLVED

2011-02-23 Thread Joseph.Piron
Indeed, it's really.. something. Let's explain with an example: If I have an application called Alfred (mind the 'A'), and I put 'alfred' or 'aLfred' or else in the browser, the breakpoints are omitted, but if I use the right casing 'Alfred', breakpoints work! Good to know! But I wonder why :)

[web2py] [SOLVED] Re: Default Web2Py Application on GAE

2011-02-01 Thread Gary Bee
I do apologize. I have found init.py and have edited it to my satisfaction On Feb 1, 9:08 pm, Gary Bee wrote: > I have created an application for my business homepage. > When I run web2py locally by default it opens a link to the welcome > application. I have to edit the url to the applicatio

[web2py] Solved -- Problems with special characters and pyfpdf

2010-09-25 Thread Bernardo
Hi all, When using pyfpdf which comes with web2py framework, there are some issues with special characters such as accented characters (á, é, í, ...). After some research, I found out that pyfpdf just understands 'iso-8859-1', and web2py gives him the strings in 'utf-8' format. So, as a solution,

[web2py] [SOLVED] jqgrid onSelectRow trigger web2py_component

2010-05-16 Thread Jason Lotz
Thanks mdipierro!! I actually saw that in the header of the generated page but didn't put it together. For what ever reason, trying to call web2py_component from another function wouldn't work, but calling web2py_ajax_page directly worked! Working code: jQuery("#grid_id").jqGrid({ onSelectRo

[web2py] [SOLVED] Re: jqgrid onSelectRow refresh iframe

2010-05-15 Thread Jason Lotz
On May 15, 6:42 pm, Jason Lotz wrote: > Yes I got it working. Using the jqgrid_plugin, very nicely prepared by > parroit, I added an onSelectRow event to trigger the reload of an > iframe on the same page. The id of the selected row is posted as args > to the url. The controller function then us

[web2py] Solved: Auto Creating Users/Groups/Roles

2010-04-22 Thread Patrick
On Apr 21, 4:32 pm, Patrick wrote: > I have been learning web2py and decided to create a simple ticket > system. Thus far I've been able to read the book/documentation or look > at others code and been able to hack my way through most issues. > However in my situation I need to have a default us

[web2py] SOLVED: validation from the shell or db.py or any Model after db.py

2010-02-12 Thread Christopher Steel
Gee, getting a little sleepy! This has the desired effect: test_for = 'test' dbvalue='None' rows=db(db.application.name==test_for).select(db.application.ALL) for row in rows: dbvalue = row.name if dbvalue == 'None': db.application.insert(name=test_for) On Feb 12, 6:36 am, Christopher