Re: [web2py] Re: Change default form error message

2013-07-07 Thread Jim Steil
The language file worked fine for me. Is that not a good way to solve the problem? -Jim On Sun, Jul 7, 2013 at 7:50 PM, Anthony wrote: > > BTW. I think this is an example of why CRUD should not be deprecated. It >> could be easily modified to support something like >> >> crud = CRUD(db) >> cr

Re: [web2py] Re: New to auth.wiki - format text as address block with markmin

2013-07-07 Thread Jim Steil
My web2py is Version 2.5.1-stable+timestamp.2013.06.17.10.41.11. I tried adding a and didn't see any changes. On Sun, Jul 7, 2013 at 7:59 PM, Alan Etkin wrote: > Same result, no newlines were inserted. It all appears as one long line. >> > > Odd, It works fine with the mercurial trunk code.

[web2py] Re: Back link contains unexpected value

2013-07-07 Thread Anthony
The grid creates the back button links based on the URL of the grid action itself, but it stores the referrer URL in session._web2py_grid_referrer_web2py_grid (if you use a custom formname for the grid, that last "web2py_grid" is replaced with the formname). So, in your grid action, before crea

Re: [web2py] Re: New to auth.wiki - format text as address block with markmin

2013-07-07 Thread Alan Etkin
> > Same result, no newlines were inserted. It all appears as one long line. > Odd, It works fine with the mercurial trunk code. what is your version of web2py? Do you want to force line breaks (separating the html output with ) or just add newline characters to the html. For this last option

Re: [web2py] Re: Change default form error message

2013-07-07 Thread Anthony
> BTW. I think this is an example of why CRUD should not be deprecated. It > could be easily modified to support something like > > crud = CRUD(db) > crud.messages.on_failure = ... > I don't think we need CRUD just for that. We should allow something like that for regular forms and the grid a

[web2py] Re: Clarification on variables in views

2013-07-07 Thread Anthony
> > Still, what approach do you think of, when some parts (vars) returned from > controller (and db) have empty values and then we need to keep extended's > layout values in that places (i.e. {{super}})? The other approach would be to return a value of None (or other "falsey" value) for the v

[web2py] Re: Use Custom Fonts

2013-07-07 Thread Hugo Costa
Thanks! Hugo Domingo, 7 de Julho de 2013 23:33:59 UTC+1, lesssugar escreveu: > > Not really a web2py thing. Check the liks below. > > CSS3 font-face (general usage): > http://www.css3.info/preview/web-fonts-with-font-face/ > > Webfont generator (for the font you downloaded): > http://www.fontsq

[web2py] Re: FPDF add font not working

2013-07-07 Thread Alan Etkin
> > I'ts supposed we can add fonts from whatever the folder we want to FPDF. > For example, in the static/fonts folder that I've created for this purpose: > It seems that .add_font takes an o.s. path as argument. See http://code.google.com/p/pyfpdf/wiki/AddFont -- --- You received this mess

Re: [web2py] Re: New to auth.wiki - format text as address block with markmin

2013-07-07 Thread Jim Steil
Same result, no newlines were inserted. It all appears as one long line. On Sun, Jul 7, 2013 at 5:48 PM, Alan Etkin wrote: > > Then, in one of the pages I created using the wiki 'create page' I'm >> trying to get a carriage return displayed. I've tried all the think listed >> above, but can't

[web2py] Re: New to auth.wiki - format text as address block with markmin

2013-07-07 Thread Alan Etkin
> Then, in one of the pages I created using the wiki 'create page' I'm > trying to get a carriage return displayed. I've tried all the think listed > above, but can't get my address to format correctly. > Try adding this to a wiki document. I tested this with trunk but should work in any tow

[web2py] FPDF add font not working

2013-07-07 Thread peibol
Hi there: I'ts supposed we can add fonts from whatever the folder we want to FPDF. For example, in the static/fonts folder that I've created for this purpose: def numbers(): class MyFPDF(FPDF, HTMLMixin): pass pdf=MyFPDF() pdf.add_page() pdf.add_font('DejaVu', '', URL('static','fonts/DejaVuSans.

[web2py] Re: Use Custom Fonts

2013-07-07 Thread lesssugar
Not really a web2py thing. Check the liks below. CSS3 font-face (general usage): http://www.css3.info/preview/web-fonts-with-font-face/ Webfont generator (for the font you downloaded): http://www.fontsquirrel.com/tools/webfont-generator On Sunday, July 7, 2013 9:56:15 PM UTC+2, Hugo Costa wrot

[web2py] Re: New to auth.wiki - format text as address block with markmin

2013-07-07 Thread Jim S
I don't think I was clear enough with my description. I'm using the default auth.wiki as follows in the default controller: def index(): return auth.wiki() Then, in one of the pages I created using the wiki 'create page' I'm trying to get a carriage return displayed. I've tried all the thi

[web2py] Re: Clarification on variables in views

2013-07-07 Thread shapovalovdenis
villas, I agree with you on 1-3. Probably I over-complicated the workflow at some point. Still, what approach do you think of, when some parts (vars) returned from controller (and db) have empty values and then we need to keep extended's layout values in that places (i.e. {{super}})? Processin

[web2py] Re: Clarification on variables in views

2013-07-07 Thread villas
It seems like you are doing some complex things with the views. That is fine, but personally I find this: 1. In MVC it is more recommended to collect and prepare all your data in the controller and then pass all that to the view when it is ready. 2. In that way you can make sure that all the v

[web2py] Re: New to auth.wiki - format text as address block with markmin

2013-07-07 Thread Alan Etkin
> > Just started playing with auth.wiki today and am creating some pages. I > want to force line breaks (new line) in some of my text but can't seem to > find the way to make it work. > You mean you want markmin to add tags to the output? Then you'll have to pump those lower case letters >>

[web2py] Re: Clarification on variables in views

2013-07-07 Thread shapovalovdenis
> There is no harm in passing all the variables to your view, as long as you are only exposing the ones that you wish to expose. and by exposing vars you mean using them like {{=message}}, or? -- --- You received this message because you are subscribed to the Google Groups "web2py-users"

[web2py] Re: Clarification on variables in views

2013-07-07 Thread shapovalovdenis
thanks for reply. Yes, I've showed 3 ways of checking if var was previously defined, but the question was about preferred way of doing that in Web2Py, also I want to add 'not empty' to this check. > If you are the developer you should know what variables you are going to be using in the view?

[web2py] Re: Clarification on variables in views

2013-07-07 Thread villas
It seems that you already know how to check whether variables exist, so you have already answered the question. However, I think the entire premise of the question seems strange. If you are the developer you should know what variables you are going to be using in the view? So, just make sur

Re: [web2py] Re: Change default form error message

2013-07-07 Thread Alan Etkin
> But then wouldn't I have to alter ALL of my grids/forms to override the >> message? >> > > Oops, yes. For many forms, looks like the language file approach is better. > BTW. I think this is an example of why CRUD should not be deprecated. It could be easily modified to support something li

Re: [web2py] Re: Change default form error message

2013-07-07 Thread Alan Etkin
> > But then wouldn't I have to alter ALL of my grids/forms to override the > message? > Oops, yes. For many forms, looks like the language file approach is better. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from th

[web2py] New to auth.wiki - format text as address block with markmin

2013-07-07 Thread Jim S
Just started playing with auth.wiki today and am creating some pages. I want to force line breaks (new line) in some of my text but can't seem to find the way to make it work. to force a new line I've tried: \n\n [[newline]] and non of these work, they just display on the page along with the

Re: [web2py] Re: Change default form error message

2013-07-07 Thread Jim Steil
But then wouldn't I have to alter ALL of my grids/forms to override the message? -Jim On Sun, Jul 7, 2013 at 3:19 PM, Alan Etkin wrote: > Dang, why didn't I think of that. Thanks, that is exactly what I needed. >> > > This is better because you don't have to deal with the language files: > >

[web2py] Re: Change default form error message

2013-07-07 Thread Alan Etkin
> > Dang, why didn't I think of that. Thanks, that is exactly what I needed. > This is better because you don't have to deal with the language files: # process passes the kwarg to form.validate, so form.validate(message_...) is also valid. form.process(message_onfailure = T("Wait a minute! Thi

[web2py] Use Custom Fonts

2013-07-07 Thread Hugo Costa
Hello! I want to use a custom type of font (downloaded from dafont) in my navbar. How can I do that? I have the .tff file. Thanks, Hugo -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving e

[web2py] Re: Change default form error message

2013-07-07 Thread Jim S
Dang, why didn't I think of that. Thanks, that is exactly what I needed. -Jim On Sunday, July 7, 2013 12:30:14 PM UTC-5, shapova...@gmail.com wrote: > > Hi! > > Try looking in languages/default.py or .py. > > On Sunday, July 7, 2013 8:09:35 PM UTC+3, Jim S wrote: >> >> If I have an error in my f

[web2py] Re: Change default form error message

2013-07-07 Thread shapovalovdenis
Hi! Try looking in languages/default.py or .py. On Sunday, July 7, 2013 8:09:35 PM UTC+3, Jim S wrote: > > If I have an error in my form the default error message is displayed. It > reads: > > Errors in form, please check it out. > > I want to change this globally to 'Submission failed! Please

Re: [web2py] web2py EuroPython 2013 Talk

2013-07-07 Thread Massimo Di Pierro
The interactive shell is this one: https://github.com/mdipierro/kryten I posted it after PyCon Argentina. Massimo On Sunday, 7 July 2013 07:30:20 UTC-5, Alan Etkin wrote: > > At EuroPycon I only used a few slides which are a subset of that talk. The >> rest was an interactive demo. >> > > Thanks

[web2py] Change default form error message

2013-07-07 Thread Jim S
If I have an error in my form the default error message is displayed. It reads: Errors in form, please check it out. I want to change this globally to 'Submission failed! Please review highlighted fields'. Is there a way I can do this globally? -Jim -- --- You received this message beca

[web2py] Re: windows8 installation

2013-07-07 Thread Alex Glaros
Here is how problem was solved: Don't click on web2py.exe from user desktop hit windows-logo/X keys choose "Run" from menu option choose "Run as admistrator" Firewall asks: "do you want to let web2py past firewall?" select, "yes" thanks for looking at this issue. Alex On Sunday, July 7, 2013

[web2py] Clarification on variables in views

2013-07-07 Thread shapovalovdenis
Hi! This is somewhat a continuation of Conditional presence of a variable in view and How do Global Variables Work? So, what is recommended way of checking if var

[web2py] Re: web2py EuroPython 2013 Talk

2013-07-07 Thread shapovalovdenis
Nice talk! Worth watching even for those who are already familiar with Web2Py. It was interesting to hear your opinion about not so big developers community as a major problem. But we are here to solve it, after all :) Thanks and regards from Moldova (which is in Europe, btw :) On Sunday, July

[web2py] Re: LOAD gives duplicate navbar

2013-07-07 Thread Woody
That's just what I needed. Thanks much for the help. Web2Py is a great development platform, and I really appreciate all of the generous help provided by people on this list! On Saturday, July 6, 2013 9:36:28 PM UTC-4, Anthony wrote: > > {{=LOAD('default','select_table',args=("x10_state_view",

Re: [web2py] web2py EuroPython 2013 Talk

2013-07-07 Thread Alan Etkin
> > At EuroPycon I only used a few slides which are a subset of that talk. The > rest was an interactive demo. > Thanks. Much shorter than PyConUS or PyConAr talks, but still worth seeing. I liked the interactive shell script (or wathever you've used to create the app). -- --- You received

[web2py] Re: windows8 installation

2013-07-07 Thread Alan Etkin
> > have tried to install web2py on a windows8 machine, and when I click on > web2py.exe, the black dos-command screen flickers on for a second, then > closes. I guess you could at least see the error output if you opened a cmd (start and type cmd in the command text field) and run the execu

[web2py] Re: Back link contains unexpected value

2013-07-07 Thread Niphlod
Don't know if its related, but NEVER use fixed strings as href urls your '../whatever/whatever' can get really messy soon (probably it just has ^_^) real quick. Use always URL() to generate urls. If this doesn't fix it, please pack a minimal app to reproduce the error... On Saturday, July