On Monday, July 31, 2017 at 1:25:31 PM UTC-7, Paolo Caruccio wrote:
>
> Maybe the web2py book could help you:
>
>
> http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=with_alias#Self-Reference-and-aliases
>
>
That appears to only be talking about using aliases f
I chose pattern-based rewrite because I don't know better. I am temporary
part time web coder relying on web2py book 100% with understanding at about
60%. Being a mature person I am fond of eloquence in life as well as in
URL's however complexity has its price. I sense from what you are saying
I chose pattern-based rewrite because I don't know better. Please know
that I am only temporary part time web coder relying on web2py book 100%
with understanding at about 60%. Being a mature person I am fond of
eloquence in life as well as in URL's however complexity has its price. I
sense fr
It's not clear how that would be related to response.js, as it appears the
code returned via response.js is in fact being executed in the browser.
It's hard to say what's going wrong in the browser without knowing more
about the JS and what the DOM looks like at that point.
Anthony
On Sunday,
it seems response.js have a different behaviour in new version
e.g. (the same code work well in 2.14.6)
...
if form.process().accepted:
...
target_response = "jQuery('#test .close').click();
jQuery('#test').get(0).reload()"
response.js = target_response
#redirect(request.env.http_web2
Got it. Next, provide more detail regarding your current code/setup. Is
there any particular reason you need to be using the pattern-based rewrite
system? If so, you'll just need to create a regex that matches the route in
question, or create a regex that matches all the other possible functions
Simpler and better approach:
routes_in = (
# do not reroute admin unless you want to disable it
(BASE + '/admin', '/admin/default/index')
, (BASE + '/admin/$anything', '/admin/$anything')
# do not reroute appadmin unless you want to disable it
, (BASE + '/$app/appadmin', '/$app
Think i got it:
routes.py:
routes_onerror = [
# (r'init/400', r'/init/default/login')
# ,(r'init/*', r'/init/static/fail.html')
# ,(r'*/404', r'/init/static/cantfind.html')
('*/*', '/myapp/default/handle_error')
]
In app/default.py
def handle_error():
code = request.vars.code
I could make "asset" function the default for the "showcase" controller
however I am not sure how as I am already using renamed
routes.patterns.example.py in the root of the website (multiple apps) to
rewrite one URL (works nicely):
routes_out = (
('/stock/default/index','/stock'),# <== my
On Saturday, August 26, 2017 at 4:05:59 PM UTC-4, 98uj...@gmail.com wrote:
>
> How can I rewrite the URL (to drop asset):
>
> https://192.168.1.25:8000/stock/showcase/asset/2017-Some-fridge?id=79&_signature=c2e7899530c858f1b478cb7ea5f03bb30d4f68e1
> to look like:
>
> https://192.168.1.25:8000/stock
First, the default validator is not IS_STRONG -- it is simply CRYPT with
min_length set to auth.settings.password_min_length (which defaults to 4).
Second, on the password change form, the validator is not ignored, but the
min_length of CRYPT is set to 1 for the "Old Password" field only (this i
I was able to setup IS_STRONG like this:
db.auth_user.password.requires.insert(0, IS_STRONG())
Be careful, after doing this users wont be able to log in if their password
is not strong, validated.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/we
im trying to fallback to the static folder when a controller is not found,
for example:
a route like:
img is not a defined controller so i would like to redirect this route to
"/static/img/mypicture.png", how do i do that?
I have tried:
BASE = '' # optonal prefix for incoming URLs
fixed_rout
A solution would be to use routes.py
in there you can place something like
routes_in = [
('/stock/showcase/$anything', '/stock/showcase/index/$anything')
]
and use the index function to do whatever you like with the view.
You redirect everything through the index function so you wont be able to
u
14 matches
Mail list logo