I've been trying to do this for so long, but with *pythonanywhere* hosting,
it doesn't seem to be possible to get rid of the *init/default/* part of
the URL.
I think, this nested sub-directories structure is not optimal for SEO and
also makes it difficult to place the *robot,txt* and *sitmap.xm
Hi,
As suggested in previous posts, I deploy my web2py application on apache
sever. I use scripts/setup-web2py-debian-sid.sh file to make setup on local
server, which exists in web2py folder and follow steps defined on URL
http://web2py.com/books/default/chapter/29/13/deployment-recipes#One-ste
Is it considered kosher for controller functions to add their own custom
data to the request object? I didn't see anything in the docs about this.
For instance if a controller wants to do request.some_stuff = 123, is that
"allowed"?
The reason for this is that I have some library functions ca
*e.g.*
*models/db.py*
def __before_insert_cash_in(f):
chart_of_account = int(f['chart_of_account'] )
# get default value for branch field from coa table field branch
query_coa = (db.chart_of_account.id == chart_of_account)
row_coa = db(query_coa).select().first()
#f['branch'] = '%s' % (row_coa.br
Hi all,
I have a monitoring component in which my app continuously grabs data from
the database through a controller which is triggered by a javascript call
as follows:
$.web2py.component("{{=URL('controller', 'my_function.load')}}", "my_target"
, timeout=2000, times='Infinity');
As you can se
On Thursday, September 14, 2017 at 9:20:55 PM UTC-4, 黄祥 wrote:
>
> before_insert callback that insert value to table with required = True is
> still error (temporary solution is set required = False, while in 2.14.6 it
> works with required = True).
>
Can you show an example?
--
Resources:
- h
before_insert callback that insert value to table with required = True is
still error (temporary solution is set required = False, while in 2.14.6 it
works with required = True).
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com
On Monday, 11 September 2017 00:08:00 UTC+1, Massimo Di Pierro wrote:
>
> what adapter are you using. What is your URI string (without passwords
> please)?
>
Apologies for the slow reply. Annoyingly, I've found that the solution
(without copy) doesn't work at the moment. I'm using the standard
This is a bug. I just submitted a pull request:
https://github.com/web2py/web2py/pull/1766
Anthony
On Thursday, September 14, 2017 at 4:43:24 AM UTC-4, 黄祥 wrote:
>
> test SQLFORM.grid() export TSV, return error:
> Traceback (most recent call last):
> File "/Users/MacBookPro/site/web2py/gluon/r
for step by step example in terminal (after you fork web2py on github) :
Change :
- path with your own path
- githubuser with your github username
- fix_memcache_appadmin with your new branch name
- the code with your modified one
- comment with your title comment
1.
Fork repository
had you tried to use *.html file?
e.g.
*controllers/default.py*
def mail():
table_id = request.args(0)
message = response.render('templates/mail/test.html', dict(table_id =
table_id) )
*views/templates/mail/test.html*
test {{=table_id}}
best regards,
stifan
--
Resources:
- http:/
Hello,
What is a difference in sending a html body from string and from template?
1. When i try to send email with body from string (e.g. 'html
body' ) - it is send as expected: *html body*
2. But when I put this string into template and create body with , for
example, *response.render(body.html
I cannot reproduce the problem.
In general, though, code from newer apps should not necessarily be expected
to work on older versions of web2py (that is referred to as "forward
compatibility", and web2py only promises "backward compatibility").
Anthony
On Thursday, September 14, 2017 at 1:04:4
On Thursday, September 14, 2017 at 8:02:00 AM UTC-7, Muhammad Hashim Malik
wrote:
>
> Hello folks
>
> Is there any update regarding web3py?
>
> Truly,
> Malik Muhammad Hashim
>
>
The emphasis the last 2 months has been in getting a good 2.16.x done.
Much of the work on 2.16.x is also applicab
I have embedded a form inside of a bootstrap modal. If the form is filled
in correctly it redirects. If there are errors the modal closes and the
main page goes back to how it first looked. Only when I click on the "Sign
up Here" button does it reveal that there were errors and what the errors
a
Please review
http://web2py.com/books/default/chapter/29/15/helping-web2py#Preparation--using-GitHub.
It looks like you are attempting to push commits directly to the web2py
book repo. Instead, you should create your own fork of the repo, create a
new branch within your fork, push the changes
.parse_as_rest() returns a Row object with one of the attributes being
"count" (if you submit a query for multiple records and it is successful):
@request.restful()
def api():
response.view = 'generic.' + request.extension
def GET(*args, **vars):
patterns = 'auto'
parser
Hello folks
Is there any update regarding web3py?
Truly,
Malik Muhammad Hashim
On 4 Jun 2017 1:46 pm, "Muhammad Hashim Malik"
wrote:
> Respected Massimo
>
>
> You base idea of web3py is fantastic. Please share your web3py work. At
> least release its beta version, so that people play with it
I tried to upload a small correction to the book as described in chapter 15
but got the following error:
$ git push origin [...]
ERROR: Permission to web2py/web2py-book.git denied to [...].
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the
On Thursday, September 14, 2017 at 9:33:42 AM UTC-4, Pierre wrote:
>
> the cache select mechanism is full of mystery:
>
> given book example code:
>
> def cache_db_select():
> logs = db().select(db.log.ALL, cache=(cache.ram, 60))
> return dict(logs=logs)
>
>
> what happens to next cache_d
Looks like you want to cache the results of the entire function -- so why
not do that:
@cache(some_key, time_expire=60, cache_model=cache.ram)
def cache_this():
...
rows = db(db.atable.id > 0).select(..., cacheable=True)
return dict(rows=rows)
Just be sure to set cacheable=True, whic
the cache select mechanism is full of mystery:
given book example code:
def cache_db_select():
logs = db().select(db.log.ALL, cache=(cache.ram, 60))
return dict(logs=logs)
what happens to next cache_db_select call after the 60 seconds has elapsed ?
Does it overwrite the previously cac
test SQLFORM.grid() export TSV, return error:
Traceback (most recent call last):
File "/Users/MacBookPro/site/web2py/gluon/restricted.py", line 219, in
restricted
exec(ccode, environment)
File "/home/test/web2py/applications/test/controllers/system.py", line
240, in
File "/Users/MacBoo
23 matches
Mail list logo