@JIM S
Yes,both questions are same.I am finding two different methods for this
question.So,I asked same question in two different ways.
1)writing input field manually in view with onfocus="myfunction()" and then
storing in database.
2)Manipulating something in controller SQLFORM.factory() to add
I'm using browser to access it. But it returns invalid. It's interesting
because I have other files in static folder and they can be accessed such as
Web2py.css.
I'm starting to think that maybe when I create the file, it does not give it
permission to read by default. I will check that later. B
On Tuesday, July 12, 2016 at 9:17:05 AM UTC-4, Aydin wrote:
>
> I am creating a file (test.txt) using the following
>
> myfile = os.path.join(request.folder, 'static', 'test.txt')
> f = open(myfile, 'w')
> f.write('%s' % x)
>
> and I like to see it when I do /myapp/static/test.txt,
On Tuesday, July 12, 2016 at 12:14:29 PM UTC-4, Carlos Cesar Caballero
wrote:
>
> Now I have two more questions:
>
First, see my other response, as you might be able to restructure your
web2py controller(s) to enable you to use the parameter-based router and
avoid all of this complexity.
> C
On Tuesday, July 12, 2016 at 9:46:22 AM UTC-4, Carlos Cesar Caballero wrote:
>
> Hi Anthony, unfortunately the parameter-based router doesn't suit my
> needs, I need (among other things) the ability to map urls in that way:
>
> www.mysite.com/cuba to www.mysite.com/app/country/index/cuba
> www.mys
On Tuesday, July 12, 2016 at 11:41:20 AM UTC-4, Massimo Di Pierro wrote:
>
> forget load in this case.
>
>
>
>
>
> var counter = 0;
> var minutes = 2;
> var max_calls = 10;
> var url = "{{=URL('call')}}";
> var f = function() {
> counter = counter + 1;
> jQuery.get(url).done(function(dat
It is not clear what you are trying to achieve. Can you explain the real
world scenario you are trying to implement? What is the exact workflow?
Does someone view a single page, and some content on that page needs to
update every 30 minutes?
Anyway, regarding your current code, as already menti
So, is this question a duplicate of this one?
https://groups.google.com/forum/#!topic/web2py/FAQyd_bU9Fc
-Jim
On Tuesday, July 12, 2016 at 10:26:00 AM UTC-5, pbt wrote:
>
> I do not want the input field 'location' to be focussed automatically. I
> want to execute a myFunction() when input field
To avoid incurring in overhead on every request you could use a script to
be called once with web2py.py -R option.
Also you could create a function in a model file with little overhead:
def create_indexes():
db.executesql('CREATE INDEX...')
later you can call it manually from the shell
Hi, thanks to everyone now I am able to write a pattern-based router for
my application including basic internationalization by mapping the url
data to a variable as Anthony suggests in his initial reply.
Now I have two more questions:
Can I replace the URL() function for my application withou
forget load in this case.
var counter = 0;
var minutes = 2;
var max_calls = 10;
var url = "{{=URL('call')}}";
var f = function() {
counter = counter + 1;
jQuery.get(url).done(function(data) {
jQuery('#target').html(data);
if(counter
You can also use a "custom form" on table list and use this:
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onfocus
As you build the form, just stick the classes there where you the focus to
be.
On Tuesday, July 12, 2016 at 11:26:00 AM UTC-4, pbt wrote:
>
> I do not want the input
I have deleted your other post. DO NOT EVER POST YOUR ADMIN PASSWORD
ONLINE. It gives complete access to your VM.
Please change it and email the new one to me and Anthony privately and we
will try help.
Massimo
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http
I do not want the input field 'location' to be focussed automatically. I
want to execute a myFunction() when input field 'location' with id =
'autocomplete' is focused .
On Tuesday, July 12, 2016 at 8:08:39 PM UTC+5:30, Jim S wrote:
>
> Here is what I've added to my layout.html so that all my pa
How to add id to the field 'location' using jquery in view. Because my js
function also requires the field to have id="autocomplete"
On Tuesday, July 12, 2016 at 6:04:53 PM UTC+5:30, Massimo Di Pierro wrote:
>
> form.element(_name='location')['onfocus'] = 'geoLocation()'
>
> BUT
>
> You should re
I added these lines in my view
jQuery(function() {
jQuery('[name=location]').focus(geolocate);
});
But it is not working.
What I am actually trying to do is while filling field 'location',it should
give the suggestions automatically fetched from google maps.
The suggestions are coming when I
Here is what I've added to my layout.html so that all my pages
automatically position the cursor to the first input field available that
doesn't have the .filter class applied to it:
$(document).ready(function () {
$('form:not(.filter) :input:visible:first').focus().sele
Admin Password : c954ecbf
Best,
Chetan Jain
On Tue, Jul 12, 2016 at 7:16 PM, Chetan Jain wrote:
> URL : https://pqr.pythonanywhere.com/ajax/default/index
>
> Best,
> Chetan Jain
>
> On Tue, Jul 12, 2016 at 6:07 PM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> It is not clear. W
Hi Anthony, unfortunately the parameter-based router doesn't suit my
needs, I need (among other things) the ability to map urls in that way:
www.mysite.com/cuba to www.mysite.com/app/country/index/cuba
www.mysite.com/cuba/cienfuegos to
www.mysite.com/app/state/index/cuba/cienfuegos
www.mysite.c
Thanks Ron, is a very good and useful example.
Greetings.
El 11/07/16 a las 13:12, Ron Chatterjee escribió:
Alternatively you can also look at this:
http://www.web2pyref.com/example/routespy-url-rewrite-with-pattern-based-system-used-by-web2pyref-snippet-1
On Monday, July 11, 2016 at 12:19:
URL : https://pqr.pythonanywhere.com/ajax/default/index
Best,
Chetan Jain
On Tue, Jul 12, 2016 at 6:07 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> It is not clear. Where is your app?
>
>
> On Tuesday, 12 July 2016 06:32:29 UTC-5, Chetan Jain wrote:
>>
>> Hi Anthony,
>>
>> i've
I have packaged (os: windows) a compiled app but some files were not added.
For example: "markers-ma...@2x.png"
I guess the "@" character is the problem.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.googl
I am creating a file (test.txt) using the following
myfile = os.path.join(request.folder, 'static', 'test.txt')
f = open(myfile, 'w')
f.write('%s' % x)
and I like to see it when I do /myapp/static/test.txt, but I cann't. the
file has been created and I can see it in that folder.
It is not clear. Where is your app?
On Tuesday, 12 July 2016 06:32:29 UTC-5, Chetan Jain wrote:
>
> Hi Anthony,
>
> i've created one 24 hours web2py application at pythonanywhere.com,
> please let me know when you have 10-15 minutes of time, so that i can
> rectify my problem.
> Thanks in ad
form.element(_name='location')['onfocus'] = 'geoLocation()'
BUT
You should really do this in the view:
jQuery(function() {
jQuery('[name=location]').focus(geoLocation);
});
On Tuesday, 12 July 2016 05:15:27 UTC-5, pbt wrote:
>
> I know how to generate input fields from form. My doubt is I
Hi Anthony,
i've created one 24 hours web2py application at pythonanywhere.com,
please let me know when you have 10-15 minutes of time, so that i can
rectify my problem.
Thanks in advance.
On Tue, Jul 12, 2016 at 7:43 AM, Anthony wrote:
> If your view includes an {{=i}} variable, then yo
Hello everyone.
Can someone explain me how to get data from table using web2py rest api and
angularjs?
I have function api():
1. @request.restful()
2. def api():
3. response.view = 'generic.json'
4. def GET(*args,**vars):
5. patterns = 'auto'
6. parser
I know how to generate input fields from form. My doubt is I want to add an
event 'onFocus' to that field. How to do that using SQLFORM.factory
On Tuesday, July 12, 2016 at 2:49:30 PM UTC+5:30, Mirek Zvolský wrote:
>
> You need form and its submitting.
> You can use Web2py form support, see web2p
You need form and its submitting.
You can use Web2py form support, see web2py.com/book chapter 7:
FORM,
or SQLFORM.factory (you have to save yourselves the input value after
the form validation from forms.vars into db database)
or SQLFORM (this will save the input value automatically)
Bo
There is one logical problem with the parameteric router (as opposed to the
regex routes) and that is how it handles missing
applicaiton/controller/function. If one is missing, it assumes a default
value specified by the routes.py configuration. In this process it must
make some assumptions abo
in models
db.define_table('list'
Field('name','string'),
Field('location','string')
)
I want to store the value present in the above input field to 'location'
field in table 'list'.
--
Resources:
- http://web2py.com
- ht
TW. The name is going to change today. DBAPI will be renamed something else.
On Monday, 11 July 2016 07:43:13 UTC-5, Marlysson Silva wrote:
>
> Without to use DBAPI but still it would be possible to build API Rest with
> web2py using @restful?
>
> Managering dal mannualy
>
> Em segunda-feira, 11
In models
db.define_table('list',
Field('name', 'string'),
Field('location', 'string'))
In controller
def list():
form = SQLFORM.factory(
Field('name',label='Name',requires=IS_NOT_EMPTY()),
Field('loca
33 matches
Mail list logo