I'm sure this is going to be trivial but I can't seem to find an example...
I want to add some styles into the header of just the specific page I'm
working on, so not generally wanting to edit layout.htm?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://githu
you can do one of these:
1. clone layout.html as layout1.html and edit for the page. use
layout1.html in the page.
2. in layout.html, give id to elements. in the page, change styles using
css.
3. don't use layout.html, create all page from scratch. (not recommended )
2015-09-21 12:44 GMT+03:00 Ed
The default layout.html has a {{block head}} you can put them there.
Another alternative is to append them to response.files in the controller
response.files.append(URL('static','css/mystyles.css')).
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/
appadmin work slowly!!!
please limit rows in list to 10
or make input for set LIMIT rows in DB view in appadmin controller
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Re
On Monday, September 21, 2015 at 6:56:45 AM UTC-4, Leonel Câmara wrote:
>
> The default layout.html has a {{block head}} you can put them there.
>
Specifically, in the view of the specific page (e.g., mypage.html), you
would have:
{{block head}}
[your styles]
{{end}}
Anthony
--
Resources:
-
if it's slow it's for YOUR application, not the largest majority out there.
Edit
https://github.com/web2py/web2py/blob/master/applications/welcome/controllers/appadmin.py#L210
to "10" in your own if you feel comfortable with 10 lines per page.
On Monday, September 21, 2015 at 1:36:41 PM UTC+2,
web2py can't be blamed if your reverse proxy is not acting as a passthrough
On Monday, September 21, 2015 at 8:13:38 AM UTC+2, Daniel Vogel wrote:
>
> Hi,
>
> Some additional information. With older web2py versions (bootstrap 2.x) we
> have wrong sizing with the login behind reverse proxy (
Hi *,
I would like to realize a little one-text-field form and submit the
typed value each time the content of the field is changed and its
content is greater than 3 characters. The form is called inside a web2py
component so run something like this.form.submit() as onchange callback
is not the rig
you should simply override widget defaults (according to your own
formstyle.)
As for "HTML helpers" go for TAG, which can create whatever you may need
without littering the global environment.
On Monday, September 21, 2015 at 1:51:00 AM UTC+2, Luis Valladares wrote:
>
> Hello!
>
> I'm building a
uhm... if the component has been loaded with web2py's facilities, then a
form.submit should be "intercepted"/"handled" by
https://github.com/web2py/web2py/blob/master/applications/welcome/static/js/web2py.js#L266
On Monday, September 21, 2015 at 2:31:20 PM UTC+2, Manuele wrote:
>
> Hi *,
> I
Il 21/09/15 14:36, Niphlod ha scritto:
> uhm... if the component has been loaded with web2py's facilities, then
> a form.submit should be "intercepted"/"handled" by
>
> https://github.com/web2py/web2py/blob/master/applications/welcome/static/js/web2py.js#L266
You can try inserting this little code
https://www.youtube.com/watch?v=__dDAD0Y_WU
some good messages under the hood
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this messa
Hi,
This issue is new, I used the auth.wiki with older web2py versions, no
problems. I updated my auth.wiki to web2py 2.12.3. Now the same problem
(xceptions.AttributeError) with search. I think it's a bug.
I run web2py locally.
Am Montag, 14. September 2015 12:16:47 UTC+2 schrieb A3:
>
> Hi,
Il 21/09/15 15:03, Manuele Pesenti ha scritto:
> def _index():
> form = FORM(
> DIV(
> INPUT(_type="text", _class="form-control", _name="tip",
> _onchange="this.form.submit();",
> _oninput="this.onchange();" # COMMENT OUT THIS LINE
> ),
>
Have your put that inside a web2py Ajax component? Can you show the full
code of the parent controller and view?
Anyway, as an alternative, you might want to take the approach shown here:
http://web2py.com/books/default/chapter/29/11/jquery-and-ajax#Auto-completion
Anthony
On Monday, September
I use auth.wiki. If reverse proxy is acting as path through, wrong links in
the HTML stream. A solution, using ProxyHTMLURLMap to fix the links.
If I don't use auth.wik, reverse proxy is set as path through, every thing
works fine. Where could be the solution for this issue?
Am Montag, 21. Sept
Hi Kiran,
Just about having web2py app outside of web2py folder and docker... I think
what you want to achieve goes against the idea of containerization... Why
not deploy you app inside your container (as you will do if you host your
app somewhere for instance, in this case your host is your conta
Richard,
Good point, but then I want to capture the state of my application
outside of the infrastructure I need to run it in.
This will mean that if the web2py server container goes down, for
whatever reason, I can spin up another container, and it will continue
from where the previous one lef
btw: inline javascript trumps any event attached NEVER inline
javascript snippets!
On Monday, September 21, 2015 at 4:15:48 PM UTC+2, Anthony wrote:
>
> Have your put that inside a web2py Ajax component? Can you show the full
> code of the parent controller and view?
>
> Anyway, as an altern
>
> INPUT(_type="text", _class="form-control", _name="tip",
> _onchange="this.form.submit();",
> _oninput="this.onchange();"),
>
The problem is that above, this.form is the native DOM form element (not a
jQuery object), so the this.form.submit() is calling the form
It's quite an interesting talk although I think that if you write idiomatic
python you don't bump into most of these problems as most these things were
solved with generators and comprehensions quite beautifully years ago.
Maria was also either very nervous to be in public or needs to go study
Il 21/09/15 17:16, Anthony ha scritto:
> Instead, try changing this.form.submit() to
> jQuery(this.form).submit(). That will wrap the form in a jQuery object
> and call the jQuery "submit" method, which will trigger the trap_form
> handler, which will submit the form via Ajax.
Great!! It's works as
Hi,
Le 20/09/2015 17:30, Massimo Di Pierro a écrit :
> I am not sure I filly understand. There is not mail.settings.to. "to"
> is a mandatory argument of mail.send().
Thanks for stopping by.
Actually it was more rhetorical than a question : I first did try to
use this, and the application
About this
IS_IN_DB(db(db.Organization.organizationPrimaryTypeID == 1),
'Organization.id'), '%(represent_field_name)s')
I avoid using ID generally even if it does one more query I think code get
more readable in the future if you nest another query (2 ways of doing it) :
organization_id = db(db
thanks Richard,
is one of the reasons to retain referential integrity in case app is ported
to another database? (pointed-to primary ID numbers will change)
thanks,
Alex
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
I don't know whether any of you are familiar with Grails (www.grails.org);
I was using it for a few years but for a variety of reasons have moved to
Python. However there are features of Grails that I did find particular
useful and I felt that there may be some benefit, to me at least, in
repr
Or just no out-of-the-box what the ID represent when you read your code...
Richard
On Mon, Sep 21, 2015 at 3:17 PM, Alex Glaros wrote:
> thanks Richard,
>
> is one of the reasons to retain referential integrity in case app is
> ported to another database? (pointed-to primary ID numbers will c
Hi All,
I was customizing a SQLFORM.grid startig from the code:
model:
db.define_table('aziende',
Field('ragione_sociale', requires=[IS_NOT_EMPTY(
error_message=err_mess),
IS_
IMHO you copy/pasted one time too much.
when you feel there's a bug, start with a smaller example and reiterate...
the links argument accepts
"""
a list of dict(header='name',body=lambda row: A(...))
"""
Your code holds a couple of parenthesis more than needed, so the argument
to the lambda
> To summarise: I've written a little Python script that you can use to
> create a skeleton model file with the model as a class in its own file;
> you
> then complete the model by adding Field(...) definitions to the
> define_table
> () entry and optionally add a few other attributes etc. T
Many thanks for answers.
I ended up inserting styles into the block header but in the long run I
think appending response.files may be the way to go.
I note in retrospect all this stuff is in the book but it took this thread
to help me make use of it.
one explicit example is worth a thousand
> I think it's a bug.
It is. There's a typo in tools.py in line 6935 where you have this:
db.wiki_page.can_read, db.wiki+page.can_edit]
When you should have
db.wiki_page.can_read, db.wiki_page.can_edit]
I will submit a pull request to fix it but in the
It was already fixed in trunk by Niphlod! In the next release it should be
fixed. In the meantime you can fix it yourself like I described.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2p
Ok thanx. This worked.
One more question. My SQLFORM.grid is not refreshed after callback. So
record stays there. HOw to do a grid refresh?
2015-09-19 20:32 GMT+08:00 Anthony :
> On Saturday, September 19, 2015 at 4:18:49 AM UTC-4, Yebach wrote:
>>
>> Hello
>>
>> So I managed to put link and cre
Bumping. Can't believe there's only one other web2py-er in Boulder. How can
that be? C'mon all you Boulderites, stand up and be counted. Not looking
for a commitment to attend the meetup. Just a Boulder headcount. Thanks.
p.s.
Anyway, as you can see, Massimo is in.
--
Resources:
- http://web
+1
Niphlod is top contributor. Never sarcastic. Always helpful. Insights are
deep. Good guy to listen to. 'Nuf said.
On Thursday, April 18, 2013 at 5:30:27 PM UTC-6, Massimo Di Pierro wrote:
>
> I am pretty sure Niphlod did not mean it in a sarcastic sense. We are from
> the same country and I d
Hi,
I'am trying to generate a slug url from a computed field:
Field('url_name', compute=lambda r: r['first_name']+'-'+r['last_name']),
Something like:
Field('url_name', compute=lambda r: r['first_name']+'-'+r['last_name'],
requires=IS_SLUG()),
doesn't seem to work, nor I get to treat the r-Object
37 matches
Mail list logo