[web2py] Menu option on We2py 2.16.1-stable doesnt open on cellphones

2018-05-24 Thread mostwanted
Hi guys, my menu is not opening on cellphones, i can not access my menu 
when i open my website on a cell phone, i am using 2.16.1-stable version. 
Is there something wrong with this version or the problem is my application?

Thanks

-- 
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: Menu option on We2py 2.16.1-stable doesnt open on cellphones

2018-05-24 Thread mostwanted
I followed Dave S's link to this link 
https://groups.google.com/forum/m/?utm_source=digest&utm_medium=email#!topic/web2py/j07rLhwFaqA
 
which led me to this link 
https://groups.google.com/d/msg/web2py/Am138qbZCuo/TCFOMKRqAgAJ 

where i found my answer, and Sandeep's solution is good too, it works. 
Thank you guys.

On Thursday, May 24, 2018 at 6:37:58 PM UTC+2, mostwanted wrote:
>
> Hi guys, my menu is not opening on cellphones, i can not access my menu 
> when i open my website on a cell phone, i am using 2.16.1-stable version. 
> Is there something wrong with this version or the problem is my application?
>
> Thanks
>

-- 
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] reference gives error table company has no column named....

2018-08-30 Thread mostwanted
I have a database which i recently updated by adding a new table called 
*tlamelo*, the new table is referenced in one of the old tables called 
*company, 
*when i try to save data into the table *company* i get the error bellow 
*(table 
company has no column named tlamelo)!* I do not understand why i am getting 
this error, i am not sure if it has anything to do with the 
fake_migrate=True
or not! Can anyone please help me, thank you.

 table company has no column named tlamelo

This is the code for my table tlamelo
db.define_table('tlamelo',
Field('leina_la_tlamelo', requires=IS_NOT_EMPTY()),
format='%(leina_la_tlamelo)s', migrate=False, fake_migrate=
True)

This is the code for my table company
db.define_table('company',
Field('logo', 'upload'),
Field('company_name', requires=IS_NOT_EMPTY()),
Field('services', 'reference services'),
Field('tlamelo', 'reference tlamelo'), #tlamelo is 
referenced here
Field('product', 'reference product'),
Field('tel', requires=IS_NOT_EMPTY()),
Field('email', requires=IS_NOT_EMPTY()),
Field('fax', requires=IS_NOT_EMPTY()),
Field('cell', requires=IS_NOT_EMPTY()),
Field('facebook', requires=IS_NOT_EMPTY()),
Field('twitter', requires=IS_NOT_EMPTY()),
Field('website', requires=IS_NOT_EMPTY()),
Field('postal_address', requires=IS_NOT_EMPTY()),
Field('located_at', requires=IS_NOT_EMPTY()), migrate=False, 
fake_migrate=True)


-- 
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] Getting wrong results from a tootip after a for loop ina a view

2018-09-10 Thread mostwanted

 I have contact details of different places in my DB, the names of these 
different places are displayed as links in a page, what i want is for the 
contact details of a place to be displayed in a tooltip when i click on the 
link name of that place. But that is not happening! What happens is that 
when i click the name of the place i get 2 tooltips stacked on top of each 
other displaying the wrong information!

*TOOLTIP CSS code*









*#branch1 {outline:none; position: relative; font-weight: bold;}#branch1 
{text-decoration:none;}/*#branches .contacts {}*/span.contacts1{ 
display:inline; position:absolute; color:#111; border:1px solid #00; 
background: #00; opacity: 0.9; color: white; font-weight: bold; 
font-size: small; border:1px solid #00; border-radius: 
25px;/*border-radius: 5px 100px 5px;*/; z-index:1; left: 40px; 
display:none; padding:14px 15px; margin-top:-56px; margin-left:70px; 
width:500px; line-height:16px;line-height:20px; }.callout 
{z-index:20;position:absolute;top:30px;border:0;left:-12px;} /*CSS3 
extras*/CONTROLLER CODE*





*def companies():results=db.services(request.args(0))
rslts=db(db.company.services==results.id).select(db.company.ALL, 
orderby=db.company.company_name)return locals()THE VIEW*



























































*$(document).ready(function(){
$('.branch1').click(function(e) {$(this).each(function(){  
  $('.contacts1').fadeIn();
e.preventDefault();});});
 $('img#close').click(function(e) {
 $('.contacts1').fadeOut(); e.preventDefault();
 });});  COMPANIES (A-F){{letters=['A', 'B', 
'C', 'D', 'E', 'F']for company in rslts:if 
company.company_name[0] in letters:company.company_name}}{{=company.company_name}}  SESOA™
{{=company.company_name}}TEL: 
{{=company.tel}}EM@IL:  {{=company.email}}CELL: {{=company.cell}}Facebook:   {{=company.facebook}}Twitter:  {{=company.twitter}}WEBSITE:  {{=company.website}}FAX:  {{=company.fax}}LOCATION:  {{=company.located_at}}
 {{pass}}{{pass}}
*

-- 
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] Ajax Live Search (auto-complete)

2018-09-12 Thread mostwanted
I have been looking at the code for the Ajax Live Search auto-complete 
under Ajaxing your search functions of the web2py cookbook, i want to 
implement the No results function if the search does not return anything 
but i'm not sure where and how to implement it. 

The Ajax live search code is here:  
http://www.web2pyslices.com/slice/show/1378/ajax-live-search-auto-complete 

Regards

-- 
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] How can i select an item from the database only once?

2018-09-21 Thread mostwanted
How do i get a value stored in the database to be selected only once by 
users? I am creating a hotel system and in this system i have to make sure 
that a room can not be double booked, it can only be selected once for one 
client.

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: How can i select an item from the database only once?

2018-09-23 Thread mostwanted
I am trying to use the first method but i am failing to get the desired 
results, how do i check the availability of the selected and wanted room??
This is my controller code but i figured it not gonna give me results even 
when i started writing it:

*CONTROLLER:*











*def index():form=SQLFORM(db.rooms)if form.accepts(request.vars, 
session):space=db(db.rooms).select(db.rooms.ALL)for sp in 
space:if sp.vailable==True:response.flash = 
T("CLIENT BOOKED")elif sp.vailable==False:
db.rollback()response.flash = T("FAILED")return 
locals();*

*MODEL*
















*db.define_table('client',Field('Name'),
Field('Surname'),Field('age'),  
 format='%(Name)s')db.define_table('room_numbers',
Field('room'),format='%(room)s')db.define_table('rooms',
#Field('room_number'),Field('room', 'reference 
room_numbers'),Field('available', 'boolean'),  
  Field('occupant', 'reference client'))*

On Saturday, September 22, 2018 at 1:06:24 AM UTC+2, Dave S wrote:
>
>
>
> On Friday, September 21, 2018 at 2:35:33 PM UTC-7, Dave S wrote:
>>
>>
>>
>> On Friday, September 21, 2018 at 9:54:00 AM UTC-7, mostwanted wrote:
>>>
>>> How do i get a value stored in the database to be selected only once by 
>>> users? I am creating a hotel system and in this system i have to make sure 
>>> that a room can not be double booked, it can only be selected once for one 
>>> client.
>>>
>>> Regards
>>>
>>> Mostwanted
>>>
>>
>>
>> There are a couple of ways I can think of.
>>
>> The most obvious way would to be include a boolean field in your room 
>> record, call it "available".
>>
>> db.define_table('room',
>>Field('available', 'string'),
>>Field('roomnum', 'integer'),
>>Field('numsleeps',  'integer'),
>>Field('occupant', refence 'account'))
>>
>>
>>
> I forgot a field for non-smoking, so assume *all* rooms are non-smoking 
> at this point.
>  
>
>> Your controller function that assigns the room to an occupant would 
>> update both fields, but only if 'available' was True when fetched.  This 
>> relies on the web2py default that an http request is performed as a single 
>> transaction.
>>
>>  
> Note:  it's a matter of choice as whether you call the field 'available' 
> or 'in_use'; go with what makes sense in terms of business logic and/or the 
> surrounding code.  But spell 'reference' correctly, of course.
>
> Another technique would be to have a separate table tracking available 
> rooms, and delete the entry when the room is assigned.
>
> db.define_table('available',
>Field('room', reference 'room'));
>
>
> You can also track rooms-in-use if you prefer, but I think that's more 
> complicated for finding an available room.  You can use both lists, and 
> swap from one to another at appropriate times, and you can add additional 
> states (such as for being remodeled or deep-cleaned).
>
> Someone of faster wit than mine may offer up yet another way of achieving 
> your goal.
>
> /dps
>
>
>

-- 
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] How do i get the details of a user in db.auth_user displayed by referencing it in my db?

2018-09-23 Thread mostwanted
I have a table called *Customers* that has a field *Booked_By* which 
references *auth_user,* when i attempt to display the details of Booked_By 
in one view* (viewBookings) *with *db(...).select()* all i get are 
their IDs but when i display them in another view* (Client_Updates)* with 
*SQLFORM().process() 
*their usernames are selected for me & displayed, when I try to use* 
{{=bookings.Booked_By.first_name}} *in* (viewBookings) *I get a message 
that *  'NoneType' object has no 
attribute 'first_name'. *How can i get the details that i want to be 
displayed in both of these views from the* Booked_By* field?

*MODEL CODE:*
db.define_table('Customer',
Field('Name', requires=IS_NOT_EMPTY()),
Field('Surname', requires=IS_NOT_EMPTY()),
Field('ID_Number', requirs=IS_NOT_EMPTY()),
Field('Contact_Number', requires=IS_NOT_EMPTY()),
Field('Method_of_Payment', 'reference Method_of_Payment'),
Field('Amount', 'integer'),
Field('Booking_Date', 'datetime', default=request.now, 
writable=False),
Field('Check_In', 'datetime'),
Field('Check_Out', 'datetime'),
Field('Room',  'reference Room', unique=True),
Field('Room_Status', 'reference Status'),
Field('Booked_By', 'reference auth_user', writable=False)
   )

*CONTROLLERS*
@auth.requires_login()
def index():
form=SQLFORM(db.Customer)
if auth.user:
db.Customer.Booked_By.default = auth.user.id
if form.accepts(request.vars, session):
response.flash = T("CLIENT BOOKED")
return locals();

def viewBookings():
bookings=db(db.Customer).select(db.Customer.ALL, orderby=db.Customer.
Surname)
return locals();

def Client_Updates():
client=db.Customer(request.args(0))
#details=db(db.Customer).select(db.Customer.ALL)
clientDetails=SQLFORM(db.Customer, client.id).process()
return locals()

*VIEWS:*
*view bookings*
{{for bookings in bookings:}}



{{=A(bookings.Surname, _href=URL('Client_Update', args=bookings.id))}} {{=
bookings.Name}}



 Room {{=bookings.Room.Room_Number}}


{{=bookings.Room_Status.Room_Status}}


    
{{if auth.user:}}
 {{=bookings.Booked_By.first_name}}
{{pass}}
{{pass}}




*Client_Updates:*

VIEW & UPDATE CLIENT DETAILS
{{=clientDetails}}



I could Use all the help i can get.

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] what is '\x00'

2018-09-24 Thread mostwanted
I opened my App this morning to work on it & i got this error  * '\x00' *, can anyone please assist? What does it 
mean???
When i went to sleep everything was ok.

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] How to capture auth_user login time & logout time

2018-09-26 Thread mostwanted
Hi guys, i was wondering if there is a way for me to capture user login 
time and user logout time

Regards

Moatwanted

-- 
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: How to capture auth_user login time & logout time

2018-09-27 Thread mostwanted
Thank you guys

On Thursday, September 27, 2018 at 6:18:57 PM UTC+2, Joe Barnhart wrote:
>
> What Anthony said.  Only sessions rarely log out.  They mostly time out, 
> which does not show up as an event.
>
> Joe
>
> On Wednesday, September 26, 2018 at 12:13:25 PM UTC-7, mostwanted wrote:
>>
>> Hi guys, i was wondering if there is a way for me to capture user login 
>> time and user logout time
>>
>> Regards
>>
>> Moatwanted
>>
>

-- 
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: How can i select an item from the database only once?

2018-09-27 Thread mostwanted
Thank you Dave but this URL https://web2py.com/boobs/default/29/07/forms-and-validators#SQLFORM-and-insert-update-delete
 
>
 
is not working, its giving  an Invalid Request error

On Wednesday, September 26, 2018 at 10:15:44 PM UTC+2, Dave S wrote:
>
>
>
> On Wednesday, September 26, 2018 at 1:07:51 PM UTC-7, Dave S wrote:
>>
>> [...]
>>
>  
>
>> (controllers/myhotel.py)
>> [...]
>>
>  
>
>> define assignroom():
>> [...]
>>
>  
>
>>db(db.rooms.id == roomid).update(available=F, client = 
>> form.vars.id)
>> [...]
>>
>>
> I just noticed the book (at least the version currently at 
> web2py.com/books/default) has at
>  https://web2py.com/boobs/default/29/07/forms-and-validators#SQLFORM-and-insert-update-delete
> >
> an example that says "Assuming form=SQLFORM(db.test)" and then say the id 
> is "accessible in myform.vars.id".
> I haven't checked to see if the master has corrected this or not, and I'm 
> not sure when I would get around to doing a PR
> (the smaller the change, the longer it waits, no?), but I can advertise 
> the blip.
>
> /dps
>
>

-- 
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] Object not found

2018-09-27 Thread mostwanted
I have 3 table, Items, Client & Purchases, the Client table stores the 
details of the customer, the items table has a list of sold items and 
Purchases stores what the customer purchased on what day. I have a function 
in the controller that allows the editing of Customer and Purchases details 
in one view by clicking on the owner's name but i keep getting the *Object 
not found *message caused an attempt at opening an edit for the Purchases 
table, what am i doing wrong, is there a better way of doing this?

Regards

Mostwanted

*MODELS*
db.define_table('Customer',
Field('Name', requires=IS_NOT_EMPTY(), label=SPAN('First 
Name', _style="font-weight: bold;")),
Field('Surname', requires=IS_NOT_EMPTY(), label=SPAN('Last 
Name', _style="font-weight: bold;")),
Field('ID_Number', requirs=IS_NOT_EMPTY(), label=SPAN('Client 
ID No', _style="font-weight: bold;")),
Field('Company', requirs=IS_NOT_EMPTY(), label=SPAN(
'Company', _style="font-weight: bold;")),format='%(Surname)s ),

db.define_table('Items',
Field('Item', requires=IS_NOT_EMPTY()),
format='%(Item)s')

db.define_table('Purchases',
Field('Client', 'reference Customer', label=SPAN('Client', 
_style="font-weight: bold")),
Field('Item', 'reference Item', unique=True, label=SPAN('
Item Purchased', _style="font-weight: bold;")),
Field('Booking_Date', 'datetime', default=request.now, 
writable=False, label=SPAN('Date of Registration', _style="font-weight: 
bold;")),
Field('Serviced_By', 'reference auth_user', 
default=auth.user_id, writable=False, label=SPAN('Serviced By', 
_style="font-weight: bold;")))


*CONTROLLER*
def Client_Update():
client=db.Customer(request.args(0))
clientDetails=SQLFORM(db.Customer, client.id, deletable=True, showid=
False).process()
addRooms=SQLFORM(db.Purchases, client.id, deletable=True, showid=False).
process()
return locals()

*VIEW*
{{extend 'layout.html'}}


VIEW & UPDATE CLIENT DETAILS
{{=clientDetails}}

VIEW & UPDATE CLIENT PURCHASES
{{=addRooms}}

{{pass}}


-- 
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: Object not found

2018-09-28 Thread mostwanted
Hey Matthew, i have another view called viewPurchases that has a link that 
sends my args to the client_update controller, i didnt include it in the 
above code i thought is wasn't important it looks like this:

*viewPurchases VIEW*


Client Surname
Booked Room
Reservation / Booking Status
Booked By
{{for purchase in purchase:}}



{{=A(purchase.Surname, _href=URL('Client_Update', args=purchase.id))}} 
{{=purchase.Name}}



 Room {{=purchase.Items.Item}}


{{=purchase.Booked_By.first_name}} {{=bookings.Booked_By.last_name}}



{{pass}}


*viewPurchases CONTROLLER*




*def viewPurchases():purchase=db(db.Customer).select(db.Customer.ALL, 
orderby=db.Customer.Surname)return locals()*

On Friday, September 28, 2018 at 12:13:04 PM UTC+2, Matthew J Watts wrote:
>
> Looks like you are not sending/recieving your args properly (
>
> For example You need to send args=Customer.id ,  from a button or 
> redirect for example
>
> You then need to request the Customer.id in the 'Client_Update' function
>
> So you'd need 
>
> def Client_Update():
> client=request.args(0,cast=int)
>
>
>
>
>
>
> On Friday, September 28, 2018 at 8:04:57 AM UTC+2, mostwanted wrote:
>>
>> I have 3 table, Items, Client & Purchases, the Client table stores the 
>> details of the customer, the items table has a list of sold items and 
>> Purchases stores what the customer purchased on what day. I have a function 
>> in the controller that allows the editing of Customer and Purchases details 
>> in one view by clicking on the owner's name but i keep getting the *Object 
>> not found *message caused an attempt at opening an edit for the 
>> Purchases table, what am i doing wrong, is there a better way of doing this?
>>
>> Regards
>>
>> Mostwanted
>>
>> *MODELS*
>> db.define_table('Customer',
>> Field('Name', requires=IS_NOT_EMPTY(), label=SPAN('First 
>> Name', _style="font-weight: bold;")),
>> Field('Surname', requires=IS_NOT_EMPTY(), label=SPAN('Last 
>> Name', _style="font-weight: bold;")),
>> Field('ID_Number', requirs=IS_NOT_EMPTY(), 
>> label=SPAN('Client 
>> ID No', _style="font-weight: bold;")),
>> Field('Company', requirs=IS_NOT_EMPTY(), label=SPAN(
>> 'Company', _style="font-weight: bold;")),format='%(Surname)s ),
>>
>> db.define_table('Items',
>> Field('Item', requires=IS_NOT_EMPTY()),
>> format='%(Item)s')
>>
>> db.define_table('Purchases',
>> Field('Client', 'reference Customer', label=SPAN('Client', 
>> _style="font-weight: bold")),
>> Field('Item', 'reference Item', unique=True, label=SPAN('
>> Item Purchased', _style="font-weight: bold;")),
>> Field('Booking_Date', 'datetime', default=request.now, 
>> writable=False, label=SPAN('Date of Registration', _style="font-weight: 
>> bold;")),
>> Field('Serviced_By', 'reference auth_user', 
>> default=auth.user_id, writable=False, label=SPAN('Serviced By', 
>> _style="font-weight: bold;")))
>>
>>
>> *CONTROLLER*
>> def Client_Update():
>> client=db.Customer(request.args(0))
>> clientDetails=SQLFORM(db.Customer, client.id, deletable=True, showid=
>> False).process()
>> addRooms=SQLFORM(db.Purchases, client.id, deletable=True, showid=
>> False).process()
>> return locals()
>>
>> *VIEW*
>> {{extend 'layout.html'}}
>>
>> 
>> VIEW & UPDATE CLIENT DETAILS
>> {{=clientDetails}}
>> 
>> VIEW & UPDATE CLIENT PURCHASES
>> {{=addRooms}}
>> 
>> {{pass}}
>>
>>
>>

-- 
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: Object not found

2018-09-28 Thread mostwanted



On Friday, September 28, 2018 at 1:40:56 PM UTC+2, mostwanted wrote:
>
> Hey Matthew, i have another view called viewPurchases that has a link that 
> sends my args to the client_update controller, i didnt include it in the 
> above code i thought is wasn't important it looks like this:
>
> *viewPurchases VIEW*
> 
> 
> Client Surname
> Booked Room
> Reservation / Booking Status
> Booked By
> {{for purchase in purchase:}}
> 
> 
> 
> {{=A(purchase.Surname, _href=URL('Client_Update', args=purchase.id))}} 
> {{=purchase.Name}}
> 
> 
> 
>  Room {{=purchase.Items.Item}}
> 
> 
> {{=purchase.Booked_By.first_name}} {{=purchase.Serviced_By.last_name}}
>
> 
> 
> {{pass}}
> 
>
> *viewPurchases CONTROLLER*
>
>
>
>
> *def viewPurchases():purchase=db(db.Customer).select(db.Customer.ALL, 
> orderby=db.Customer.Surname)return locals()*
>
> On Friday, September 28, 2018 at 12:13:04 PM UTC+2, Matthew J Watts wrote:
>>
>> Looks like you are not sending/recieving your args properly (
>>
>> For example You need to send args=Customer.id ,  from a button or 
>> redirect for example
>>
>> You then need to request the Customer.id in the 'Client_Update' function
>>
>> So you'd need 
>>
>> def Client_Update():
>> client=request.args(0,cast=int)
>>
>>
>>
>>
>>
>>
>> On Friday, September 28, 2018 at 8:04:57 AM UTC+2, mostwanted wrote:
>>>
>>> I have 3 table, Items, Client & Purchases, the Client table stores the 
>>> details of the customer, the items table has a list of sold items and 
>>> Purchases stores what the customer purchased on what day. I have a function 
>>> in the controller that allows the editing of Customer and Purchases details 
>>> in one view by clicking on the owner's name but i keep getting the *Object 
>>> not found *message caused an attempt at opening an edit for the 
>>> Purchases table, what am i doing wrong, is there a better way of doing this?
>>>
>>> Regards
>>>
>>> Mostwanted
>>>
>>> *MODELS*
>>> db.define_table('Customer',
>>> Field('Name', requires=IS_NOT_EMPTY(), label=SPAN('First 
>>> Name', _style="font-weight: bold;")),
>>> Field('Surname', requires=IS_NOT_EMPTY(), label=SPAN('Last 
>>> Name', _style="font-weight: bold;")),
>>> Field('ID_Number', requirs=IS_NOT_EMPTY(), 
>>> label=SPAN('Client 
>>> ID No', _style="font-weight: bold;")),
>>> Field('Company', requirs=IS_NOT_EMPTY(), label=SPAN(
>>> 'Company', _style="font-weight: bold;")),format='%(Surname)s ),
>>>
>>> db.define_table('Items',
>>> Field('Item', requires=IS_NOT_EMPTY()),
>>> format='%(Item)s')
>>>
>>> db.define_table('Purchases',
>>> Field('Client', 'reference Customer', label=SPAN('Client', 
>>> _style="font-weight: bold")),
>>> Field('Item', 'reference Item', unique=True, 
>>> label=SPAN('Item Purchased', _style="font-weight: bold;")),
>>> Field('Booking_Date', 'datetime', default=request.now, 
>>> writable=False, label=SPAN('Date of Registration', _style="font-weight: 
>>> bold;")),
>>> Field('Serviced_By', 'reference auth_user', 
>>> default=auth.user_id, writable=False, label=SPAN('Serviced By', 
>>> _style="font-weight: bold;")))
>>>
>>>
>>> *CONTROLLER*
>>> def Client_Update():
>>> client=db.Customer(request.args(0))
>>> clientDetails=SQLFORM(db.Customer, client.id, deletable=True, showid
>>> =False).process()
>>> addRooms=SQLFORM(db.Purchases, client.id, deletable=True, showid=
>>> False).process()
>>> return locals()
>>>
>>> *VIEW*
>>> {{extend 'layout.html'}}
>>>
>>> 
>>> VIEW & UPDATE CLIENT DETAILS
>>> {{=clientDetails}}
>>> 
>>> VIEW & UPDATE CLIENT PURCHASES
>>> {{=addRooms}}
>>> 
>>> {{pass}}
>>>
>>>
>>>

-- 
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] Reading information from an external CSV file through SQLFORM.smartgrid

2018-10-03 Thread mostwanted
Is it possible for me read information from a CSV file saved somewhere in 
my computer into my application through SQLFORM.smartgrid without uploading 
the CSV file into the application?

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: Reading information from an external CSV file through SQLFORM.smartgrid

2018-10-03 Thread mostwanted
I like the first suggestion* (You could import into a 
"sqlite:memory."), *how does it work though???

On Wednesday, October 3, 2018 at 4:13:17 PM UTC+2, Anthony wrote:
>
> Do you mean without importing the CSV data into a database? If so, then 
> no. You could import into a "sqlite:memory" database (though that will load 
> the data on every request, as the in memory database will disappear at the 
> end of each request). Alternatively, maybe just load the data into a 
> temporary db table and truncate the table when you need to start fresh.
>
> Anthony
>
> On Wednesday, October 3, 2018 at 3:15:36 AM UTC-4, mostwanted wrote:
>>
>> Is it possible for me read information from a CSV file saved somewhere in 
>> my computer into my application through SQLFORM.smartgrid without uploading 
>> the CSV file into the application?
>>
>> 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: Reading information from an external CSV file through SQLFORM.smartgrid

2018-10-03 Thread mostwanted
Yes it is Dave

On Wednesday, October 3, 2018 at 11:10:53 PM UTC+2, Dave S wrote:
>
>
>
> On Wednesday, October 3, 2018 at 12:15:36 AM UTC-7, mostwanted wrote:
>>
>> Is it possible for me read information from a CSV file saved somewhere in 
>> my computer into my application through SQLFORM.smartgrid without uploading 
>> the CSV file into the application?
>>
>> Regards
>>
>> Mostwanted
>>
>
> Just checking -- this is a server-side CSV file?
>
> /dps
>  
>

-- 
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: Reading information from an external CSV file through SQLFORM.smartgrid

2018-10-04 Thread mostwanted
Thanks Tony

On Thursday, October 4, 2018 at 3:31:11 PM UTC+2, Anthony wrote:
>
> Its just a standard DAL instance, specifying a SQLite memory database 
> (which will only live as long as the request):
>
> temp_db = DAL('sqlite:memory')
> temp_db.define_table('my_csv_temp_table', ...)
> temp_db.my_csv_temp_table.import_from_csv_file(...)
> grid = SQLFORM.smartgrid(temp_db.my_csv_temp_table)
>
> Anthony
>
> On Wednesday, October 3, 2018 at 10:20:00 AM UTC-4, mostwanted wrote:
>>
>> I like the first suggestion* (You could import into a 
>> "sqlite:memory."), *how does it work though???
>>
>> On Wednesday, October 3, 2018 at 4:13:17 PM UTC+2, Anthony wrote:
>>>
>>> Do you mean without importing the CSV data into a database? If so, then 
>>> no. You could import into a "sqlite:memory" database (though that will load 
>>> the data on every request, as the in memory database will disappear at the 
>>> end of each request). Alternatively, maybe just load the data into a 
>>> temporary db table and truncate the table when you need to start fresh.
>>>
>>> Anthony
>>>
>>> On Wednesday, October 3, 2018 at 3:15:36 AM UTC-4, mostwanted wrote:
>>>>
>>>> Is it possible for me read information from a CSV file saved somewhere 
>>>> in my computer into my application through SQLFORM.smartgrid without 
>>>> uploading the CSV file into the application?
>>>>
>>>> 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] How to hide the the SQLFORM.grid results until a search is done & returns something

2018-10-08 Thread mostwanted
I was wondering if there isn't a way to hide the SQLFORM.grid results until 
a search returns results, I was looking at Anthony & Mandar Vaze's 
(2011-2012) thread but it was about hiding the* # records found *message
* https://groups.google.com/forum/#!newtopic/web2py/web2py/9_Lz5VWb80A 
<https://groups.google.com/forum/#!newtopic/web2py/web2py/9_Lz5VWb80A>*
I was hoping there was a way to also hide the results and only display them 
when a search returns something.

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] How to set my menu to hamburger menu for tablet devices when they open my webapp

2018-10-12 Thread mostwanted
Can anyone assist me in figuring out how to set my menu to hamburger menu 
for tablet devices when they open my app, mobile devices are able to 
achieve that without any problems but its not the case with tablet devices. 
i have been going through the web2py-boostrap3.CSS file hoping to see 
something but I came out blank, maybe i don't know what i am looking for.

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: How to set my menu to hamburger menu for tablet devices when they open my webapp

2018-10-12 Thread mostwanted
Thanks Dave

On Friday, October 12, 2018 at 9:37:07 PM UTC+2, Dave S wrote:
>
>
>
> On Friday, October 12, 2018 at 3:06:58 AM UTC-7, mostwanted wrote:
>>
>> Can anyone assist me in figuring out how to set my menu to hamburger menu 
>> for tablet devices when they open my app, mobile devices are able to 
>> achieve that without any problems but its not the case with tablet devices. 
>> i have been going through the web2py-boostrap3.CSS file hoping to see 
>> something but I came out blank, maybe i don't know what i am looking for.
>>
>> Regards:
>>
>> Mostwanted
>>
>
> You're looking for something like window.width; a desktop browser will 
> display the hamburger menu if you drag the window narrower.
>
> /dps
>  
>

-- 
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] Infringement issues over creating licenced sofware with web2py

2018-10-17 Thread mostwanted
Hi guys, i wanna know if there would be any infringement issues if i 
created licensed standalone software using the web2py framework. Will i be 
overstepping some copyright laws which will make me liable to be penalized??

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: Infringement issues over creating licenced sofware with web2py

2018-10-18 Thread mostwanted
hahahaha thanks Leonel, i wont be a "dick"thanks for the clarification.

On Thursday, October 18, 2018 at 4:32:01 PM UTC+2, Leonel Câmara wrote:
>
> No you don't need to worry, web2py is LGPL licensed which means that you 
> may:
>
> - redistribute web2py with your apps (including official web2py binary 
> versions) 
> - release your applications which use official web2py libraries under any 
> license you wish 
> But you must: 
> - make clear in the documentation that your application uses web2py 
> - release any modification of the web2py libraries under the LGPLv3 license
>
> If you don't distribute your application (e.g. SaaS) you basically don't 
> even need to care about any of this unless you make changes to web2py which 
> you would be a dick not to give back. Don't be a dick.
>
>

-- 
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] My SQLFORM() is not saving anything after putting my APP online

2018-10-19 Thread mostwanted
Before taking my application online i was able to save information via my 
SQLFORM(db.logs) but after putting it online It does not save anything!

*This is the controller code:*
def index():
form=SQLFORM(db.vehicleLogging)
if form.accepts(request.vars, session):
response.flash = T("Record Made")
elif form.errors:
response.flash = T('Error')
return locals()

*I am using web2py version **2.17.2:* I am mentioning this but i don't know 
if it will help.

Is there something wrong with my above code?

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.


Re: [web2py] My SQLFORM() is not saving anything after putting my APP online

2018-10-20 Thread mostwanted
Thanks

On Friday, October 19, 2018 at 3:38:04 PM UTC+2, sandeep patel wrote:
>
> Try this
> def index():
> form=SQLFORM(db.vehicleLogging)
> if form.process().accepted:
> response.flash = T("Record Made")
> elif form.errors:
> response.flash = T('Error')
> return locals()
>
> In *form.process().**accepted *does not need request.vars and session 
> arguments.
>
> Best/
> sp
>
> On Fri, Oct 19, 2018 at 6:27 PM mostwanted  > wrote:
>
>> Before taking my application online i was able to save information via my 
>> SQLFORM(db.logs) but after putting it online It does not save anything!
>>
>> *This is the controller code:*
>> def index():
>> form=SQLFORM(db.vehicleLogging)
>> if form.accepts(request.vars, session):
>> response.flash = T("Record Made")
>> elif form.errors:
>> response.flash = T('Error')
>> return locals()
>>
>> *I am using web2py version **2.17.2:* I am mentioning this but i don't 
>> know if it will help.
>>
>> Is there something wrong with my above code?
>>
>> 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.


[web2py] Making a calculation of two database fields set a value for the third database field

2018-10-20 Thread mostwanted
I was hoping to get assistance here, i have a database table called* 
(logging)* that has 3 fields, *(startingDistanceValue, endingDistanceValue 
and distanceTravelled)*, distanceTravelled is the difference between 
endingDistanceValue and startingDistanceValue, when I start my trip i enter 
startingDistanceValue & subit my form, when i arrive i update & edit my 
form by entering endingDistanceValue, what i want is that by entering 
endingDistanceValue then the distanceTravelled is calculated automatically 
and acquires its value automatically then i submit my form for saving. How 
can i achieve this in web2py?

*Model:*
db.define_table('logging',
Field('startingDistanceValue','integer', requires=
IS_NOT_EMPTY()),
Field('endingDistanceValue','integer', requires=IS_NOT_EMPTY
()),
    Field('distanceTravelled'))

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.


Re: [web2py] Making a calculation of two database fields set a value for the third database field

2018-10-20 Thread mostwanted
Its a charm, thanks alot

On Saturday, October 20, 2018 at 11:32:23 AM UTC+2, sandeep patel wrote:
>
> There are many ways to solve this problem.
> you can achieve by computed fields.
>
> #modal
> db.define_table('logging',
> Field('startingDistanceValue','integer', requires=
> IS_NOT_EMPTY(),default=0),
> Field('endingDistanceValue','integer', requires=
> IS_NOT_EMPTY(),default=0),
> Field('distanceTravelled',compute=lambda r: r[
> 'startingDistanVealue'] * r['endingDistanceValue'])))  
>
> Every time summited form distanceTravelled field calculated automatically.
>
> Best
> SP
>
> On Sat, Oct 20, 2018 at 2:46 PM mostwanted  > wrote:
>
>> I was hoping to get assistance here, i have a database table called* 
>> (logging)* that has 3 fields, *(startingDistanceValue, 
>> endingDistanceValue and distanceTravelled)*, distanceTravelled is the 
>> difference between endingDistanceValue and startingDistanceValue, when I 
>> start my trip i enter startingDistanceValue & subit my form, when i arrive 
>> i update & edit my form by entering endingDistanceValue, what i want is 
>> that by entering endingDistanceValue then the distanceTravelled is 
>> calculated automatically and acquires its value automatically then i submit 
>> my form for saving. How can i achieve this in web2py?
>>
>> *Model:*
>> db.define_table('logging',
>>     Field('startingDistanceValue','integer', requires=
>> IS_NOT_EMPTY()),
>> Field('endingDistanceValue','integer', requires=
>> IS_NOT_EMPTY()),
>> Field('distanceTravelled'))
>>
>> 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.


[web2py] How to get members of groups to view only what their group members post

2018-10-20 Thread mostwanted
I can get registered users to view only what they post and not what others 
post, below is the simple code i used. What i want now is how to get only 
members of groups to view only what their group members post and not 
members of other groups:

*MODEL:*
db.define_table('post',
Field('body', 'text', requires=IS_NOT_EMPTY(), label='What 
is on your mind'),
Field('posted_on', 'datetime', default=request.now, readable
=False, writable=False),
Field('posted_by', 'reference auth_user', default=auth.user.
id, readable=False, writable=False))


*CONTROLLER:*
@auth.requires_login()
def index():
form=SQLFORM(db.post)
if form.process().accepted:
response.flash=T('Entered')
return locals()

@auth.requires_login()
def details():
user=db.auth_user(auth.user_id)
if not user or not(user.id==auth.user_id): redirect(URL('index'))
details=db(db.post.posted_by==user.id).select(db.post.ALL)
return locals()

*VIEWS*

*index*
{{extend 'layout.html'}}

{{=form}}
{{pass}}

*details*:
{{extend 'layout.html'}}

{{for details in details:}}
Infomation: {{=details.body}}
Date: {{=details.posted_on}}
Poster: {{=details.posted_by.first_name}}

{{pass}}
 
How can I change my *details controller* to be able to achieve the above 
task?

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: How to get members of groups to view only what their group members post

2018-10-22 Thread mostwanted
Yes i am using group memberships in my Auth tables

On Monday, October 22, 2018 at 8:58:06 AM UTC+2, Dave S wrote:
>
>
>
> On Saturday, October 20, 2018 at 12:30:07 PM UTC-7, mostwanted wrote:
>>
>> I can get registered users to view only what they post and not what 
>> others post, below is the simple code i used. What i want now is how to get 
>> only members of groups to view only what their group members post and not 
>> members of other groups:
>>
>>
> Are you using group membership in your Auth tables?  See chapter 9 of the 
> book.
>  http://web2py.com/books/default/chapter/29/09/access-control#Authorization
> >
>
>  
>
>> *MODEL:*
>> db.define_table('post',
>> Field('body', 'text', requires=IS_NOT_EMPTY(), label='What 
>> is on your mind'),
>> Field('posted_on', 'datetime', default=request.now, 
>> readable=False, writable=False),
>> Field('posted_by', 'reference auth_user', default=auth.
>> user_id, readable=False, writable=False))
>>
>>
>> *CONTROLLER:*
>> @auth.requires_login()
>>
>
> replace this decorator (here and below) with
> @auth.requires_membership('groupIbelong2')
>
> (group membership isn't defined until the user logs in)
>
>  
>
>>
>> def index():
>> form=SQLFORM(db.post)
>> if form.process().accepted:
>> response.flash=T('Entered')
>> return locals()
>>
>> @auth.requires_login()
>> def details():
>> user=db.auth_user(auth.user_id)
>> if not user or not(user.id==auth.user_id): redirect(URL('index'))
>> details=db(db.post.posted_by==user.id).select(db.post.ALL)
>> return locals()
>>
>> *VIEWS*
>>
>> *index*
>> {{extend 'layout.html'}}
>>
>> {{=form}}
>> {{pass}}
>>
>> *details*:
>> {{extend 'layout.html'}}
>>
>> {{for details in details:}}
>> Infomation: {{=details.body}}
>> Date: {{=details.posted_on}}
>> Poster: {{=details.posted_by.first_name}}
>> 
>> {{pass}}
>>  
>> How can I change my *details controller* to be able to achieve the above 
>> task?
>>
>> Regards:
>>
>> Mostwanted
>>
>
> There are poster here with more group membership experience, if this 
> doesn't answer your question.
>
> /dps
>
>
>  
>

-- 
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] Creating a CSV backup for the database file in the app

2018-10-23 Thread mostwanted
I have a folder in my desktop that contains a CSV file that backs up 
information everytime something gets saved into the database. What i wanna 
know is how can I instead have this folder and CSV backup file saved in the 
app somewhere so that even if i relocate the application or take it online 
i don't have redefine the folder path or have it missing because the path 
was not defined correctly.

*CONTROLLER SAVING TO THE EXTERNAL CSV FILE:*
def index():
form=SQLFORM(db.Customer)
if form.accepts(request.vars, session):
customer=db(db.Customer).select(db.Customer.ALL)
#db.export_to_csv_file(open('C:/Users/me/Desktop/backup/backup.csv', 
'wb'))
customer.export_to_csv_file(open(
'C:/Folder1/Backup/Client_Bookings_Backup.csv', 'wb'))
response.flash = T("CLIENT BOOKED")
elif form.errors:
response.flash = T("BOOKING FAILED! Please observe the form!")
return locals()

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: Creating a CSV backup for the database file in the app

2018-10-24 Thread mostwanted
I am able to save some information with the code you gave but when i try 
read from that file i get back *None *values: Am i missing something???

*CONTROLLER FOR READING THE FILE:*
def viewInfo():
db = DAL('sqlite:memory')
db.define_table('Clients',
 Field('Name'),
 Field('Surname'))
backfile = os.path.join(request.folder, 'Client_Bookings_Backup.csv')
db.Clients.import_from_csv_file(open(backfile))
grid = SQLFORM.grid(db.Clients, args=[db.Clients], editable=False, 
deletable=False, user_signature=False)
return locals()
 Regards

Mostwanted

On Tuesday, October 23, 2018 at 10:11:55 PM UTC+2, Dave S wrote:
>
>
>
> On Tuesday, October 23, 2018 at 11:44:41 AM UTC-7, mostwanted wrote:
>>
>> I have a folder in my desktop that contains a CSV file that backs up 
>> information everytime something gets saved into the database. What i wanna 
>> know is how can I instead have this folder and CSV backup file saved in the 
>> app somewhere so that even if i relocate the application or take it online 
>> i don't have redefine the folder path or have it missing because the path 
>> was not defined correctly.
>>
>>
> Something like the change below:
>  
>
>> *CONTROLLER SAVING TO THE EXTERNAL CSV FILE:*
>> def index():
>> form=SQLFORM(db.Customer)
>> if form.accepts(request.vars, session):
>> customer=db(db.Customer).select(db.Customer.ALL)
>>
>  
>
>> backfile = os.path.join(request.folder, '
>> Client_Bookings_Backup.csv')
>> customer.export_to_csv_file(open(backfile, 'wb'))
>>
>  
>
>>
>> response.flash = T("CLIENT BOOKED")
>> elif form.errors:
>> response.flash = T("BOOKING FAILED! Please observe the form!")
>> return locals()
>>
>> Regards:
>>
>> Mostwanted
>>
>
> Good luck!
>
> Dave "somewhat wanted"
> /dps
>  
>

-- 
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: Creating a CSV backup for the database file in the app

2018-10-24 Thread mostwanted
I got the answer here:
https://stackoverflow.com/questions/52976228/accessing-and-importing-data-from-a-private-csv-file-using-os-path-join/52981326#52981326

Regards: 

Mostwanted

On Wednesday, October 24, 2018 at 3:01:52 PM UTC+2, mostwanted wrote:
>
> I am able to save some information with the code you gave but when i try 
> read from that file i get back *None *values: Am i missing something???
>
> *CONTROLLER FOR READING THE FILE:*
> def viewInfo():
> db = DAL('sqlite:memory')
> db.define_table('Clients',
>  Field('Name'),
>  Field('Surname'))
> backfile = os.path.join(request.folder,'private', 
> 'Client_Bookings_Backup.csv')
> db.Clients.import_from_csv_file(open(backfile))
> grid = SQLFORM.grid(db.Clients, args=[db.Clients], editable=False, 
> deletable=False, user_signature=False)
> return locals()
>  Regards
>
> Mostwanted
>
> On Tuesday, October 23, 2018 at 10:11:55 PM UTC+2, Dave S wrote:
>>
>>
>>
>> On Tuesday, October 23, 2018 at 11:44:41 AM UTC-7, mostwanted wrote:
>>>
>>> I have a folder in my desktop that contains a CSV file that backs up 
>>> information everytime something gets saved into the database. What i wanna 
>>> know is how can I instead have this folder and CSV backup file saved in the 
>>> app somewhere so that even if i relocate the application or take it online 
>>> i don't have redefine the folder path or have it missing because the path 
>>> was not defined correctly.
>>>
>>>
>> Something like the change below:
>>  
>>
>>> *CONTROLLER SAVING TO THE EXTERNAL CSV FILE:*
>>> def index():
>>> form=SQLFORM(db.Customer)
>>> if form.accepts(request.vars, session):
>>> customer=db(db.Customer).select(db.Customer.ALL)
>>>
>>  
>>
>>> backfile = os.path.join(request.folder, '
>>> Client_Bookings_Backup.csv')
>>> customer.export_to_csv_file(open(backfile, 'wb'))
>>>
>>  
>>
>>>
>>> response.flash = T("CLIENT BOOKED")
>>> elif form.errors:
>>> response.flash = T("BOOKING FAILED! Please observe the form!")
>>> return locals()
>>>
>>> Regards:
>>>
>>> Mostwanted
>>>
>>
>> Good luck!
>>
>> Dave "somewhat wanted"
>> /dps
>>  
>>
>

-- 
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: reference gives error table company has no column named....

2018-10-24 Thread mostwanted
When i do all this it gives me error saying table Customer exists!

On Friday, August 31, 2018 at 2:53:18 AM UTC+2, Anthony wrote:
>
> fake_migrate makes pyDAL think the model definition reflects the actual 
> schema in the database. Presumably the field in question does not actually 
> exist in the database. If that's the only field missing from the database, 
> do the following:
>
>1. Delete the *.table file for this table in the /databases folder.
>2. Comment out the line defining the missing field.
>3. Leave fake_migrate=True and run one request -- that will re-create 
>the *.table file, but without the missing field, so pyDAL will know to add 
>the field in the next real migration.
>4. Remove fake_migrate everywhere -- you don't need it unless you are 
>correcting a migration problem.
>5. Set migrate=True.
>6. Remove the comment from #2 above and run another request -- pyDAL 
>will now create the missing field.
>
> Anthony
>
> On Thursday, August 30, 2018 at 4:13:02 PM UTC-4, mostwanted wrote:
>>
>> I have a database which i recently updated by adding a new table called 
>> *tlamelo*, the new table is referenced in one of the old tables called 
>> *company, 
>> *when i try to save data into the table *company* i get the error bellow 
>> *(table 
>> company has no column named tlamelo)!* I do not understand why i am 
>> getting this error, i am not sure if it has anything to do with the 
>> fake_migrate=True
>> or not! Can anyone please help me, thank you.
>>
>>  table company has no column named 
>> tlamelo
>>
>> This is the code for my table tlamelo
>> db.define_table('tlamelo',
>> Field('leina_la_tlamelo', requires=IS_NOT_EMPTY()),
>> format='%(leina_la_tlamelo)s', migrate=False, 
>> fake_migrate=True)
>>
>> This is the code for my table company
>> db.define_table('company',
>> Field('logo', 'upload'),
>> Field('company_name', requires=IS_NOT_EMPTY()),
>> Field('services', 'reference services'),
>> Field('tlamelo', 'reference tlamelo'), #tlamelo is 
>> referenced here
>> Field('product', 'reference product'),
>> Field('tel', requires=IS_NOT_EMPTY()),
>> Field('email', requires=IS_NOT_EMPTY()),
>> Field('fax', requires=IS_NOT_EMPTY()),
>> Field('cell', requires=IS_NOT_EMPTY()),
>> Field('facebook', requires=IS_NOT_EMPTY()),
>> Field('twitter', requires=IS_NOT_EMPTY()),
>> Field('website', requires=IS_NOT_EMPTY()),
>> Field('postal_address', requires=IS_NOT_EMPTY()),
>> Field('located_at', requires=IS_NOT_EMPTY()), migrate=
>> False, fake_migrate=True)
>>
>>
>>

-- 
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: reference gives error table company has no column named....

2018-10-25 Thread mostwanted
If  i delete it from the database folder and refresh my browser with the 
table using the same name will it not throw the *table exists *error? 

On Thursday, October 25, 2018 at 11:13:31 AM UTC+2, Lovedie JC wrote:
>
> I used to get that. Delete the db from the database  folder or rename it 
> brhe refresh or restart web2py.
>
> On Thu, 25 Oct 2018, 09:36 mostwanted > 
> wrote:
>
>> When i do all this it gives me error saying table Customer exists!
>>
>> On Friday, August 31, 2018 at 2:53:18 AM UTC+2, Anthony wrote:
>>>
>>> fake_migrate makes pyDAL think the model definition reflects the actual 
>>> schema in the database. Presumably the field in question does not actually 
>>> exist in the database. If that's the only field missing from the database, 
>>> do the following:
>>>
>>>1. Delete the *.table file for this table in the /databases folder.
>>>2. Comment out the line defining the missing field.
>>>3. Leave fake_migrate=True and run one request -- that will 
>>>re-create the *.table file, but without the missing field, so pyDAL will 
>>>know to add the field in the next real migration.
>>>4. Remove fake_migrate everywhere -- you don't need it unless you 
>>>are correcting a migration problem.
>>>5. Set migrate=True.
>>>    6. Remove the comment from #2 above and run another request -- pyDAL 
>>>will now create the missing field.
>>>
>>> Anthony
>>>
>>> On Thursday, August 30, 2018 at 4:13:02 PM UTC-4, mostwanted wrote:
>>>>
>>>> I have a database which i recently updated by adding a new table called 
>>>> *tlamelo*, the new table is referenced in one of the old tables called 
>>>> *company, 
>>>> *when i try to save data into the table *company* i get the error 
>>>> bellow *(table company has no column named tlamelo)!* I do not 
>>>> understand why i am getting this error, i am not sure if it has anything 
>>>> to 
>>>> do with the 
>>>> fake_migrate=True
>>>> or not! Can anyone please help me, thank you.
>>>>
>>>>  table company has no column named 
>>>> tlamelo
>>>>
>>>> This is the code for my table tlamelo
>>>> db.define_table('tlamelo',
>>>> Field('leina_la_tlamelo', requires=IS_NOT_EMPTY()),
>>>> format='%(leina_la_tlamelo)s', migrate=False, 
>>>> fake_migrate=True)
>>>>
>>>> This is the code for my table company
>>>> db.define_table('company',
>>>> Field('logo', 'upload'),
>>>> Field('company_name', requires=IS_NOT_EMPTY()),
>>>> Field('services', 'reference services'),
>>>> Field('tlamelo', 'reference tlamelo'), #tlamelo is 
>>>> referenced here
>>>> Field('product', 'reference product'),
>>>> Field('tel', requires=IS_NOT_EMPTY()),
>>>> Field('email', requires=IS_NOT_EMPTY()),
>>>> Field('fax', requires=IS_NOT_EMPTY()),
>>>> Field('cell', requires=IS_NOT_EMPTY()),
>>>> Field('facebook', requires=IS_NOT_EMPTY()),
>>>> Field('twitter', requires=IS_NOT_EMPTY()),
>>>> Field('website', requires=IS_NOT_EMPTY()),
>>>> Field('postal_address', requires=IS_NOT_EMPTY()),
>>>> Field('located_at', requires=IS_NOT_EMPTY()), migrate=
>>>> False, fake_migrate=True)
>>>>
>>>>
>>>> -- 
>> 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] Re: reference gives error table company has no column named....

2018-10-25 Thread mostwanted
Thanks Lovedie


On Thursday, October 25, 2018 at 1:27:08 PM UTC+2, Lovedie JC wrote:
>
> I noticed on my part,if I can remember, that the error comes because you 
> are recreating another table. That's why you can rename are restart web2py 
> and see if it works.
>
> On Thu, 25 Oct 2018, 13:52 mostwanted > 
> wrote:
>
>> If  i delete it from the database folder and refresh my browser with the 
>> table using the same name will it not throw the *table exists *error? 
>>
>> On Thursday, October 25, 2018 at 11:13:31 AM UTC+2, Lovedie JC wrote:
>>>
>>> I used to get that. Delete the db from the database  folder or rename it 
>>> brhe refresh or restart web2py.
>>>
>>> On Thu, 25 Oct 2018, 09:36 mostwanted  wrote:
>>>
>>>> When i do all this it gives me error saying table Customer exists!
>>>>
>>>> On Friday, August 31, 2018 at 2:53:18 AM UTC+2, Anthony wrote:
>>>>>
>>>>> fake_migrate makes pyDAL think the model definition reflects the 
>>>>> actual schema in the database. Presumably the field in question does not 
>>>>> actually exist in the database. If that's the only field missing from the 
>>>>> database, do the following:
>>>>>
>>>>>1. Delete the *.table file for this table in the /databases folder.
>>>>>2. Comment out the line defining the missing field.
>>>>>3. Leave fake_migrate=True and run one request -- that will 
>>>>>re-create the *.table file, but without the missing field, so pyDAL 
>>>>> will 
>>>>>know to add the field in the next real migration.
>>>>>4. Remove fake_migrate everywhere -- you don't need it unless you 
>>>>>are correcting a migration problem.
>>>>>5. Set migrate=True.
>>>>>6. Remove the comment from #2 above and run another request -- 
>>>>>pyDAL will now create the missing field.
>>>>>
>>>>> Anthony
>>>>>
>>>>> On Thursday, August 30, 2018 at 4:13:02 PM UTC-4, mostwanted wrote:
>>>>>>
>>>>>> I have a database which i recently updated by adding a new table 
>>>>>> called *tlamelo*, the new table is referenced in one of the old 
>>>>>> tables called *company, *when i try to save data into the table 
>>>>>> *company* i get the error bellow *(table company has no column named 
>>>>>> tlamelo)!* I do not understand why i am getting this error, i am not 
>>>>>> sure if it has anything to do with the 
>>>>>> fake_migrate=True
>>>>>> or not! Can anyone please help me, thank you.
>>>>>>
>>>>>>  table company has no column named 
>>>>>> tlamelo
>>>>>>
>>>>>> This is the code for my table tlamelo
>>>>>> db.define_table('tlamelo',
>>>>>> Field('leina_la_tlamelo', requires=IS_NOT_EMPTY()),
>>>>>> format='%(leina_la_tlamelo)s', migrate=False, 
>>>>>> fake_migrate=True)
>>>>>>
>>>>>> This is the code for my table company
>>>>>> db.define_table('company',
>>>>>> Field('logo', 'upload'),
>>>>>> Field('company_name', requires=IS_NOT_EMPTY()),
>>>>>> Field('services', 'reference services'),
>>>>>> Field('tlamelo', 'reference tlamelo'), #tlamelo is 
>>>>>> referenced here
>>>>>> Field('product', 'reference product'),
>>>>>> Field('tel', requires=IS_NOT_EMPTY()),
>>>>>> Field('email', requires=IS_NOT_EMPTY()),
>>>>>> Field('fax', requires=IS_NOT_EMPTY()),
>>>>>> Field('cell', requires=IS_NOT_EMPTY()),
>>>>>> Field('facebook', requires=IS_NOT_EMPTY()),
>>>>>> Field('twitter', requires=IS_NOT_EMPTY()),
>>>>>> Field('website', requires=IS_NOT_EMPTY()),
>>>>>> Field('postal_address', requires=IS_NOT_EMPTY()),
>>>>>>   

[web2py] Re: mobile friendly login page

2018-10-25 Thread mostwanted
The attachment link gives *error 404*

On Thursday, October 25, 2018 at 2:06:15 PM UTC+2, lbjc...@gmail.com wrote:
>
> The default login page on the desktop looks absolutely good. The mobile 
> page,see attached needs some workup. Is there a way to align the buttons?
> Regards
>

-- 
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] How to strip away and get rid of (… days, 0:00:00) from a value acquired from a date calculation

2018-10-25 Thread mostwanted
 

I have 4 values that have to be calculated together to set a default value 
for the fifth value, 2 of the 4 values are date values but the problem is 
that calculating their difference leaves *days, 0:00:00* as part of the 
answer but i only want the value number they give, is there a way to strip 
away the *days, 0:00:00* from the date calculation answer so i could use 
the remaining value in my calculation and get the answer i want?


*Example Code*


*MODEL:*








*db.define_table('hotels',Field('Hotel'),
Field('Bookin', 'date'),Field('Bookout', 'date'),
Field('days', compute=lambda r: r['Bookout']-r['Bookin']),
Field('guests', 'integer'),Field('price', compute=lambda r: 
r['days']*r['guests']*650))*

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.


Re: [web2py] How to strip away and get rid of (… days, 0:00:00) from a value acquired from a date calculation

2018-10-25 Thread mostwanted
It works SP, thank you.

Regards:

Mostwanted

On Thursday, October 25, 2018 at 7:17:03 PM UTC+2, sandeep patel wrote:
>
>
>
>
>
>
>
>
> *You can directly count days from date type.this belongs to datetime 
> class.db.define_table('hotels',Field('Hotel'),
> Field('Bookin', 'date'),Field('Bookout', 'date'),
> Field('days', compute=lambda r: (r['Bookout']-r['Bookin']).days),  
>   Field('guests', 'integer'),    Field('price', compute=lambda r: 
> r['days']*r['guests']*650))Let me know if this will work for you.ThanksSP*
>
> On Thu, Oct 25, 2018 at 9:50 PM mostwanted  > wrote:
>
>> I have 4 values that have to be calculated together to set a default 
>> value for the fifth value, 2 of the 4 values are date values but the 
>> problem is that calculating their difference leaves *days, 0:00:00* as 
>> part of the answer but i only want the value number they give, is there a 
>> way to strip away the *days, 0:00:00* from the date calculation answer 
>> so i could use the remaining value in my calculation and get the answer i 
>> want?
>>
>>
>> *Example Code*
>>
>>
>> *MODEL:*
>>
>>
>>
>>
>>
>>
>>
>>
>> *db.define_table('hotels',Field('Hotel'),
>> Field('Bookin', 'date'),Field('Bookout', 'date'),
>> Field('days', compute=lambda r: r['Bookout']-r['Bookin']),
>> Field('guests', 'integer'),Field('price', compute=lambda r: 
>> r['days']*r['guests']*650))*
>>
>> 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.


[web2py] Unable to update database entry after compute=lambda r: calculation of some field values in the DB

2018-10-25 Thread mostwanted
I was able to calculate and set some values in the database with 
compute=lambda r: but when i try to update those entries with SQLFORM() i 
get an error in the form and nothing is saved! What could be causing this 
and how can i fix it?

*MODEL:*
db.define_table('ClientDetails', 
Field('CheckIn', 'date', label=SPAN('Check-In Date', 
_style="font-weight: 
bold;")),
Field('CheckOut', 'date', label=SPAN('Check-Out Date', 
_style="font-weight: bold;")),
Field('Days', compute=lambda r: (r['CheckOut']-r['CheckIn'
]).days),
Field('Amount', compute=lambda r: r['Days']*r[
'Number_of_Guests']*650))

*UPDATE CONTROLLER:*
def clientUpdate():
details=db.ClientDetails(request.args(0, cast=int))
form=SQLFORM(db.ClientDetails, details.id, deletable=True, showid=False
).process()
return locals()


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: Unable to update database entry after compute=lambda r: calculation of some field values in the DB

2018-10-25 Thread mostwanted
With this one there was no error traceback, the form just failed to submit 
showed a message that read *Error in form, please check it out *and i do 
have a field Number_of_Guests i just didnt include it coz i thought i was 
minimizing the whole code to show what could the root cause of the problem. 
When i remove the *Days *and* Amount *fields I am able to update the form 
but when put them back it gives an error!

On Friday, October 26, 2018 at 12:13:55 AM UTC+2, 黄祥 wrote:
>
> pls show the error traceback, it's hard to know what the root cause.
> just a quick analyze (guess), perhaps it's no Number_of_Guests field in 
> your table definition, so it can't be calculated
>
> 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: Unable to update database entry after compute=lambda r: calculation of some field values in the DB

2018-10-26 Thread mostwanted
Hey SP, i dont think the problem was the code itself, there must have been 
something wrong with the version of web2py i had implemented my application 
on because when i switched to version 2.17.2 that problem disappeard, so i 
just assumed the problem was with the previous version of web2py i was 
using.

Regards

Mostwanted

On Friday, October 26, 2018 at 7:20:22 AM UTC+2, sandeep patel wrote:
>
> I think there is a problem in field type in Days because the default is a 
> string so days have a string value, you are multiplying string with an 
> integer in the computed field.
>
> # 1
> db.define_table('ClientDetails', 
> Field('CheckIn', 'date', label=SPAN('Check-In Date',
>  _style="font-weight: bold;")),
> Field('CheckOut', 'date', label=SPAN('Check-Out Date',
>  _style="font-weight: bold;")),
> Field('Days', compute=lambda r: (r['CheckOut']-r['CheckIn'
> ]).days),
> Field('Amount', compute=lambda r: int(r['Days'])*int(r[
> 'Number_of_Guests'])*650))  
>
> # 2
> db.define_table('ClientDetails', 
> Field('CheckIn', 'date', label=SPAN('Check-In Date',
>  _style="font-weight: bold;")),
> Field('CheckOut', 'date', label=SPAN('Check-Out Date',
>  _style="font-weight: bold;")),
> Field('Days', compute=lambda r: (r['CheckOut']-r['CheckIn'
> ]).days),
> Field('Amount', compute=lambda r: ((r['CheckOut']-r[
> 'CheckIn']).days)*int(r['Number_of_Guests'])*650))  
>
> Let me know this will work for you.
>
> Thanks
> SP
>
> On Fri, Oct 26, 2018 at 10:27 AM mostwanted  > wrote:
>
>> With this one there was no error traceback, the form just failed to 
>> submit showed a message that read *Error in form, please check it out *and 
>> i do have a field Number_of_Guests i just didnt include it coz i thought i 
>> was minimizing the whole code to show what could the root cause of the 
>> problem. When i remove the *Days *and* Amount *fields I am able to 
>> update the form but when put them back it gives an error!
>>
>> On Friday, October 26, 2018 at 12:13:55 AM UTC+2, 黄祥 wrote:
>>>
>>> pls show the error traceback, it's hard to know what the root cause.
>>> just a quick analyze (guess), perhaps it's no Number_of_Guests field in 
>>> your table definition, so it can't be calculated
>>>
>>> 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+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.


[web2py] Selecting a single item's entity with $('').clicking(function(){}

2018-10-31 Thread mostwanted
I am trying to create a simple point of sale system but i am having a hard 
time selecting an items, their prices and adding them up in a selected DIV. 
I am not doing something right, could someone please guide me?

*VIEW CODE:*








































*PRODUCTS FOR SALE  
  {{for product in products:}}{{=product.product_name}} | {{=A('Update', _class="update", 
_id="update", _href=URL('productUpdate', args=product.id 
<http://product.id>))}}$(function(){$(".itemProduct").each(function() 
{$(this).click(function(e) 
{$("#message").hide();$('#makeSales').html("<table><tr> 
<td>{{=product.product_name}}</td> <td><input type='text' size='5' 
placeholder='Quantity' class='num1 key'></td><td><div class='price' 
id='price'></div></td> <td><div class='sum'></div></td> </tr></table>");
$(".sum").text({{=product.price}});
$("#price").text({{=product.price}});$(".key").keyup(function() {  
  var $num1 = ($.trim($(".num1").val()) != "" && 
!isNaN($(".num1").val())) ? parseFloat($(".num1").val()) : 1;var 
$price=($.trim($("#price").html()) != "" && !isNaN($("#price").html())) ? 
parseFloat($("#price").html()) : {{=product.price}};
$("#price").text($price);var $totalPrice=parseFloat($num1 * 
$price);$(".sum").text($totalPrice);
});e.preventDefault();});});});SALES EMPTY!*
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: Selecting a single item's entity with $('').clicking(function(){}

2018-11-02 Thread mostwanted
I don't know where to begin Dave, its difficult to explain,maybe the 
problem is what i am trying achieve, give me a few days to work on this 
maybe I will come back with a proper question that's clear.
Thanks.

On Wednesday, October 31, 2018 at 10:43:38 PM UTC+2, Dave S wrote:
>
>
>
> On Wednesday, October 31, 2018 at 1:45:16 AM UTC-7, mostwanted wrote:
>>
>> I am trying to create a simple point of sale system but i am having a 
>> hard time selecting an items, their prices and adding them up in a selected 
>> DIV. I am not doing something right, could someone please guide me?
>>
>
> What happens, and where does that not match what you expect?
>
> /dps
>  
>
>>
>> *VIEW CODE:*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *
>> PRODUCTS FOR SALE> class="style-head"/>{{for product in products:}}   > class="item"> {{=product.product_name}} 
>> | {{=A('Update', _class="update", 
>> _id="update", _href=URL('productUpdate', args=product.id 
>> <http://product.id>))}}> type="text/javascript">$(function(){$(".itemProduct").each(function() 
>> {$(this).click(function(e) 
>> {$("#message").hide();$('#makeSales').html("<table><tr> 
>> <td>{{=product.product_name}}</td> <td><input type='text' size='5' 
>> placeholder='Quantity' class='num1 key'></td><td><div class='price' 
>> id='price'></div></td> <td><div class='sum'></div></td> </tr></table>");
>> $(".sum").text({{=product.price}});
>> $("#price").text({{=product.price}});$(".key").keyup(function() {  
>>   var $num1 = ($.trim($(".num1").val()) != "" && 
>> !isNaN($(".num1").val())) ? parseFloat($(".num1").val()) : 1;var 
>> $price=($.trim($("#price").html()) != "" && !isNaN($("#price").html())) ? 
>> parseFloat($("#price").html()) : {{=product.price}};
>> $("#price").text($price);var $totalPrice=parseFloat($num1 * 
>> $price);$(".sum").text($totalPrice);
>> });e.preventDefault();});});});> id="message">SALES EMPTY!*
>> 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] Glyphicons still not showing in version 2.17.1-stable

2018-11-07 Thread mostwanted
Was a solution ever provided/created for the not appearing glyphicons? 
Massimo promised a solutions to this last year (2017): 
https://groups.google.com/forum/#!msg/web2py/CSA-p4OSKM0/mziFoZ3KBQAJ;context-place=topic/web2py/Eii2yOpd_TU

Whats the way around this problem?

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] Request for direction to benchmark

2018-11-07 Thread mostwanted
Guys i am having a really hard time making a point of sale system with 
web2py, i have worked on the UI but I cant get it to make any sales at all. 
Has a point of sale system ever been made with web2py, if there is where 
can i find an example? Or if anyone is interested in assisting me with mine 
i will be more than willing to send you what i have done to help me execute 
sales and save them.

Thank you.

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: Request for direction to benchmark

2018-11-07 Thread mostwanted
Hey Stifan, i did look at it but id dint quite find what i was looking for 
but thanks for the suggestion.

On Thursday, November 8, 2018 at 1:28:30 AM UTC+2, 黄祥 wrote:
>
> perhaps you can check on web2py appliances, there are some examples of that
> ref:
> https://github.com/mdipierro/web2py-appliances/
>
> 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: Request for direction to benchmark

2018-11-08 Thread mostwanted
I think you are right, i complicated the UI from the jump now i cant finish 
it, I should lay a more flexible foundation.

On Thursday, November 8, 2018 at 10:19:39 AM UTC+2, Dave S wrote:
>
>
>
> On Wednesday, November 7, 2018 at 10:29:49 PM UTC-8, mostwanted wrote:
>>
>> Hey Stifan, i did look at it but id dint quite find what i was looking 
>> for but thanks for the suggestion.
>>
>
> Being a simple-minded sort, I'd have started simple:
>
> Use regular web2py sqlforms to handle the UI and make sure the database 
> was working and that the table definitions made sense.  Once that was done, 
> a more advanced UI could be used.
>
> /dps
>  
>
>>
>> On Thursday, November 8, 2018 at 1:28:30 AM UTC+2, 黄祥 wrote:
>>>
>>> perhaps you can check on web2py appliances, there are some examples of 
>>> that
>>> ref:
>>> https://github.com/mdipierro/web2py-appliances/
>>>
>>> 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] HOW TO SET A DEFAULT VALUE FOR A TABLE REFERENCED IN ANOTHER TABLE

2018-11-08 Thread mostwanted
if i have 2 table client and city and have city referenced in client, how 
do i set a default value for city that will appear in client?
I tried setting default in city hoping it will show as a default value in 
client but its not showing!
I hope this explanation of the problem is clear enough it doesn't need a 
code example.

Thank You

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: Glyphicons still not showing in version 2.17.1-stable

2018-11-09 Thread mostwanted
Wow Thanks

On Friday, November 9, 2018 at 10:29:08 AM UTC+2, Константин Комков wrote:
>
> If you have gluphicons you can make like that:
> CSS
> .glyphicon-user{display:block;float:left;width:*your picture width* px;
> height:*your picture **height* px;background-image:url(/*name of your app*
> /static/images/*your picture name*.png);background-repeat: no-repeat;}
>
> [image: ic.png]
> HTML
>  class="glyphicon-user">Профиль
>
> среда, 7 ноября 2018 г., 12:43:53 UTC+3 пользователь mostwanted написал:
>>
>> Was a solution ever provided/created for the not appearing glyphicons? 
>> Massimo promised a solutions to this last year (2017): 
>> https://groups.google.com/forum/#!msg/web2py/CSA-p4OSKM0/mziFoZ3KBQAJ;context-place=topic/web2py/Eii2yOpd_TU
>>
>> Whats the way around this problem?
>>
>> 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: HOW TO SET A DEFAULT VALUE FOR A TABLE REFERENCED IN ANOTHER TABLE

2018-11-09 Thread mostwanted
Thanks

On Friday, November 9, 2018 at 2:14:55 PM UTC+2, tim.n...@conted.ox.ac.uk 
wrote:
>
> You set the default in client:
>
> db.define_table(
> 'client',
> Field('city', db.city, default='Value here'),
> )
>
>
> On Friday, 9 November 2018 04:59:23 UTC, mostwanted wrote:
>>
>> if i have 2 table client and city and have city referenced in client, how 
>> do i set a default value for city that will appear in client?
>> I tried setting default in city hoping it will show as a default value in 
>> client but its not showing!
>> I hope this explanation of the problem is clear enough it doesn't need a 
>> code example.
>>
>> Thank You
>>
>> 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] Summing up values in a dabase table with compute r: r[' ']

2018-11-10 Thread mostwanted
How can i create an incremental addition of other values in a database 
table and sum them up in one column? Is there a way to sum() the wanted 
values in one column to create a wanted database value total like i 
attempted in the *TOTAL* field in the below code example? I tried something 
like the code below but of-course it didn't work, so i was wondering if  
there is a way to achieve something like this.

db.define_table('addThem',
Field('quantity', 'integer'),
Field('price', 'float'),
Field('totalPrice', compute=lambda r: r['price']* r[
'quantity']),
    
*Field('Total', writable=False, compute=lambda r: (r['totalPrice']).sum()))*

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: Summing up values in a dabase table with compute r: r[' ']

2018-11-12 Thread mostwanted
I wanted to create an Invoice for clients orders, i wanted to be able to do 
all the calculations of the costs of their services as I enter values into 
the database. But I kinda found a way around this coz it was giving me a 
headache, so i decided to calculate the total in the controller like i did 
on the variable pricing below:

def viewInvoices():
invoice=db.ClientDetails(request.args(0, cast=int))

*pricing=db(db.invoice.customer==invoice.id).select(db.invoice.totalPrice.sum().with_alias('total'))*
return locals()
This kinda gave me  a solution to what i was trying achieve.


On Monday, November 12, 2018 at 6:19:54 PM UTC+2, Leonel Câmara wrote:
>
> You can either use after_insert to put the value in the Total of all rows 
> or you can use a Virtual field or Method.
>
> May I ask what you're trying to do?
>

-- 
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] '<'

2018-11-12 Thread mostwanted
I'm pulling my hairs out over this error, it occurred from no where & I 
cant make sense of it because i had not made any updates to my code & got 
this error

Here is the traceback if anyone can figure something out please help me, 
thank you in advance.

Ticket ID 

127.0.0.1.2018-11-12.20-51-42.a137b4bb-0440-419f-9b79-52ee83d1d6dc
 '<'
Version
web2py™ Version 2.17.2-stable+timestamp.2018.10.06.18.54.02
Python Python 2.7.9: C:\warmhandssingleUsers\web2py\web2py\web2py.exe (
prefix: )

Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.

Traceback (most recent call last):
  File "C:\warmhandssingleUsers\web2py\web2py\gluon\restricted.py", line 219, 
in restricted
exec(ccode, environment)
  File 
"C:/warmhandssingleUsers/web2py/web2py/applications/Hotel_Version/models/dbmanagement.py"
 
,
 line 51, in 
format='%(Surname)s, %(Name)s')
  File 
"C:\warmhandssingleUsers\web2py\web2py\gluon\packages\dal\pydal\base.py", line 
590, in define_table
table = self.lazy_define_table(tablename, *fields, **kwargs)
  File 
"C:\warmhandssingleUsers\web2py\web2py\gluon\packages\dal\pydal\base.py", line 
624, in lazy_define_table
polymodel=polymodel)
  File 
"C:\warmhandssingleUsers\web2py\web2py\gluon\packages\dal\pydal\adapters\base.py",
 line 798, in create_table
return self.migrator.create_table(*args, **kwargs)
  File 
"C:\warmhandssingleUsers\web2py\web2py\gluon\packages\dal\pydal\migrator.py", 
line 296, in create_table
sql_fields_old = pickle.load(tfile)
  File "pickle.py", line 1378, in load
  File "pickle.py", line 858, in load
KeyError: '<'

-- 
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: Summing up values in a dabase table with compute r: r[' ']

2018-11-12 Thread mostwanted
Thanks Stifan

On Monday, November 12, 2018 at 9:29:50 PM UTC+2, 黄祥 wrote:
>
> perhaps you can learn from web2py appliance: pos 
> if i'm not wrong the code to calculate for sum is on the controller side
>
> ref:
> https://github.com/mdipierro/web2py-appliances/
>
> 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] '<'

2018-11-14 Thread mostwanted
I had to re-create my database from scratch too, i don't know where this 
error came from. Thanks for replying.

Mostwanted

On Wednesday, November 14, 2018 at 11:02:00 AM UTC+2, Lovedie JC wrote:
>
> I used to get such esp. when on of my files was corrupted in the 
> databases. 
> I'd reinstall web2py or delete all files in the databases folder and copy 
> back to the databases folder from a back up folder.
> Hope this helps
>
> On Mon, 12 Nov 2018 at 22:35, mostwanted > 
> wrote:
>
>> I'm pulling my hairs out over this error, it occurred from no where & I 
>> cant make sense of it because i had not made any updates to my code & got 
>> this error
>>
>> Here is the traceback if anyone can figure something out please help me, 
>> thank you in advance.
>>
>> Ticket ID 
>>
>> 127.0.0.1.2018-11-12.20-51-42.a137b4bb-0440-419f-9b79-52ee83d1d6dc
>>  '<'
>> Version
>> web2py™ Version 2.17.2-stable+timestamp.2018.10.06.18.54.02
>> Python Python 2.7.9: C:\warmhandssingleUsers\web2py\web2py\web2py.exe (
>> prefix: )
>>
>> Traceback
>>
>> 1.
>> 2.
>> 3.
>> 4.
>> 5.
>> 6.
>> 7.
>> 8.
>> 9.
>> 10.
>> 11.
>> 12.
>> 13.
>> 14.
>> 15.
>> 16.
>> 17.
>>
>> Traceback (most recent call last):
>>   File "C:\warmhandssingleUsers\web2py\web2py\gluon\restricted.py", line 
>> 219, in restricted
>> exec(ccode, environment)
>>   File 
>> "C:/warmhandssingleUsers/web2py/web2py/applications/Hotel_Version/models/dbmanagement.py"
>>  
>> <http://127.0.0.1:8000/admin/default/edit/Hotel_Version/models/dbmanagement.py>,
>>  line 51, in 
>> format='%(Surname)s, %(Name)s')
>>   File 
>> "C:\warmhandssingleUsers\web2py\web2py\gluon\packages\dal\pydal\base.py", 
>> line 590, in define_table
>> table = self.lazy_define_table(tablename, *fields, **kwargs)
>>   File 
>> "C:\warmhandssingleUsers\web2py\web2py\gluon\packages\dal\pydal\base.py", 
>> line 624, in lazy_define_table
>> polymodel=polymodel)
>>   File 
>> "C:\warmhandssingleUsers\web2py\web2py\gluon\packages\dal\pydal\adapters\base.py",
>>  line 798, in create_table
>> return self.migrator.create_table(*args, **kwargs)
>>   File 
>> "C:\warmhandssingleUsers\web2py\web2py\gluon\packages\dal\pydal\migrator.py",
>>  line 296, in create_table
>> sql_fields_old = pickle.load(tfile)
>>   File "pickle.py", line 1378, in load
>>   File "pickle.py", line 858, in load
>> KeyError: '<'
>>
>> -- 
>> 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.


[web2py] How to convert my view to pdf

2018-11-14 Thread mostwanted
I have been researching this topic alot because i am trying to achieve 
this, i want to convert my view exactly as it to PDF, i came across some 
information on web2py-appreport but I don't understand exactly how it 
works, maybe its my slow mind, i followed the examples in 
https://github.com/lucasdavila/web2py-appreport/wiki/Docs-and-examples but 
the results are not what i want.

I wanna have a button on my view which when i click converts that view in 
to pdf straight away and have it saved. Is this possible and if so how can 
i achieve it?

(Smiles :) 

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] Restricting values entered into a field to a certain minimum

2018-11-23 Thread mostwanted
How can I restrict a value entered into a database field to a certain 
desirable minimum?

-- 
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: Restricting values entered into a field to a certain minimum

2018-11-24 Thread mostwanted
I ended up creating my custom validator, to handle this situation.

On Friday, November 23, 2018 at 2:55:03 PM UTC+2, mostwanted wrote:
>
> How can I restrict a value entered into a database field to a certain 
> desirable minimum?
>
>

-- 
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: Restricting values entered into a field to a certain minimum

2018-11-25 Thread mostwanted
As simple and straight forward as my validator is, it is now not behaving 
as it should! It is intended to disallow any form entry of a value less 
than 10 but instead now it disallows every value entered into the field 
when the comparison operator is less than (>)!
*VALIDATOR CODE:*
class IS_NOT_LESS_THAN_TEN(object):
def __init__(self, error_message="Enter an amount equivalent to P10.00 
or more!"):
#self.amount = amount
self.error_message = error_message

def __call__(self, value):
error = None
if value>10:
error = self.error_message
return (value, error)


*FIELD WHERE THE VALIDATOR IS USED:*
db.define_table('my_token',
.
Field('Amount_You_Want_Saved', 'integer', label=SPAN('Amount 
You Want Saved'), requires=IS_NOT_LESS_THAN_TEN()))
The problem i am facing now is that the validator disqualifies every value 
i enter even those greater than 10! When i change the comparison operator 
to greater than it accepts everything! If anyone sees the problem please 
point it out to me, thank you.

Mostwanted




On Sunday, November 25, 2018 at 9:51:18 AM UTC+2, mostwanted wrote:
>
> I ended up creating my custom validator, to handle this situation.
>
> On Friday, November 23, 2018 at 2:55:03 PM UTC+2, mostwanted wrote:
>>
>> How can I restrict a value entered into a database field to a certain 
>> desirable minimum?
>>
>>

-- 
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: Restricting values entered into a field to a certain minimum

2018-11-25 Thread mostwanted
I initially tried converting but it didnt work but let me try it again, i 
moved the validator code to a different directory, i'll be importing it 
from modules, maybe it will work when i convert this time around.

On Sunday, November 25, 2018 at 11:27:00 AM UTC+2, Val K wrote:
>
> Maybe convert value to integer (or float)  before comparison

-- 
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: Restricting values entered into a field to a certain minimum

2018-11-25 Thread mostwanted
Well its a miracle! coz now it works!
Thanks Val K

-- 
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: Restricting values entered into a field to a certain minimum

2018-11-27 Thread mostwanted
I'll give it a go

On Sunday, November 25, 2018 at 12:58:34 PM UTC+2, Val K wrote:
>
> Note that you can just turn requires into list and prepend it with 
> IS_NUMBER validator

-- 
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] How to solve '\x00' error

2018-11-30 Thread mostwanted


There was a electrical power cut in my area today, it happened while i was 
working on my application. When the power returned & I tried to continue 
with my application I got this error:
*"'<'type 'exceptions.KeyError'> '\x00'"*
Now my application is NOT working! This is not the first time, i have had 
to start another project from scratch but i cant with this current one 
because alot has been done on it, i need to know what this error is!


Below is the stack trace to the error:



Traceback

Traceback (most recent call last):
File "C:\Users\.\Documents\web2py\gluon\restricted.py", line 219, in 
restricted
exec(ccode, environment)
File 
"C:/Users/../Documents/web2py/applications/Power_Vault/models/dbcurrentV.py",
 line 16, in 
Field('posted_by', 'reference auth_user', default=auth.user_id, readable=False, 
writable=False))
File "C:\Users\...\Documents\web2py\gluon\packages\dal\pydal\base.py", line 
590, in define_table
table = self.lazy_define_table(tablename, *fields, **kwargs)
File "C:\Users\...\Documents\web2py\gluon\packages\dal\pydal\base.py", line 
624, in lazy_define_table
polymodel=polymodel)
File 
"C:\Users\..\Documents\web2py\gluon\packages\dal\pydal\adapters\base.py", 
line 798, in create_table
return self.migrator.create_table(*args, **kwargs)
File "C:\Users\..\Documents\web2py\gluon\packages\dal\pydal\migrator.py", 
line 296, in create_table
sql_fields_old = pickle.load(tfile)
File "pickle.py", line 1378, in load
File "pickle.py", line 858, in load
KeyError: '\x00'


If anyone out there knows what this is I could really use your help in 
resolving it, i am desperate . Thank you!

-- 
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: How to solve '\x00' error

2018-12-01 Thread mostwanted
Please refer me, what page, I will be lying if i said i looked it up!

On Saturday, December 1, 2018 at 11:09:02 AM UTC+2, Val K wrote:
>
> It seems that dal-metafiles are broken. Did you try to fix it as the book 
> suggests?

-- 
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: How to solve '\x00' error

2018-12-01 Thread mostwanted
Thanks for that reference Val K, i'm going through it trying to figure out 
my problem, every problem that is stated in the book that could cause 
broken migrations involves bad programming habits, thats by understanding 
anyway, like defining a field as one type and redefining it into another 
type meanwhile saving information in it. The other involves partial 
committing of complex transaction. I haven't encountered any of these so 
i'm still trying to figure out where my error falls & how I can apply the 
given solutions.

Mostwanted

On Saturday, December 1, 2018 at 11:39:18 AM UTC+2, Val K wrote:
>
> Chapter 6Fixing broken migrations

-- 
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] Using a value of one table as a default value of another table

2018-12-01 Thread mostwanted

I am trying to achieve something here, i have two tables and i want the 
values of one table to be default values of another table so that i don't 
have to re enter the same information over & over again: In the code below 
observe where highlited in green, is there a way for me to do something 
like below.

*CODE*:
db.define_table('quotationClient',
Field('Client_Surname'),
Field('Client_Name'),
Field('Company'),
Field('Contact_Details'),
Field('Book_In', 'date'),
Field('Book_Out', 'date'),
Field('Days', compute=lambda r: (r['Book_Out']-r['Book_In'
]).days),
Field('Booked_By', 'reference auth_user', default=auth.
user_id, writable=False, label=SPAN('Booked In By', _style="font-weight: 
bold;")),
Field('Booking_Date', 'datetime', default=request.now, 
writable=False, label=SPAN('Booking Date', _style="font-weight: bold;")),
format="%(Client_Surname)s %(Client_Name)s"
   )

db.define_table('quotation',
Field('customer', 'reference quotationClient', writable=
False),
Field('Quotation_For'),
*#HOW CAN I DO THE BELOW IN SUCH A WAY THAT WORKS*
  
*  Field('Book_In', 'date', default='db.quotationClient.Book_In', 
writable=False, readable=False),Field('Book_Out', 'date', 
default='db.quotationClient.Book_Out',  writable=False, readable=False),*
Field('No_of_Pax', 'integer'),
Field('Days', compute=lambda r: (r['Book_Out']-r['Book_In'
]).days),
#Field('No_of_Days', 'integer'),
Field('Unit_Price', 'integer'),
#Field('vat', compute=lambda r: 
int(r['Days'])*r['Unit_Price']*r['No_of_Pax']*0.1),
Field('Amount', compute=lambda r: int(r['Days'])*r[
'Unit_Price']* r['No_of_Pax']),
Field('Quoted_By','reference auth_user', default=auth.
user_id, writable=False),
Field('Quoted_On','datetime',default=request.now,writable=
False))

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: How to solve '\x00' error

2018-12-03 Thread mostwanted
What concerns me is that I developed a standalone application with web2py & 
every-time there is a sudden power cut which is an issue in my area, when 
switching on a computer to continue using the application we find that the 
application has crushed! Isn't there a away to avoid the application 
crushing every-time there is a power cut?!

On Monday, December 3, 2018 at 12:15:06 PM UTC+2, Leonel Câmara wrote:
>
> You can probably fix this simply by doing a fake migration to rebuild the 
> .table files. Run your app with migrate=True and fake_migrate=True in your 
> DAL.
>

-- 
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: How to solve '\x00' error

2018-12-09 Thread mostwanted
Can you please explain further Leonel?

On Wednesday, December 5, 2018 at 1:02:22 AM UTC+2, Leonel Câmara wrote:
>
> The application should be running with migration disabled in production in 
> which case this won't happen.
>

-- 
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] Error Handling in the view

2018-12-24 Thread mostwanted
In my view i have a section that does a calculation of a value plus its 
VAT(tax), the problem is if this value is not found i get an error like the 
one below:
 unsupported operand type(s) for *: 'NoneType' 
and 'float'

 What i want to be able to do is to be able to redirect to another page 
that states that that value was not added initially instead of throwing 
this exception giving the user the ability to turn back.
 Here is my attempt at it, the code thats in red: But i am not getting what 
i want, its not redirecting, can anyone please assist. Thank you.

{{for price in pricing:
if price.total:
try:
vat=round(price.total*0.12, 2)
totalPrice=price.total+vat
except:
redirect(URL('notRegistered'))
}}
{{pass}}


Sub-Total:BWP {{=price.total}}(VAT EXCLUSIVE)


12% VAT: BWP {{=vat}}


Total: BWP {{=totalPrice}}(VAT INCLUSIVE)




Client Sinature: 
{{=invoice.Quoted_By.first_name}} {{=invoice.Quoted_By.last_name}}

{{pass}}
{{pass}}

Price Validity Period: 90 DAYS
Please Confirm Quotation At-least(7) Days Before In-Order To Secure 
Bookings

Available Facilities:
[ Gym ] [ Swimming Pool ] 
[ Wi-Fi ] [ Bar ]


-- 
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] Error Handling in the view

2018-12-24 Thread mostwanted
Thank you very much SP for pointing that out, much appreciated

Mostwanted

On Monday, December 24, 2018 at 3:11:23 PM UTC+2, sandeep patel wrote:
>
> @Mostwanted
> This is because of try-except block under if block. when price value has 
> None than if condition false.
> I have tested this code than is work fine for me.
>
> .{{ for price in pricing:
>   try:
> vat=round(price.total*0.12, 2)
>except:
> redirect(URL('notRegistered'))
>   else:
> totalPrice=price.total+vat  
> }}
> {{pass}}  
>
> }}
>
> {{pass}}
>
> Thanks
> SP
>
> On Mon, Dec 24, 2018 at 6:11 PM mostwanted  > wrote:
>
>> In my view i have a section that does a calculation of a value plus its 
>> VAT(tax), the problem is if this value is not found i get an error like the 
>> one below:
>>  unsupported operand type(s) for *: 
>> 'NoneType' and 'float'
>>
>>  What i want to be able to do is to be able to redirect to another page 
>> that states that that value was not added initially instead of throwing 
>> this exception giving the user the ability to turn back.
>>  Here is my attempt at it, the code thats in red: But i am not getting 
>> what i want, its not redirecting, can anyone please assist. Thank you.
>>
>> {{for price in pricing:
>> if price.total:
>> try:
>> vat=round(price.total*0.12, 2)
>> totalPrice=price.total+vat
>> except:
>> redirect(URL('notRegistered'))
>> }}
>> {{pass}}
>>
>> 
>> > width: 29px;>Sub-Total:BWP {{=price.total}}(VAT EXCLUSIVE)
>> 
>> 
>> > width: 29px;>12% VAT: BWP {{=vat}}
>> 
>> 
>> > width: 29px;>Total: BWP {{=totalPrice}}(VAT INCLUSIVE)
>> 
>> 
>> 
>> 
>> Client Sinature: 
>> {{=invoice.Quoted_By.first_name}} {{=invoice.Quoted_By.last_name}}
>> 
>> {{pass}}
>> {{pass}}
>> 
>> Price Validity Period: 90 DAYS
>> Please Confirm Quotation At-least(7) Days Before In-Order To 
>> Secure Bookings
>> 
>> Available Facilities:
>> [ Gym ] [ Swimming Pool ] 
>> [ Wi-Fi ] [ Bar ]
>> 
>>
>> -- 
>> 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.


[web2py] Displaying textfield information with ajax() function in different pages

2018-12-29 Thread mostwanted
I have a textfield that takes a user's name but i dont want to save the 
user's name in a database table i just wanna be able to display it in all 
the pages as long as the user is going through the web pages they should 
see their name with the welcome message but what i have achieved so far is 
to only display it in one page, the first page where they entered their 
name, the other pages dont display anything, here is my code:

*CONTROLLER*
def echo():
return 'Welcome, ', request.vars.name

*VIEW 1*





Hello, welcome to T.K's computurised driving theory testing 
system, please enter your name in the textfield below and 
click begin to start, GOODLUCK

 



How do I get view 2 & the rest to also display the user's name after 
collecting it the first time when they get started?

*VIEW 2*





  
  
  QUESTION 1
What Influences the degree of centrifugal force 
on bends?


  

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: Displaying textfield information with ajax() function in different pages

2018-12-29 Thread mostwanted
I have changed my controller abit according to your advice

*CODE:*
def echo():
session.name=request.vars.name
return 'Welcome, ', session.name

& in view 2 and other views i simply add {{=session.name}} and i get what I 
want, it works & i hope the semantics of how i used session are ok

*VIEW 2*
LESSON 1 QUIZ 2BACK 
| TEST AGAIN | NEXT QUIZ


Welcome, {{=session.name}}


Thanks Val K

On Saturday, December 29, 2018 at 4:27:01 PM UTC+2, Val K wrote:
>
> There is the 'session' that is storage for common needs like this, so you 
> can  session.user_name = request.vars.name in the first controller and 
> then use it in other to retrieve user_name

-- 
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] Making my binary standalone apps function faster

2018-12-30 Thread mostwanted
Hi guys, I develop a-lot of stand alone apps with web2py but my problem is 
that i find the performing slower, every-time there is data entry or a 
query it takes a while to save information and  or bring out the query 
results, is there a way in which i can make my apps faster?

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] Web2py .exe pack custom

2019-01-05 Thread mostwanted
Hi guys, can anyone please explain to me how the .exe option under pack 
custom works? I have tried it and after packaging and unzipping the zipped 
folder I wasn't sure what is should be looking for.

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] Deleting all items of a selecte ID at the same time

2019-01-06 Thread mostwanted
I have a view that create an invoice, at present i can only delete 1 item 
at a time from the invoice but what i want is to be able to delete all 
items from the invoice at the same time by clicking a link, below is my 
code.

*INVOICE CODE:*



















































































*Click to Download as 
PDF
   COMPANYTELEPHONE: 
EM@IL: .@gmail.com  
  CELL: POSTAL-ADDRESS:..  
  Invoice No: 
___ Contact: {{=invoice.proxy}}
 Company: {{=invoice.company}}Tel: {{=invoice.tel}}Postal Address: {{=invoice.postalAddress}}
Order
QuantityOrder Price(VAT Exclusive)
Amount{{for invoice in customer:}}
{{=invoice.client_order}} {{=invoice.quantity}} 
{{=MoneyFormat(invoice.beforeVat)}}
{{=MoneyFormat(invoice.quantity*invoice.beforeVat)}}
{{pass}}{{for price in pricing:try:vat=round(price.total*0.12, 
2)totalPrice=price.total+vatexcept:
redirect(URL('notInvoiced'))}}{{pass}}Sub-Total:{{=MoneyFormat(price.total)}}(VAT 
EXCLUSIVE)12% VAT: {{=MoneyFormat(vat)}}Total: {{=MoneyFormat(totalPrice)}}(VAT 
INCLUSIVE){{pass}}{{pass}}
Client Sinature: 
{{=invoice.Booked_By.first_name}} 
{{=invoice.Booked_By.last_name}}Date & Time: 
{{=invoice.Booking_Date}}Thank you for your 
business!Company  
  $('document').ready(function(){$(".delete").click(function(){  
 return confirm('Are you sure you want to delete this this INVOICE?!');
});});#BY CLICKING THE LINK BELOW I WANT TO BE ABLE TO DELETE 
ALL THE INVOICE ITEMS AT ONCEDelete 
InvoiceTOP*

*INVOICE DELETING CONTROLLER*
def deleteInvoice():
#THE .first() FUNCTION IN THE LINE BELOW ONLY ALLOWS ME TO DELETE ITEMS ONE 
AT A TIME
*query = db(db.invoice.id==request.args(0, cast=int)).select().first() *
remove = db(db.invoice.id==query).delete()
if remove:
redirect(URL('registeredClients'))
return locals()

The *.first()* function in the green highlighted line in the above 
controller only allows me to delete the invoice items one at a time, is 
there another function i can use that will allow me to delete them all at 
once? By deleteng the invoice items this will delete the entire invoice 
allowing the user to implement a new invoice. 

Please help!

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: Deleting all items of a selecte ID at the same time

2019-01-06 Thread mostwanted
Hey Anthony, thanks for the heads up in the garbage code in the controller 
i will address it, with regards to deleting invoices i want to be able to 
delete all invoices in the db.invoice table but only for a specific 
selected client. I want to be able to delete an entire invoice by clicking 
the link once.

-- 
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: Web2py .exe pack custom

2019-01-06 Thread mostwanted
The one you gave a link to i am familiar with, i just wanted to understand 
if the .exe custom pack introduced something new.

On Sunday, January 6, 2019 at 4:17:04 PM UTC+2, Anthony wrote:
>
> It creates a standalone version of web2py (with its own Python 
> interpreter) that contains your application, which you can then use to 
> distribute as a standalone binary, as described here 
> <http://web2py.com/books/default/chapter/29/14/other-recipes#How-to-distribute-your-applications-as-binaries>
> .
>
> Anthony
>
> On Sunday, January 6, 2019 at 1:56:42 AM UTC-5, mostwanted wrote:
>>
>> Hi guys, can anyone please explain to me how the .exe option under pack 
>> custom works? I have tried it and after packaging and unzipping the zipped 
>> folder I wasn't sure what is should be looking for.
>>
>> 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: Deleting all items of a selecte ID at the same time

2019-01-06 Thread mostwanted
My delete function is not working, I think I am doing doing something wrong 
but i'm not sure where, I thought the code below would get me home but 
nothing is happening, nothing is getting deleted! Please advice:

*DELETE FUNCTION CONTROLLER CODE:*
def deleteInvoice():
query=db.invoice(request.args(0, cast=int))
remove=db(db.invoice.customer==query.id).delete()
if remove:
redirect(URL('registeredClients'))
return locals()



On Sunday, January 6, 2019 at 4:35:36 PM UTC+2, Anthony wrote:
>
> On Sunday, January 6, 2019 at 9:15:41 AM UTC-5, mostwanted wrote:
>>
>> Hey Anthony, thanks for the heads up in the garbage code in the 
>> controller i will address it, with regards to deleting invoices i want to 
>> be able to delete all invoices in the db.invoice table but only for a 
>> specific selected client. I want to be able to delete an entire invoice by 
>> clicking the link once.
>>
>
> Then you would need a query like:
>
> db(db.invoice.client = some_client_id).delete()
>
> You would want to make sure the current user is authorized to delete 
> invoices for some_client_id (specifically, if some_client_id comes from 
> the browser, be sure to validate it).
>
> Also, in the UI, you should probably make it clear what will happen, as 
> "Delete Invoice" makes me think I'm deleting only the current invoice, not 
> all invoices.
>
> Anthony
>
>

-- 
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: Deleting all items of a selecte ID at the same time

2019-01-07 Thread mostwanted
With regards to validation considering the scope of the app i'm working on, 
i will be using @auth.requires_login() to control and restrict who does 
what but thanks for bringing up digitally signed URL, i will be looking 
extensively in to that, its an interesting topic.

I have changed my code, i have been specific with my ID:
if db(db.invoice.id == request.args(0, cast=int)).delete():
  redirect(URL('registeredClients'))
It does the deleting but the thing is it deletes the items that appear in 
my invoice one at a time, if i have 10 items i have to keep clicking the 
delete link 10 times until the invoice is no more but it would be great if 
i could be able to erase all the 10 items by clicking once, more like if i 
were using this
if db(db.invoice.id > 0).delete():
  redirect(URL('registeredClients'))
 but only specific to only one invoice for the selected client and not 
erasing everything in the database


On Tuesday, January 8, 2019 at 12:05:15 AM UTC+2, Anthony wrote:
>
> On Monday, January 7, 2019 at 2:06:43 AM UTC-5, mostwanted wrote:
>>
>> My delete function is not working, I think I am doing doing something 
>> wrong but i'm not sure where, I thought the code below would get me home 
>> but nothing is happening, nothing is getting deleted! Please advice:
>>
>> *DELETE FUNCTION CONTROLLER CODE:*
>> def deleteInvoice():
>> query=db.invoice(request.args(0, cast=int))
>> remove=db(db.invoice.customer==query.id).delete()
>>
>
> Again, the first line serves no purpose, as it is simply used to retrieve 
> the ID that you already have. Just do:
>
> if db(db.invoice.customer == request.args(0, cast=int)).delete():
> redirect(URL('registeredClients'))
>
> If that's not working, presumably request.args(0) is not the value of any 
> "customer" in the db.invoice table, so your bug lies in the code that 
> produces the URL that leads here.
>
> Also, it doesn't look like your code does any validation to determine if 
> the user is allowed to delete all of these customer invoices. You should 
> probably confirm that the customer ID submitted is the customer ID of the 
> current user (you could use a digitally signed URL, a session variable, or 
> do a lookup).
>
> Anthony
>

-- 
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] Editing the default formstyle styles

2019-01-09 Thread mostwanted
Is there a way to edit and customize the default *formstyle* styling? I am 
trying to place a form label on top of my sqlform.factory form with 
formstyle='table3cols' & i am able to get the desired results but there is 
extra stuff i do not want, my form now has a border around it and a 
box-shadow which both of them i never defined, i want them out! What do it 
do?
*CODE:*
def search():
form=SQLFORM.factory(Field('SEARCH', requires=IS_NOT_EMPTY(), widget = 
lambda field, value: SQLFORM.widgets.string.widget(field, value, _class=
'my-string', _id='searching', _placeholder='SEARCH BY COMPANY NAME')), , 
formstyle='table3cols')
searchBtn=form.element('input',_type='submit')
searchBtn['_style'] = 'display:none;'
if form.accepts(request):
tokens=form.vars.SEARCH.split()
query=reduce(lambda a,b:a&b, [db.Client_Details.company.contains(k) 
for k in tokens])
company=db(query).select(orderby=db.Client_Details.company)
else:
company=[]
return locals()


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: Editing the default formstyle styles

2019-01-09 Thread mostwanted
OK!!! This is embarrassing!!! I think i have figured out what the problem 
is! I have defined styling for all tables that are used in my application, 
I want to believe that formstyle places the form its styling inside a table 
therefore my table styling affected hence the box-shadow and the border! 
Sorry! False alarm!

Mostwanted

On Thursday, January 10, 2019 at 7:43:22 AM UTC+2, mostwanted wrote:
>
> Is there a way to edit and customize the default *formstyle* styling? I 
> am trying to place a form label on top of my sqlform.factory form with 
> formstyle='table3cols' & i am able to get the desired results but there is 
> extra stuff i do not want, my form now has a border around it and a 
> box-shadow which both of them i never defined, i want them out! What do it 
> do?
> *CODE:*
> def search():
> form=SQLFORM.factory(Field('SEARCH', requires=IS_NOT_EMPTY(), widget = 
> lambda field, value: SQLFORM.widgets.string.widget(field, value, _class=
> 'my-string', _id='searching', _placeholder='SEARCH BY COMPANY NAME')), , 
> formstyle='table3cols')
> searchBtn=form.element('input',_type='submit')
> searchBtn['_style'] = 'display:none;'
> if form.accepts(request):
> tokens=form.vars.SEARCH.split()
> query=reduce(lambda a,b:a&b, [db.Client_Details.company.contains(k
> ) for k in tokens])
> company=db(query).select(orderby=db.Client_Details.company)
> else:
> company=[]
> return locals()
>
>
> 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.


Re: [web2py] Editing the default formstyle styles

2019-01-09 Thread mostwanted
Sorry SP the problem was in my application CSS, i tried to explain it on my 
follow up message which i just posted seconds after your reply. But thanks 
for replying!

Mostwanted

On Thursday, January 10, 2019 at 8:02:49 AM UTC+2, sandeep patel wrote:
>
> @mostwanted
> In my case your code working as you expected. what web2py version you are 
> using?
> You can try this
>
> def search():
> form=SQLFORM.factory(Field('SEARCH', requires=IS_NOT_EMPTY()),
>  widget = lambda field, value: 
> SQLFORM.widgets.string.widget(
> field, value, _class='my-string', _id='searching', 
> _placeholder='SEARCH BY COMPANY NAME'
> ),formstyle='table3cols')
> searchBtn=form.element('input',_type='submit')
> form['_style'] = "border:none;box-shadow:none;"
> if form.accepts(request):
> tokens=form.vars.SEARCH.split()
> query=reduce(lambda a,b:a&b, 
> [db.Client_Details.company.contains(k) for k in tokens])
> company=db(query).select(orderby=db.Client_Details.company)
> else:
> company=[]
> return locals()
>
>
> Thanks
> SP
>
> On Thu, Jan 10, 2019 at 11:13 AM mostwanted  > wrote:
>
>> Is there a way to edit and customize the default *formstyle* styling? I 
>> am trying to place a form label on top of my sqlform.factory form with 
>> formstyle='table3cols' & i am able to get the desired results but there is 
>> extra stuff i do not want, my form now has a border around it and a 
>> box-shadow which both of them i never defined, i want them out! What do it 
>> do?
>> *CODE:*
>> def search():
>> form=SQLFORM.factory(Field('SEARCH', requires=IS_NOT_EMPTY(), widget 
>> = lambda field, value: SQLFORM.widgets.string.widget(field, value, _class
>> ='my-string', _id='searching', _placeholder='SEARCH BY COMPANY NAME')), , 
>> formstyle='table3cols')
>> searchBtn=form.element('input',_type='submit')
>>     searchBtn['_style'] = 'display:none;'
>> if form.accepts(request):
>> tokens=form.vars.SEARCH.split()
>> query=reduce(lambda a,b:a&b, [db.Client_Details.company.contains(
>> k) for k in tokens])
>> company=db(query).select(orderby=db.Client_Details.company)
>> else:
>> company=[]
>> return locals()
>>
>>
>> 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.


[web2py] getting auth.settings.login_next = URL('function') to work

2019-01-10 Thread mostwanted

I would really appreciate it if someone would explain to me in very simple 
English & in a very straight & forward manner how to get 
*auth.settings.login_next 
= URL('function')* to work!
Mine is not working and i have looked at every thread that explains it 
particularly this one 
https://groups.google.com/forum/?fromgroups=#!topic/web2py/wKd5QN5R5fs 
between Antony & and Dough Philips as well as this one 
https://groups.google.com/forum/#!topic/web2py/Dqhnnu2o8Dg by Rob_McC  but 
its alot of words I dont understand partly because i have a very short 
attention span! I have *auth.settings.login_next = URL('function') *defined 
in my *db.py* and i hoped this was enough to redirect my user to the 
defined page at login but nothing is happening!

What should i add where to get it to work??

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: getting auth.settings.login_next = URL('function') to work

2019-01-10 Thread mostwanted
Thanks you for your patience Anthony to keep repeating the same thing over 
& over for some of us, my code is finally working, I think the magic is 
with 
*request.vars._next = None* 
because right after adding that line everything started happening as it 
should, I am able to redirect. Much appreciated.

Mostwanted

On Thursday, January 10, 2019 at 4:36:21 PM UTC+2, Anthony wrote:
>
> auth.settings.login_next is just a default -- it is overridden if there is 
> a _next variable in the URL query string (which will be the case if the 
> user arrives at login page via the auth.navbar() menu). For options to 
> change this behavior, see 
> https://groups.google.com/d/msg/web2py/wKd5QN5R5fs/3v3JSqQOtrIJ and 
> https://groups.google.com/d/msg/web2py/wKd5QN5R5fs/3gwZqWSzQUcJ.
>
> Anthony
>
> On Thursday, January 10, 2019 at 5:21:22 AM UTC-5, mostwanted wrote:
>>
>>
>> I would really appreciate it if someone would explain to me in very 
>> simple English & in a very straight & forward manner how to get 
>> *auth.settings.login_next 
>> = URL('function')* to work!
>> Mine is not working and i have looked at every thread that explains it 
>> particularly this one 
>> https://groups.google.com/forum/?fromgroups=#!topic/web2py/wKd5QN5R5fs 
>> between Antony & and Dough Philips as well as this one 
>> https://groups.google.com/forum/#!topic/web2py/Dqhnnu2o8Dg by Rob_McC  
>> but its alot of words I dont understand partly because i have a very short 
>> attention span! I have *auth.settings.login_next = URL('function') *defined 
>> in my *db.py* and i hoped this was enough to redirect my user to the 
>> defined page at login but nothing is happening!
>>
>> What should i add where to get it to work??
>>
>> 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] Problem with a link that displaying wrong information upon clicking

2019-01-10 Thread mostwanted
My task I want to believe is fairly simple but something is wrong in my 
code, I am attempting to incorporate something I learned from Anthony into 
a small idea I have but its going side ways. I have names from a database 
displayed as links, what i want is for the details of those names to be 
displayed in a modal window when i click on the name but something is wrong 
here, when i click on a name at first it displays correct information but 
when i click on it again it displays the information of the second link, if 
i click on the 6th link name it displays the details of the 3rd name, this 
beats the entire purpose now, I want to be able to get the details of the 
exact name that is clicked whenever it is clicked.
Here is a simple code to illustrate my problem, i have put up everything so 
anyone wanting to assist me could see exactly what the code looks like but 
the problem itself is in the view:

*MODEL*






*db.define_table('person',Field('name'),
Field('surname'),Field('age', 'integer'),
Field('home'),   )*

*CONTROLLER*




*def clients():people=db(db.person).select(db.person.ALL)return 
locals()*
*VIEW*


































*{{extend 
'layout.html'}}$(document).ready(function(){$('#ours').hide();$('.branch1').click(function()
 
{$(this).each(function(){const id = $(this).data('id'); // Extract the 
data-id attribute of the link.$('#' + id).fadeIn(); // Select the contact 
with that id.var hiddenSection = $('#ours');hiddenSection.fadeIn().css({ 
'display':'block' }).css({ width: $(window).width() + 'px', height: 
$(window).height() + 'px' }).css({ top:($(window).height() - 
hiddenSection.height())/2 + 'px',left:($(window).width() - 
hiddenSection.width())/2 + 'px' }).css({ 'background-color': 
'rgba(0,0,0,0.6)' }).appendTo('body');$('img#close').click(function(){ 
$(hiddenSection).fadeOut(); });});});});{{for clients in 
people:}}{{=clients.name}} {{=clients.surname}}DETAILS{{=clients.age}}{{pass}}*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] decremental subtraction of values in DB field

2019-01-13 Thread mostwanted
How can achieve decremental subtraction of a value in a database field?

*MODEL CODE*

db.define_table('fuelLogging',
Field('Quantity', 'integer', requires=IS_NOT_EMPTY()),
Field('Rate', 'integer', requires=IS_NOT_EMPTY()),
Field('Total', compute=lambda r:r['Quantity']*r['Rate']),
Field('ODO_Reading', 'integer', requires=IS_NOT_EMPTY()),
*Field('Delta', compute=lambda 
r:r['ODO_Reading']-r['ODO_Reading'], requires=IS_NOT_EMPTY()),*
Field('Fuel_Usage', compute=lambda r: r['Delta']/r[
'Quantity']))
To get the delta field i have to subtract the previously entered 
ODO_Reading value from the newly entered ODO_Reading value but what i have 
done here is not working, any suggestions?

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: decremental subtraction of values in DB field

2019-01-13 Thread mostwanted
I am trying your formula but my Delta field is not getting updated. It is 
supposed to change as i enter a different value in ODO_Reading. 

On Monday, January 14, 2019 at 6:26:09 AM UTC+2, Anthony wrote:
>
> On Sunday, January 13, 2019 at 10:24:03 AM UTC-5, mostwanted wrote:
>>
>> How can achieve decremental subtraction of a value in a database field?
>>
>> *MODEL CODE*
>>
>> db.define_table('fuelLogging',
>> Field('Quantity', 'integer', requires=IS_NOT_EMPTY()),
>> Field('Rate', 'integer', requires=IS_NOT_EMPTY()),
>> Field('Total', compute=lambda r:r['Quantity']*r['Rate']),
>> Field('ODO_Reading', 'integer', requires=IS_NOT_EMPTY()),
>> *Field('Delta', compute=lambda 
>> r:r['ODO_Reading']-r['ODO_Reading'], requires=IS_NOT_EMPTY()),*
>> Field('Fuel_Usage', compute=lambda r: r['Delta']/r[
>> 'Quantity']))
>> To get the delta field i have to subtract the previously entered 
>> ODO_Reading value from the newly entered ODO_Reading value but what i have 
>> done here is not working, any suggestions?
>>
>
> To use an existing field value in a query, you can use the field object 
> itself (i.e., db.fuelLogging.ODO_Reading). However, for the DAL to treat 
> the expression as an Expression object, the field object must come first, 
> so you cannot do r.ODO_Reading - db.fuelLogging.ODO_Reading. You must 
> instead use (db.fuelLogging.ODO_Reading * -1) + r.ODO_Reading.
>
> Another problem you will have is that the compute function will not work 
> on inserts because there is no value in the ODO_Reading field in that 
> case. A workaround is to set the compute attribute conditionally only on 
> updates:
>
> def fuelLogging_before_update(*args, **kwargs):
> db.fuelLogging.compute = lambda r: (db.fuelLogging.ODO_Reading * -1) + 
> r.ODO_Reading
>
> db.define_table('fuelLogging',
> Field('ODO_Reading', 'integer'),
> Field('Delta', 'integer', default=0),
> before_update=fuelLogging_before_update)
>
> Anthony
>

-- 
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: Problem with a link that displaying wrong information upon clicking

2019-01-14 Thread mostwanted
I am happy to announce that i was able to resolve this issue (smiles):
*CODE:*




*$(document).ready(function(){$('.branch1').click(function() {const 
id = $(this).data('id'); // Extract the data-id attribute of the link.var 
hiddenSection = *








*$('#' + id);hiddenSection.fadeIn().css({ 'display':'block' }).css({ 
top:($(window).height() - hiddenSection.height())/2 + 
'px',left:($(window).width() - hiddenSection.width())/2 + 'px' }).css({ 
'background-color': 'rgba(0,0,0,0.6)' 
}).appendTo('body');$('img#close').click(function(){ 
$(hiddenSection).fadeOut(); });});});*

Initially the hiddenSection variable was set to a containing #div called* 
#ours*, i removed that div and set the hiddenSection variable to 
*$('#' + id)like below as it is also demonstrated in my code above*
*var hiddenSection = *
*$('#' + id);*
Now my link is working properly, it no longer has a large opaque window in 
the background! But i do get my modal window displaying what i want!

*Mostwanted*

On Friday, January 11, 2019 at 8:22:50 AM UTC+2, mostwanted wrote:
>
> My task I want to believe is fairly simple but something is wrong in my 
> code, I am attempting to incorporate something I learned from Anthony into 
> a small idea I have but its going side ways. I have names from a database 
> displayed as links, what i want is for the details of those names to be 
> displayed in a modal window when i click on the name but something is wrong 
> here, when i click on a name at first it displays correct information but 
> when i click on it again it displays the information of the second link, if 
> i click on the 6th link name it displays the details of the 3rd name, this 
> beats the entire purpose now, I want to be able to get the details of the 
> exact name that is clicked whenever it is clicked.
> Here is a simple code to illustrate my problem, i have put up everything 
> so anyone wanting to assist me could see exactly what the code looks like 
> but the problem itself is in the view:
>
> *MODEL*
>
>
>
>
>
>
> *db.define_table('person',Field('name'),
> Field('surname'),Field('age', 'integer'),
> Field('home'),   )*
>
> *CONTROLLER*
>
>
>
>
> *def clients():people=db(db.person).select(db.person.ALL)return 
> locals()*
> *VIEW*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *{{extend 
> 'layout.html'}}$(document).ready(function(){$('#ours').hide();$('.branch1').click(function()
>  
> {$(this).each(function(){const id = $(this).data('id'); // Extract the 
> data-id attribute of the link.$('#' + id).fadeIn(); // Select the contact 
> with that id.var hiddenSection = $('#ours');hiddenSection.fadeIn().css({ 
> 'display':'block' }).css({ width: $(window).width() + 'px', height: 
> $(window).height() + 'px' }).css({ top:($(window).height() - 
> hiddenSection.height())/2 + 'px',left:($(window).width() - 
> hiddenSection.width())/2 + 'px' }).css({ 'background-color': 
> 'rgba(0,0,0,0.6)' }).appendTo('body');$('img#close').click(function(){ 
> $(hiddenSection).fadeOut(); });});});});{{for clients in 
> people:}}http://clients.id>}}">{{=clients.name <http://clients.name>}} 
> {{=clients.surname}} id="{{=clients.id <http://clients.id>}}"> src="{{=URL('static', 'images/close.png')}}" style="width: 30px; position: 
> absolute; top:0px;right:0px;" id="close"/>DETAILS />{{=clients.age}}{{pass}}*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: decremental subtraction of values in DB field

2019-01-15 Thread mostwanted
This is my model code, its basically what you did: I am getting this error
* invalid table "fuelLogging" attributes: 
set(['before_update'])*

*MODEL CODE*
def fuelLogging_before_update(*args, **kwargs):
db.fuelLogging.compute = lambda r: (db.fuelLogging.ODO_Reading * -1) + r
.ODO_Reading

db.define_table('fuelLogging',
Field('Quantity', 'integer', requires=IS_NOT_EMPTY()),
Field('Rate', 'integer', requires=IS_NOT_EMPTY()),
Field('Total', compute=lambda r:r['Quantity']*r['Rate']),
Field('ODO_Reading', 'integer', requires=IS_NOT_EMPTY()),
Field('Fuel_Usage', compute=lambda r: r['Delta']/r[
'Quantity']),
Field('Delta', default=0),
before_update=fuelLogging_before_update)


I guess i am doing something wrong somewhere!

On Monday, January 14, 2019 at 11:37:10 PM UTC+2, Anthony wrote:
>
> On Monday, January 14, 2019 at 2:23:32 AM UTC-5, mostwanted wrote:
>>
>> I am trying your formula but my Delta field is not getting updated. It is 
>> supposed to change as i enter a different value in ODO_Reading.
>>
>
> Please show your exact code. Note, if you are using .update_record, the 
> Row returned by that method will not contain the updated Delta value, as 
> that value is calculated in the database. To get the updated value, you 
> would need to fetch the record from the database.
>
> Anthony
>

-- 
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: decremental subtraction of values in DB field

2019-01-17 Thread mostwanted
 Hey Anthony, my delta value still returns 0, its set default value, 

*MODEL*
def fuelLogging_before_update(*args, **kwargs):
db.fuelLogging.compute = lambda r: (db.fuelLogging.ODO_Reading * -1) + r
.ODO_Reading

db.define_table('fuelLogging',
Field('ODO_Reading', 'integer'),
Field('Delta', 'integer', default=0))
db.fuelLogging._before_update.append(fuelLogging_before_update)

but let me ask this, isn't the formula for our fuelLogging_before_update() 
function supposed to be:
*db.fuelLogging.Delta.compute = lambda r: (db.fuelLogging.ODO_Reading * -1) 
+ r.ODO_Reading*
considering that we are trying to make updates to the *Delta *value?? Just 
wondering!

I want to believe my controller must be straight forward with special 
formulas
*CONTROLLER*
def viewLog():
details=db(db.fuelLogging).select(db.fuelLogging.ALL)
return locals()

*VIEW*
{{extend 'layout.html'}}

{{for details in details:}}

ODO Reading: {{=details.ODO_Reading}}
Delta: {{=details.Delta}}
{{pass}}


Nonetheless my delta value is still being returned as 0 

I wanted to show my whole code incase i am missing something somewhere, its 
my first time using *callbacks on records*, i am not at all familiar with 
them!

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] Editing a compiled app

2019-01-18 Thread mostwanted
Is there a way for me to edit an already compiled app? I worked on an app, 
compiled it and distributed as a binary to a client, they are using it as a 
standalone app, after some time of using it they want me to make updates 
and change a few things, when i went admin there was no edit and there was 
no remove compiled, when i clicked on the design tab it said it can not 
design the app because it has been compiled. But i have to make updates on 
this specific app, how do I make my updates??? Please help!

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: Editing a compiled app

2019-01-18 Thread mostwanted
Yah I packed the compiled but i am not sure where i saved the source file! 
But i think i understand  what you are saying, I am gonna have to look for 
the original source file ( sweating bullets)!!!

Thanks Anthony

On Friday, January 18, 2019 at 8:56:07 PM UTC+2, Anthony wrote:
>
> Did you use "Pack compiled" to pack just the compiled files of the app, 
> and then install that compiled version? If so, it does not include the 
> original source files. Presumably you saved the source files somewhere, 
> right?
>
> On Friday, January 18, 2019 at 8:22:13 AM UTC-5, mostwanted wrote:
>>
>> Is there a way for me to edit an already compiled app? I worked on an 
>> app, compiled it and distributed as a binary to a client, they are using it 
>> as a standalone app, after some time of using it they want me to make 
>> updates and change a few things, when i went admin there was no edit and 
>> there was no remove compiled, when i clicked on the design tab it said it 
>> can not design the app because it has been compiled. But i have to make 
>> updates on this specific app, how do I make my updates??? Please help!
>>
>> 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: Editing a compiled app

2019-01-18 Thread mostwanted
Yah I packed the compiled but i am not sure where i saved the source file! 
But i think i understand  what you are saying, I am gonna have to look for 
the original source file ( sweating bullets)!!!

Thanks Anthony

On Friday, January 18, 2019 at 8:56:07 PM UTC+2, Anthony wrote:
>
> Did you use "Pack compiled" to pack just the compiled files of the app, 
> and then install that compiled version? If so, it does not include the 
> original source files. Presumably you saved the source files somewhere, 
> right?
>
> On Friday, January 18, 2019 at 8:22:13 AM UTC-5, mostwanted wrote:
>>
>> Is there a way for me to edit an already compiled app? I worked on an 
>> app, compiled it and distributed as a binary to a client, they are using it 
>> as a standalone app, after some time of using it they want me to make 
>> updates and change a few things, when i went admin there was no edit and 
>> there was no remove compiled, when i clicked on the design tab it said it 
>> can not design the app because it has been compiled. But i have to make 
>> updates on this specific app, how do I make my updates??? Please help!
>>
>> 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: decremental subtraction of values in DB field

2019-01-22 Thread mostwanted
I am currently getting the error below: 
* no such column: fuelLogging.ODO_Reading*
The problem is where i Highlighted 
def fuelLogging_before_update(*args, **kwargs):
db.fuelLogging.Delta.compute = lambda r: *(db.fuelLogging.ODO_Reading 
* -1)* + r.ODO_Reading

db.define_table('fuelLogging',
Field('ODO_Reading', 'integer'),
Field('Delta', 'integer', default=0))
db.fuelLogging._before_update.append(fuelLogging_before_update())


I still have a hardtime getting results


On Friday, January 18, 2019 at 8:43:36 AM UTC+2, mostwanted wrote:
>
>  Hey Anthony, my delta value still returns 0, its set default value, 
>
> *MODEL*
> def fuelLogging_before_update(*args, **kwargs):
> db.fuelLogging.compute = lambda r: (db.fuelLogging.ODO_Reading * -1) + 
> r.ODO_Reading
>
> db.define_table('fuelLogging',
> Field('ODO_Reading', 'integer'),
> Field('Delta', 'integer', default=0))
> db.fuelLogging._before_update.append(fuelLogging_before_update)
>
> but let me ask this, isn't the formula for our fuelLogging_before_update() 
> function supposed to be:
> *db.fuelLogging.Delta.compute = lambda r: (db.fuelLogging.ODO_Reading * 
> -1) + r.ODO_Reading*
> considering that we are trying to make updates to the *Delta *value?? 
> Just wondering!
>
> I want to believe my controller must be straight forward with NO special 
> formulas
> *CONTROLLER*
> def viewLog():
> details=db(db.fuelLogging).select(db.fuelLogging.ALL)
> return locals()
>
> *VIEW*
> {{extend 'layout.html'}}
>
> {{for details in details:}}
>
> ODO Reading: {{=details.ODO_Reading}}
> Delta: {{=details.Delta}}
> {{pass}}
>
>
> Nonetheless my delta value is still being returned as 0 
>
> I wanted to show my whole code in-case i am missing something somewhere, 
> its my first time using *callbacks on records*, i am not at all familiar 
> with them!
>
> 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] adding fields dynamically in web2y forms

2019-01-23 Thread mostwanted
I have a little invoice page in my app, but i also want people to be able 
to invoice as many things as possible at once without having to keep saving 
so many times, this is what i used:

*MODEL*
db.define_table("invoice", 
Field("product", "list:string"),
Field("price", "list:integer"),
format='%(product)s')

In my view i want these details displayed in an html table but they appear 
in list format, how do i remove them from the list to display them 
individually na d how do i sum up those in my price field?

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] fixing .table appears corrupted on a compiled application

2019-01-31 Thread mostwanted
Is it possible, any way possible to fix the *.table appears corrupted *error 
on a compiled application? if so how can i achieve this?
I have developed a hotel management application for some clients then 
suddenly this error appeard* ( File 
C:\.\web2py\applications\whapp2\databases\c8b669d15150d7109e5f7ab36744a5b7_quotationClient.table
 
appears corrupted) *but now i can not access the code because to add 
*migrate=False,fake_*
*migrate=True  *to the table! Now they can not access the saved information 
for all orders made

What can i do Please help!!!

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: fixing .table appears corrupted on a compiled application

2019-02-02 Thread mostwanted
I was able to solve this, i found an old version of the app, after 
installing it i overwrote it with corrupt version, that gave me the option 
to remove the compiled version and i was able to edit the code & fix my 
problem.

On Thursday, January 31, 2019 at 7:08:15 PM UTC+2, mostwanted wrote:
>
> Is it possible, any way possible to fix the *.table appears corrupted *error 
> on a compiled application? if so how can i achieve this?
> I have developed a hotel management application for some clients then 
> suddenly this error appeard* ( File 
> C:\.\web2py\applications\whapp2\databases\c8b669d15150d7109e5f7ab36744a5b7_quotationClient.table
>  
> appears corrupted) *but now i can not access the code because to add 
> *migrate=False,fake_*
> *migrate=True  *to the table! Now they can not access the saved 
> information for all orders made
>
> What can i do Please help!!!
>
> 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: fixing .table appears corrupted on a compiled application

2019-02-09 Thread mostwanted
Thank you @ Marcelo Huerta, i actually got to look at Fossil, its very 
flexible.

On Tuesday, February 5, 2019 at 6:28:31 PM UTC+2, Marcelo Huerta wrote:
>
>
> El domingo, 3 de febrero de 2019, 18:19:34 (UTC-3), Dave S escribió:
>>
>>
>> Back-ups are the nectar of the gods (nodding toward Greek mythonlogy)
>>
>>
>>>>
> Versioning systems for code, more so.
>
> Mostwanted, if you don't want to start with something heavy and unwieldy 
> as git, at the very least try Fossil <http://fossil-scm.org> 
>

-- 
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.


  1   2   3   4   5   >