[web2py] Re: Newby - what is "(**dict(form.vars))"

2014-03-18 Thread shapovalovdenis
hi! Don't worry it's pretty common question for newcomers :) This is called Function Argument Packaging and Function Argument Unpackaging. arguments could be packaged into list or dictionary: * - position based arguments ** - name based arguments >>> def f(*a, **b): return a, b >>> x, y = f(3,

[web2py] web2py wikipedia article update & translation

2014-03-18 Thread shapovalovdenis
Hi! just stumbled across wikipedia article about web2py https://en.wikipedia.org/wiki/Web2py and besides it's a bit outdated, I've found that there is no russian version of web2py on wikipedia, so I've created new article and already translated about 70% of original english article. If there

[web2py] Re: Appadmin on 2.9.4

2014-03-14 Thread shapovalovdenis
I remember see something on previous version, IIRC the thing was in apache's vhost config. On Friday, March 14, 2014 4:27:04 PM UTC+2, Massimo Di Pierro wrote: > > Anybody else experiencing this? > > On Friday, 14 March 2014 06:39:08 UTC-5, SimonD wrote: >> >> Hello, I have seen a previous post o

[web2py] Re: Admin and tickets broken after upgrade to 2.9.4

2014-03-13 Thread shapovalovdenis
Your suggestion just did the trick. But now I'm curious - what was the problem then?? On Friday, March 14, 2014 12:14:11 AM UTC+2, Massimo Di Pierro wrote: > > Another user has reported a similar problem on google app engine and it > was due to a circular reference. Strangely I could not reprodu

[web2py] Re: Admin and tickets broken after upgrade to 2.9.4

2014-03-13 Thread shapovalovdenis
Thanks, just did it, unzipped http://www.web2py.com/examples/static/web2py_src.zip on top of web2py old install, now it says: [Thu Mar 13 23:49:54 2014] [error] [client ] from sqlhtml import SQLFORM, SQLTABLE [Thu Mar 13 23:49:54 2014] [error] [client ] File "/home/www-data/web2py/gluon/

[web2py] Re: Admin and tickets broken after upgrade to 2.9.4

2014-03-10 Thread shapovalovdenis
Next, I've looked and found no regex_longcomments defined in myregex.py so I comment it's import out. Got rid of wsgi load error but obviously still get S'Traceback (most recent call last):\n File "/home/www-data/web2py/gluon/main.py", line 446, in wsgibase\n serve_controller(request, resp

[web2py] Re: Admin and tickets broken after upgrade to 2.9.4

2014-03-10 Thread shapovalovdenis
Thanks form prompt reply! Upgrade from previous 2.9.3, Just did #apachectl restart and now it complains on wsgihandler.py [Tue Mar 11 02:07:03 2014] [notice] Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze18 with Suhosin-Patch mod_ssl/2.2.16 OpenSSL/0.9.8o mod_wsgi/3.3 Python/2.6.6 configured

[web2py] Admin and tickets broken after upgrade to 2.9.4

2014-03-10 Thread shapovalovdenis
Just hit upgrade now to Version 2.9.4 button and in web2py/applications/admin/errors: sssg317 S'Traceback (most recent call last):\n File "/home/www-data/web2py/gluon/restricted.py", line 217, in restricted\n exec ccode in environment\n File "/home/www-data/web2py/applications/adm

[web2py] Re: admin interface wrong on 2.8.2

2013-12-03 Thread shapovalovdenis
the thing is that tickets are generated only in google chrome, in FF admin iface works just fine. 'dict' object has no attribute 'is_mobile' On Tuesday, December 3, 2013 10:05:36 PM UTC+2, shapova...@gmail.com wrote: > > hmmm, > > Had the same problem with admin (looked like no js and css),

[web2py] Re: admin interface wrong on 2.8.2

2013-12-03 Thread shapovalovdenis
hmmm, Had the same problem with admin (looked like no js and css), I've replaced ^/([^/]+)/static/?(.*) with AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) \ in two places in my vhosts configuration section, now all I get is tickets, that I cannot see. Any ideas? On Tuesday, De

[web2py] Cookie-based i18n and search engines (SEO)

2013-10-18 Thread shapovalovdenis
Hi! I'm using multi-language method described in web2py Application Development Cookbook i.e. cookie-based. (controller retrieves saved lang preference from user's cookies and the fetches him a page from db in appropriate language). I'm worried about search engines discovering only one langua

Re: [web2py] Several controllers inserting and updating one row via forms

2013-08-30 Thread shapovalovdenis
Thanks, I indeed missed that hidden field with record id. From the book: "Edit forms also contain a hidden INPUT field with name="id" which is used to identify the record. " Though I don't really understand why we need that field as record id is kept server-side anyway. On Thursday, August 29,

[web2py] Several controllers inserting and updating one row via forms

2013-08-29 Thread shapovalovdenis
Hi! I have an issue with UPDATE form. I'm trying to implement something like enrollment form that has man field beyond standard name, email, etc. For the sake of usability I've decided to split it to two steps (i.e. controllers - pages): first asks user for name and email, and after user submi

[web2py] Re: exercise: automatic conversion of a static site into a web2py site

2013-08-07 Thread shapovalovdenis
Cool, actually I was going to write something like this just the other day. Btw, I think directory 'controllers' should be created before: controller_filename = os.path.join(destination,'controllers',prefix+'.py') open(controller_filename,'w').write(controller) so, it will not complain on 'No

[web2py] Re: Link to default value for db table field

2013-07-25 Thread shapovalovdenis
Thanks Massimo, Your guess is right, only all pages have footer, but let's say 90% of them have the same block_footer, and other 10% have original, unique block_footer, so I don't want to copy-paste content of first page with is_index == True, but at the same time leave a possibility to define

[web2py] Re: Link to default value for db table field

2013-07-24 Thread shapovalovdenis
sorry to bump it up. But still looking for a simple way to avoid keeping the same values in fields, there should be some way similar to symlinks, no? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop

[web2py] Link to default value for db table field

2013-07-24 Thread shapovalovdenis
Hi! Let's say I've following table defined: db.define_table('page', Field('is_index', 'boolean'), Field('title', 'text', default=''), Field('block_content', 'text', default=''), Field('block_ad', 'text', default=''), Field('block_footer', 'text', default=''), format='%(title)

[web2py] Re: Pass helpers in variable to views

2013-07-22 Thread shapovalovdenis
Thanks Massimo, I've completely missed that. But in my case, I'm reading this html from db. So it is: headerad_block = XML(pageElementsTable.content_block, sanitize=False) actually. So, if I keep html content of a page with IMG, A, SRCs, HREFs, etc in db, how to pass it to the view to proper

[web2py] Re: Pass helpers in variable to views

2013-07-22 Thread shapovalovdenis
Massimo, thanks again. I'm aware of security risks, the html in db is just legacy static pages, no user input there, ever. I'm just converting static pages to dynamic website with apps. But your suggestion to use replace looks even better! On Monday, July 22, 2013 1:57:20 PM UTC+3, Massimo Di

[web2py] Pass helpers in variable to views

2013-07-21 Thread shapovalovdenis
Hi! Know that I missing something obvious here, but still: I store parts of page to be displayed in db, in html code, and return it to view, so content from db is in content_block var: def get_block(): [some other code] content_block = XML("h1> Some Title ", sanitize=False

[web2py] Why not create Web2Py Forum?

2013-07-13 Thread shapovalovdenis
Hi! Searching this group and google showed that currently there is likely to be no forum for asking user question on Web2Py. Is there any reason? Or just no demand? I think that idea with forum is nice, because there can be categories for questions, i.e. DAL, Views, etc and some FAQs (i.e. on

[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 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: 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

[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