[web2py] Re: Bootstrap tooltips require tether

2019-02-10 Thread Константин Комков
I need to find solution and I create simple project with ajax request it 
work in my computer and don't work on server. On server it returned welcom 
page. Now it's return errors like:

> Failed to load resource: net::ERR_TOO_MANY_REDIRECTS..welcome:1 

 or

> GET http://192.168.XXX.XXX/welcome net::ERR_TOO_MANY_REDIRECTS 
> ..jquery.js:4

It's problem can be detected when I create new app then change all files, 
design then I start app and have welcome page with hello world then I 
rename app and reload page 10-15 times and all work then, but not in that 
case.
As I think it's web2py problem.

-- 
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 message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Increment the value of a variable in one page by clicking a link in a different page

2019-02-10 Thread mostwanted
Thanks alot @SP, i can really work with this

On Sunday, February 10, 2019 at 7:41:33 PM UTC+2, sandeep patel wrote:
>
> Hello,@Mostwanted
> The code is working well. Actually in your view is not displaying anything 
> at all because of initially items is none, so for loop will not iterate 
> anything.
> For all this working well you have to insert a row in DB.
> I have updated the code so you don't need to do anything.
> Please test this code.
>
> #controller
>
> def countclick():
> items = db(db.countclick.created_by == auth.user.id).select()
> clicks = 0
> if len(items):
> for i in items:
> clicks = i.clicks
> return locals()
>
>
> def counter():
> item = db(db.countclick.created_by == request.vars.id).select()
> new_count = 1
> if len(item):
> for i in item:
> new_count = i.clicks + 1
> try:
> db.countclick.update_or_insert((db.countclick.created_by == 
> auth.user.id),clicks=new_count)
> except Exception as e:
> print(e)
> return "{}".format(new_count)
>
> #View
>
> {{extend 'layout.html'}}
>
> 
>
>
>  onclick="jQuery('#id').val('{{=auth.user.id}}');
>ajax('{{=URL('default', 'counter')}}', ['id'], 
> 'item{{=auth.user.id}}');" href="#">clck
> 
>
> Count={{=clicks}}
> 
> 
>
>
> Thanks
>
> SP
>
>
> On Sun, Feb 10, 2019 at 10:02 PM mostwanted  > wrote:
>
>> Hey @SP, my view is not not displaying anything at all, my link is not 
>> displayed!! I was working on your example above, I dont know if i am 
>> missing something.
>>
>> On Sunday, February 10, 2019 at 3:24:38 PM UTC+2, sandeep patel wrote:
>>>
>>>
>>> @Mostwanted
>>> I think you can achieve this functionality by a couple of ways.
>>> One, you can store every clicks value in session but you can only store 
>>> for the time being.
>>> Another way you can directly store every clicks values in DB.
>>> You can try this code
>>> #Model
>>>
>>> db.define_table('countclick',
>>> Field('clicks', 'integer', default=0),
>>> auth.signature
>>>   )
>>>
>>> #Controller
>>>
>>> def countclick():
>>> items = db(db.countclick).select()
>>> return dict(items=items)
>>>
>>>
>>> def counter():
>>> item = db.countclick[request.vars.id]
>>> new_count = item.clicks + 1
>>> if item.update_record(clicks=new_count):
>>> print("Yes")
>>> else:
>>> print('N0')
>>> return "{}".format(new_count)
>>>
>>> #View
>>>
>>> {{extend 'layout.html'}}
>>>
>>> 
>>>
>>> {{for item in items:}}
>>> >> onclick="jQuery('#id').val('{{=item.id}}');
>>>ajax('{{=URL('default', 'counter')}}', ['id'], 'item{{=item.id}}');" 
>>> href="#">Increment
>>> 
>>>
>>> Count={{=item.clicks}}
>>> 
>>> 
>>> {{pass}}
>>>
>>> For more information you can check here 
>>> 
>>>
>>> Thanks
>>>
>>> SP
>>>
>>>
>>> On Sun, Feb 10, 2019 at 5:38 PM mostwanted  wrote:
>>>
 I am trying achieve something but i don't know how, i have a page 
 called Link (default/link.html) that has a link called Increment 
  {{=A('Increment', _id="increment",_href=URL('default', 'value'))}}

 and a page called value (default/value.html) that has a variable (X), 
 what i want is to have (X) incremented by 1 every-time I click the link 
 Increment in the page Link, this value should only increase by 1 
 every-time 
 a user clicks Increment, the value should not go back to zero or the 
 default value even when the user shuts own the system. I don't have a code 
 sample for this obviously coz i couldn't implement it, i only have this as 
 an idea, if anyone understands how i could implement this please help out.

 Regards;

 Mostwanted

 -- 
 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 message because you are subscribed to the Google 
 Groups "web2py-users" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to web2py+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>> -- 
>> 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 message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- 

Re: [web2py] Increment the value of a variable in one page by clicking a link in a different page

2019-02-10 Thread sandeep patel
Hello,@Mostwanted
The code is working well. Actually in your view is not displaying anything
at all because of initially items is none, so for loop will not iterate
anything.
For all this working well you have to insert a row in DB.
I have updated the code so you don't need to do anything.
Please test this code.

#controller

def countclick():
items = db(db.countclick.created_by == auth.user.id).select()
clicks = 0
if len(items):
for i in items:
clicks = i.clicks
return locals()


def counter():
item = db(db.countclick.created_by == request.vars.id).select()
new_count = 1
if len(item):
for i in item:
new_count = i.clicks + 1
try:
db.countclick.update_or_insert((db.countclick.created_by ==
auth.user.id),clicks=new_count)
except Exception as e:
print(e)
return "{}".format(new_count)

#View

{{extend 'layout.html'}}




clck


Count={{=clicks}}




Thanks

SP


On Sun, Feb 10, 2019 at 10:02 PM mostwanted  wrote:

> Hey @SP, my view is not not displaying anything at all, my link is not
> displayed!! I was working on your example above, I dont know if i am
> missing something.
>
> On Sunday, February 10, 2019 at 3:24:38 PM UTC+2, sandeep patel wrote:
>>
>>
>> @Mostwanted
>> I think you can achieve this functionality by a couple of ways.
>> One, you can store every clicks value in session but you can only store
>> for the time being.
>> Another way you can directly store every clicks values in DB.
>> You can try this code
>> #Model
>>
>> db.define_table('countclick',
>> Field('clicks', 'integer', default=0),
>> auth.signature
>>   )
>>
>> #Controller
>>
>> def countclick():
>> items = db(db.countclick).select()
>> return dict(items=items)
>>
>>
>> def counter():
>> item = db.countclick[request.vars.id]
>> new_count = item.clicks + 1
>> if item.update_record(clicks=new_count):
>> print("Yes")
>> else:
>> print('N0')
>> return "{}".format(new_count)
>>
>> #View
>>
>> {{extend 'layout.html'}}
>>
>> 
>>
>> {{for item in items:}}
>> > onclick="jQuery('#id').val('{{=item.id}}');
>>ajax('{{=URL('default', 'counter')}}', ['id'], 'item{{=item.id}}');" 
>> href="#">Increment
>> 
>>
>> Count={{=item.clicks}}
>> 
>> 
>> {{pass}}
>>
>> For more information you can check here 
>> 
>>
>> Thanks
>>
>> SP
>>
>>
>> On Sun, Feb 10, 2019 at 5:38 PM mostwanted  wrote:
>>
>>> I am trying achieve something but i don't know how, i have a page called
>>> Link (default/link.html) that has a link called Increment
>>>  {{=A('Increment', _id="increment",_href=URL('default', 'value'))}}
>>>
>>> and a page called value (default/value.html) that has a variable (X),
>>> what i want is to have (X) incremented by 1 every-time I click the link
>>> Increment in the page Link, this value should only increase by 1 every-time
>>> a user clicks Increment, the value should not go back to zero or the
>>> default value even when the user shuts own the system. I don't have a code
>>> sample for this obviously coz i couldn't implement it, i only have this as
>>> an idea, if anyone understands how i could implement this please help out.
>>>
>>> Regards;
>>>
>>> Mostwanted
>>>
>>> --
>>> 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 message because you are subscribed to the Google
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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 message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Increment the value of a variable in one page by clicking a link in a different page

2019-02-10 Thread mostwanted
Hey @SP, my view is not not displaying anything at all, my link is not 
displayed!! I was working on your example above, I dont know if i am 
missing something.

On Sunday, February 10, 2019 at 3:24:38 PM UTC+2, sandeep patel wrote:
>
>
> @Mostwanted
> I think you can achieve this functionality by a couple of ways.
> One, you can store every clicks value in session but you can only store 
> for the time being.
> Another way you can directly store every clicks values in DB.
> You can try this code
> #Model
>
> db.define_table('countclick',
> Field('clicks', 'integer', default=0),
> auth.signature
>   )
>
> #Controller
>
> def countclick():
> items = db(db.countclick).select()
> return dict(items=items)
>
>
> def counter():
> item = db.countclick[request.vars.id]
> new_count = item.clicks + 1
> if item.update_record(clicks=new_count):
> print("Yes")
> else:
> print('N0')
> return "{}".format(new_count)
>
> #View
>
> {{extend 'layout.html'}}
>
> 
>
> {{for item in items:}}
>  onclick="jQuery('#id').val('{{=item.id}}');
>ajax('{{=URL('default', 'counter')}}', ['id'], 'item{{=item.id}}');" 
> href="#">Increment
> 
>
> Count={{=item.clicks}}
> 
> 
> {{pass}}
>
> For more information you can check here 
> 
>
> Thanks
>
> SP
>
>
> On Sun, Feb 10, 2019 at 5:38 PM mostwanted  > wrote:
>
>> I am trying achieve something but i don't know how, i have a page called 
>> Link (default/link.html) that has a link called Increment 
>>  {{=A('Increment', _id="increment",_href=URL('default', 'value'))}}
>>
>> and a page called value (default/value.html) that has a variable (X), 
>> what i want is to have (X) incremented by 1 every-time I click the link 
>> Increment in the page Link, this value should only increase by 1 every-time 
>> a user clicks Increment, the value should not go back to zero or the 
>> default value even when the user shuts own the system. I don't have a code 
>> sample for this obviously coz i couldn't implement it, i only have this as 
>> an idea, if anyone understands how i could implement this please help out.
>>
>> Regards;
>>
>> Mostwanted
>>
>> -- 
>> 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 message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Increment the value of a variable in one page by clicking a link in a different page

2019-02-10 Thread sandeep patel
@Mostwanted
I think you can achieve this functionality by a couple of ways.
One, you can store every clicks value in session but you can only store for
the time being.
Another way you can directly store every clicks values in DB.
You can try this code
#Model

db.define_table('countclick',
Field('clicks', 'integer', default=0),
auth.signature
  )

#Controller

def countclick():
items = db(db.countclick).select()
return dict(items=items)


def counter():
item = db.countclick[request.vars.id]
new_count = item.clicks + 1
if item.update_record(clicks=new_count):
print("Yes")
else:
print('N0')
return "{}".format(new_count)

#View

{{extend 'layout.html'}}



{{for item in items:}}
Increment


Count={{=item.clicks}}


{{pass}}

For more information you can check here


Thanks

SP


On Sun, Feb 10, 2019 at 5:38 PM mostwanted  wrote:

> I am trying achieve something but i don't know how, i have a page called
> Link (default/link.html) that has a link called Increment
>  {{=A('Increment', _id="increment",_href=URL('default', 'value'))}}
>
> and a page called value (default/value.html) that has a variable (X), what
> i want is to have (X) incremented by 1 every-time I click the link
> Increment in the page Link, this value should only increase by 1 every-time
> a user clicks Increment, the value should not go back to zero or the
> default value even when the user shuts own the system. I don't have a code
> sample for this obviously coz i couldn't implement it, i only have this as
> an idea, if anyone understands how i could implement this please help out.
>
> Regards;
>
> Mostwanted
>
> --
> 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 message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Increment the value of a variable in one page by clicking a link in a different page

2019-02-10 Thread mostwanted
I am trying achieve something but i don't know how, i have a page called 
Link (default/link.html) that has a link called Increment 
 {{=A('Increment', _id="increment",_href=URL('default', 'value'))}}

and a page called value (default/value.html) that has a variable (X), what 
i want is to have (X) incremented by 1 every-time I click the link 
Increment in the page Link, this value should only increase by 1 every-time 
a user clicks Increment, the value should not go back to zero or the 
default value even when the user shuts own the system. I don't have a code 
sample for this obviously coz i couldn't implement it, i only have this as 
an idea, if anyone understands how i could implement this please help out.

Regards;

Mostwanted

-- 
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 message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Migrate from sqlite to mysql

2019-02-10 Thread 黄祥

>
> but, what happen if I install python 3.7 on windows? Does web2py still use 
> 2.7?
>

this question is vague
not sure what do you have in web2py? win version or source version?
if use source version, then web2py run on python is depending on the 
command you use
*e.g. in ubuntu environment*
python web2py.py # for python 2
python3 web2py.py # for python 3
 

> Or installinh mysql without this connector?
>

not sure, not tested, perhaps can try it first in virtual machine first 
e.g. virtualbox or vmware
 

> What does you think? Other suggestions? I don't like to use different 
> things because I need to publish my application to pythonanywhere...
>

think mysql and mariadb is not different things, it's same :
In 2010, when Oracle acquired Sun, Widenius forked the open-source MySQL 
project to create MariaDB.
ref:
https://en.wikipedia.org/wiki/MySQL

for conda, is python package manager just think about it's like a 
versioning for python installation
ref:
https://en.wikipedia.org/wiki/Conda_(package_manager)

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/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Need to change text Size of the header

2019-02-10 Thread sandeep patel
@Arindas
Please see an attached layout.html file. You get the idea.


Thanks
SP

On Sun, Feb 10, 2019 at 2:00 PM Arindam Dasgupta 
wrote:

> Hi Sandeep,
>
> As always, Thank you so much.
>
> I still need to know where do I use these classes in the layout file. The
> following codes in the layout file is controlling the navigation bar. How
> do I use the classes you mentioned above? Once again I am attaching the
> layout file.
>
> I am sorry if the question is too silly!.
>
> 
> 
>   
> 
>data-toggle="collapse" data-target=".navbar-collapse">
> Toggle navigation
> 
> 
> 
>   
>   {{=response.logo or ''}}
> 
> 
>   
> {{='auth' in globals() and
> auth.navbar('Welcome',mode='dropdown') or ''}}
>   
>   {{if response.menu:}}
>   {{=MENU(response.menu, _class='nav
> navbar-nav',li_class='dropdown',ul_class='dropdown-menu')}}
>   {{pass}}
> 
>   
> 
>
> On Sun, Feb 10, 2019 at 10:23 AM sandeep patel 
> wrote:
>
>> @ Arindam,
>> Lionel says that create a new .css and store in static/css folder and add
>> that path in the layout.html file. Add that path after bootstrap.css
>> Even you can directly put a style tag in the layout.html file. Style tag
>> will be inside the end of the head tag. Change the font size according to
>> your necessity
>> You can do this way.
>>
>> 
>>
>> 
>> > href="{{=URL('static','css/web2py-bootstrap4.css')}}"/>
>>   > href="{{=URL('static','css/bootstrap-4-navbar.css')}}"/>
>> > type="image/x-icon">
>> 
>>
>>   
>> .nav-item > .nav-link{
>> font-size: 20px;
>>
>> } 
>>
>> 
>>
>> Thanks
>>
>> SP
>>
>>
>> On Sun, Feb 10, 2019 at 9:46 AM Arindam Dasgupta 
>> wrote:
>>
>>> Hi Lionel,
>>> Thanks for your reply. But I cannot understand how to do that in this
>>> case.
>>> Can you please give me some more details ?
>>>
>>> Thanks a lot.
>>>
>>>
>>> Redards,
>>> Arindam
>>>
>>> On Feb 9, 2019 8:02 PM, "Leonel Câmara"  wrote:
>>>
>>> The simplest way is to add another css file to your project after
>>> bootstrap and put the styles there.
>>>
>>> --
>>> 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 message because you are subscribed to the Google
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
>>> 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 message because you are subscribed to the Google
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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 message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Title: {{=response.title or request.application}}

  
  


  

{{=response.flash or ''}}


  

  
Toggle navigation



  
  {{=response.logo or ''}}


  
{{='auth' in 

[web2py] Re: Migrate from sqlite to mysql

2019-02-10 Thread Andrea Fae'
but, what happen if I install python 3.7 on windows? Does web2py still use 
2.7?
Or installinh mysql without this connector?
What does you think? Other suggestions? I don't like to use different 
things because I need to publish my application to pythonanywhere...
thanks

Il giorno domenica 10 febbraio 2019 11:36:52 UTC+1, 黄祥 ha scritto:
>
> pardon, not using windows atm, so cant test it
> perhaps you have 2 options:
> - try mariadb (not sure mariadb required python3 or not)
> or
> - use conda (miniconda (light version) or anaconda) to install python3 and 
> python2 in 1 machine
> *ref:*
> https://www.anaconda.com/distribution/
> https://conda.io/en/latest/miniconda.html
>
> 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/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Migrate from sqlite to mysql

2019-02-10 Thread 黄祥
pardon, not using windows atm, so cant test it
perhaps you have 2 options:
- try mariadb (not sure mariadb required python3 or not)
or
- use conda (miniconda (light version) or anaconda) to install python3 and 
python2 in 1 machine
*ref:*
https://www.anaconda.com/distribution/
https://conda.io/en/latest/miniconda.html

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/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Migrate from sqlite to mysql

2019-02-10 Thread Andrea Fae'
Hello, if I trye to install mysql 8 on my windows pc it tells me I have a 
problem about requirements. I don't have installed python 3.7. But could I 
have problem installing python 3.7 on my web2py based on python 2.17? thank 
you in advance for your gently answers!

Il giorno sabato 9 febbraio 2019 20:40:25 UTC+1, Andrea Fae' ha scritto:
>
> Thank you guys!
> I will do a test and let you known.
> Thank you for now.
>
>
> Il giorno sabato 9 febbraio 2019 17:47:53 UTC+1, Ben Lawrence ha scritto:
>>
>> And turn off lazy-tables until mysql has built all the tables.
>>
>> On Friday, February 8, 2019 at 5:03:29 PM UTC-8, 黄祥 wrote:
>>>
>>> - what version of mysql do I have to install to my PC where I have 2.17 
 version of web2py? Where can I find?

>>>  
>>> in windows env there are mysql and mariadb
>>> *ref:*
>>> https://downloads.mariadb.org
>>> https://dev.mysql.com/downloads/mysql/
>>>
>>> - is it necessary to install drivers or it is still included in my 
 web2py installed by windows installation method?

>>>
>>> web2py already ship the mysql driver  
>>>
>>> - what is the procedure to migrate the db of my application?

>>>
>>> better to export and import in csv file
>>>
>>> *step*:
>>> - create database mysql
>>> - when web2py using sqlite use export_to_csv_file()
>>> - change db uri in private/appconfig.ini from sqlite to mysql 
>>> - load web2py app, ensure migrate is true, so that will create the 
>>> tables defined in web2py
>>> - when web2py using mysql use import_from_csv_file() 
>>>
>>> *ref:*
>>>
>>> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Exporting-and-importing-data
>>>  
>>>
>>> another way around is web2py have a scripts/cpdb.py
>>> *ref:*
>>>
>>> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Copy-data-from-one-db-into-another
>>>
>>> - after migrating, how to install the application using pyrhonanywhere 
 site? (I'm just using the app made with SQLite)

>>>
>>> *local*
>>> - export your database using mysqldump
>>> - pack your app from web2py admin
>>>
>>> *pythonanywhere*
>>> - login to pythonanywhere, use tab console to import your mysql database
>>> - then in web2py admin just Upload and install packed application
>>>
>>> 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/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Need to change text Size of the header

2019-02-10 Thread Arindam Dasgupta
Hi Sandeep,

As always, Thank you so much.

I still need to know where do I use these classes in the layout file. The
following codes in the layout file is controlling the navigation bar. How
do I use the classes you mentioned above? Once again I am attaching the
layout file.

I am sorry if the question is too silly!.



  

  
Toggle navigation



  
  {{=response.logo or ''}}


  
{{='auth' in globals() and
auth.navbar('Welcome',mode='dropdown') or ''}}
  
  {{if response.menu:}}
  {{=MENU(response.menu, _class='nav
navbar-nav',li_class='dropdown',ul_class='dropdown-menu')}}
  {{pass}}

  


On Sun, Feb 10, 2019 at 10:23 AM sandeep patel 
wrote:

> @ Arindam,
> Lionel says that create a new .css and store in static/css folder and add
> that path in the layout.html file. Add that path after bootstrap.css
> Even you can directly put a style tag in the layout.html file. Style tag
> will be inside the end of the head tag. Change the font size according to
> your necessity
> You can do this way.
>
> 
>
> 
> 
>href="{{=URL('static','css/bootstrap-4-navbar.css')}}"/>
>  type="image/x-icon">
> 
>
>   
> .nav-item > .nav-link{
> font-size: 20px;
>
> } 
>
> 
>
> Thanks
>
> SP
>
>
> On Sun, Feb 10, 2019 at 9:46 AM Arindam Dasgupta 
> wrote:
>
>> Hi Lionel,
>> Thanks for your reply. But I cannot understand how to do that in this
>> case.
>> Can you please give me some more details ?
>>
>> Thanks a lot.
>>
>>
>> Redards,
>> Arindam
>>
>> On Feb 9, 2019 8:02 PM, "Leonel Câmara"  wrote:
>>
>> The simplest way is to add another css file to your project after
>> bootstrap and put the styles there.
>>
>> --
>> 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 message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> 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 message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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 message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  
  






{{=response.title or request.application}}













{{include 'web2py_ajax.html'}} 
{{block head}}{{end}}
{{
# using sidebars need to know what sidebar you want to use
mc0 = 'col-md-12'
mc1 = 'col-md-9'
mc2 = 'col-md-6'
left_sidebar_enabled = globals().get('left_sidebar_enabled', False)
right_sidebar_enabled = globals().get('right_sidebar_enabled', False)
middle_column = {0: mc0, 1: mc1, 2: mc2}[
(left_sidebar_enabled and 1 or 0)+(right_sidebar_enabled and 1 or 0)]
}}
  





  

{{=response.flash or 
''}}


  

  
Toggle navigation



  
  {{=response.logo or ''}}


  
{{='auth' in globals() and auth.navbar('Welcome',mode='dropdown') 
or ''}}
  
  {{if response.menu:}}
  {{=MENU(response.menu, _class='nav 
navbar-nav',li_class='dropdown',ul_class='dropdown-menu')}}
  {{pass}}

  


{{block header}}
{{end}}



  {{if left_sidebar_enabled:}}