try LOAD component:
http://www.web2py.com/books/default/chapter/29/12/components-and-plugins#LOAD
2015-07-10 10:24 GMT+03:00 PRACHI VAKHARIA :
>
>
>
>
> *GOAL*
>
>
>- *AJAX — *controller/function is accessed via Ajax, update the div#ID
>content only. (When a user clicks a link, a URL is g
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
> diff --git a/applications/welcome/controllers/default.py
b/applications/welcome/controllers/default.py
> index c775603..e99ef0f 100644
> --- a/applications/welcome/controllers/default.py
> +++ b/applications/welcome/controllers/default.py
> @@ -57
you can write two view.
1. view.html - direct request, extends layout.html
2. view.load - load via ajax. only requested information, not extends
layout or footer etc.
for example:
view.load
{{for i in range(0,9):}}
{{=i}}
{{pass}}
view.html
{{extend 'Layout.html'}}
# other things
{{=LOAD(
Hello all !
I ran the scripts for installing apache + web2py + as specified in
the chapter 29, but a strange behaviour is shown. Suppose my server IP is
a.b.c.d.e , then I am able to access > a.b.c.d/examples, whereas when I try
to access > a.b.c.d/welcome or a.b.c.d/admin, it throws a ti
Dear SK,
That is a possible solution, but I feel that it is not *the most elegant
way* to do it, since it involves creating more files leading to redundancy
– and difficult to maintain as files number increases.
My intended approach overcomes that with half the number of View files
using
Sorry, I see signing the email scrambled the patch:
> diff --git a/applications/welcome/controllers/default.py
> b/applications/welcome/controllers/default.py
> index c775603..e99ef0f 100644
> --- a/applications/welcome/controllers/default.py
> +++ b/applications/welcome/controllers/default.py
> @
This piece of code throws me some unicode problems on "Março". I've
searched for a solution but didn't find one.
{{for m in [datetime.date(2000, m, 1).strftime('%B') for m in range(1, 13
)]:}}
{{=m}}
{{pass}}
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http:
new:
in /private new file
myconf = AppConfig(reload=True)
if not request.env.web2py_runtime_gae:
## if NOT running on Google App Engine use SQLite or other DB
db = DAL(myconf.take('db.uri'), pool_size=myconf.take('db.pool_size',
cast=int), check_reserved=['all'])
old:
in /model 0.
I checked out the web2py.js file and it looks like what i'm looking for is
right in there but i really do not know how to implement this. I realized I
can take advantage of the web2py_websocket function's onopen argument and
write a function to tell that that user is online, and when the browser
why
print myconfig['db']['uri']['any2']
why not use dots?
print myconfig.db..url.any2.
in Storage it work
--
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 Issue
{{extend}} and {{include}} are not Python code but are template language
directives, so they are executed before any Python code is run. As a
result, you cannot put an {{extend}} inside a Python "if" block. However,
you can do the following:
{{extend 'layout.html' if not request.ajax else None}
Are you saying in the case of the post, it inserts two records with the
value "test" as the tag name? Can you show the exact test code that works
as well as showing the full code for how you submit/post the data as well
as the exact value(s) you submit?
On Thursday, July 9, 2015 at 7:32:28 PM U
I am currently not using the newest version of web2py; I'll probably update
in the near future and add a reminder to look into this.
On Mon, Jul 6, 2015 at 10:23 AM, Krzysztof Socha wrote:
>
>
> On Wednesday, December 11, 2013 at 10:01:39 PM UTC+1, Mark Li wrote:
>>
>> I looked into the code and
Because ConfigParser doesn't work like that:
https://docs.python.org/2/library/configparser.html
--
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 recei
My bad I assumed an English locale and that later you would translate. This
is starting to look ugly, so it's questionable if it isn't better to just
hardcode the months in a list but it would work:
{{import datetime}}
{{import locale}}
{{for m in [datetime.date(2000, m,
1).strftime('%B').deco
Which script?
What OS?
Which web2py version?
If you want more help, you will need to answer at least these questions...
:)
Richard
On Fri, Jul 10, 2015 at 5:25 AM, Ramashish Gaurav
wrote:
> Hello all !
>
> I ran the scripts for installing apache + web2py + as specified in
> the chapter
On Friday, July 10, 2015 at 2:25:26 AM UTC-7, Ramashish Gaurav wrote:
>
> Hello all !
>
> I ran the scripts for installing apache + web2py + as specified in
> the chapter 29, but a strange behaviour is shown. Suppose my server IP is
> a.b.c.d , then I am able to access > a.b.c.d/examples,
On Friday, July 10, 2015 at 10:34:15 AM UTC-7, Dave S wrote:
>
>
>
> On Friday, July 10, 2015 at 2:25:26 AM UTC-7, Ramashish Gaurav wrote:
>>
>> Hello all !
>>
>> I ran the scripts for installing apache + web2py + as specified in
>> the chapter 29, but a strange behaviour is shown. Suppose
I need help please... anyone?
This thread keeps going down the list and I'm afraid it might get missing
and go unanswered :/
On Friday, July 10, 2015 at 12:20:39 PM UTC, Samuel Sowah wrote:
>
> I checked out the web2py.js file and it looks like what i'm looking for is
> right in there but i rea
Hah
Be patient.. Don't expect other people to answer right away. Rest assured
your question is being read. That doesn't mean that everyone have the
answer at hand.
I have never done what you need but I am guessing you have to define what
an 'online user is'
Does it mean users logged in? In t
By 'online user' i mean clients that have a websocket connection.
On Friday, July 10, 2015 at 7:12:50 PM UTC, JorgeH wrote:
>
> Hah
>
> Be patient.. Don't expect other people to answer right away. Rest assured
> your question is being read. That doesn't mean that everyone have the
> answer at ha
Oups above forget the name of Static/js file which is :
websocket_connected_user.js
and there is this file missing :
*# Static/js*
*# userConnection.js*
// NEED DESCRIPTION
function userCommunication() {
this.ipToranado = "";
this.userId = "";
this.adressServer = "";
this.userConn
please take a look at web2py/gluon/contrib/websocket_messaging.py
after that please try it, if still not success, please show the traceback
error or your code, so that people in this group can help.
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
also, please take a look at this discussion
ref:
https://groups.google.com/forum/#!topic/web2py/xl2D_RZfGic
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/li
24 matches
Mail list logo