[web2py] Web2py - How would I monitor an existing running script?

2020-01-20 Thread Simon Dreyer
Hi Folks, I have an existing python application that reads data from 
industrial controllers and publishes it to a message queue. The application 
is currently headless and logs errors and events to a log file. I would 
like to add a web interface to the application so that I can log into the 
app at any time and check the status while it is running. All the web2py 
examples that I have seen seem to load/run a python script when the user 
invokes a view, how would I invoke a connection to a script that is already 
running please?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/58c7a24b-606b-4ad8-9905-47c6eb9c13f7%40googlegroups.com.


[web2py] Re: no-email edit in profile

2018-12-19 Thread Simon Riek
Thanks Leonel, very helpful for my next application.
 
In my current production applications I have no user self registration, 
therefor it is sufficient for me to make the email field writable again 
(though I wouldn't edit gluon/tools.py, instead I used my own derived Auth 
class with a custom profile-function...I don't like messing around in the 
web2py core, it could break on the next update). 

-- 
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] no-email edit in profile

2018-12-14 Thread Simon Riek
Hello everyone,

i recently updated from 2.16.x to 2.17.2.

A commit in April introduced "table_user['email'].writable = False" into 
the profile form of Auth.

Since I need the email to be editable I have to implement my own profile 
form just for this single line. 

Wouldn't it make sense to control this via settings? 
e.g "self.settings.email_field_writable" (with default = false?

Or am I missing something?

Best regards

Simon



-- 
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 Grid Exporter since upgrade from 2.14.6 to 2.15.2 / 2.15.3

2017-08-07 Thread Simon Riek
Since updating from 2.14.6 to 2.15.2 (and also 2.15.3 released just moments 
ago) I have some problems with the default ExportClasses in SQLFORM.grid.
I am using MSSQL as database.
The grid displays just fine, only the export failed.

I'll spare you the complete traceback and get directly to what I could find 
by implementing my own ExportClass.

At first I got a , the relevant traceback 
was:

File "C:\Users\riek\PycharmProjects\web2py\gluon\sqlhtml.py", line 3563, in 
represented
row.append(record._extra[col])

I didn't use any type _extra fields, meaning that the regex check in line 
3562 failed (self.rows.db._adapter.REGEX_TABLE_DOT_FIELD.match(col)).

I then overwrote the "represented"-Function with my own, ignoring this 
check and forcing the else-branch. 

This lead to the following exception:  
'DAL' object has no attribute '"t_schule"'. So my tables and fields are 
escaped and thus not found.

I tried a solution I found somewhere else, setting entity_quoting=False in 
my DAL-instance, to no avail.

I then searched some more and found this bugfix: 
https://github.com/web2py/web2py/issues/1542
It appears that this fix escapes the tables and fields, no matter 
if entity_quoting is enabled or not.

I could solve my particular problem with an ugly hack, by removing the 
quotes in the represent-function of my ExportClass (line 3565 in 
sqlhtml.py: *(t, f) = col.replace('"','').split('.') * instead of *(t, f) = 
col.split('.')) *
I am wondering though if this is a bug or I am not properly understanding 
how the escaping works.




-- 
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: Processing taking a long time in web2py?

2016-11-17 Thread Simon Andersson
I'm asking why opening a process in a python script takes much less time 
than opening the same python code/process in a web2py application.

Also yes I will consider your second point but I think I will hide it 
behind authentication

On Thursday, 17 November 2016 22:53:50 UTC, Niphlod wrote:
>
> well... you're asking why opening a process in python rather than doing it 
> directly takes more time. no wonders there: of course it takes more time! 
> Especially if your process writes lots to stdout/stderr that python needs 
> to collect.
>
> BTW: never ever ever run ANY external process from the webserver: you 
> could easily be DDoSed AND you incur in lots of issues (random timeouts, 
> memory issues, leaks, and aforementioned slowness).
>

-- 
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: Processing taking a long time in web2py?

2016-11-17 Thread Simon Andersson
def run():
import os
import subprocess
ex = os.path.join('/home/user', "executable")


for i in range(2500):
a = -5.
b = 50.0
proc = subprocess.Popen([ex, str(a), str(b),],stdout=subprocess.PIPE
)
(out, err) = proc.communicate()


redirect(URL('here', args=request.args(0)))

-- 
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] Processing taking a long time in web2py?

2016-11-17 Thread Simon Andersson
Hi

I have a function that runs an executable using subprocess.
I want to run it in a loop, say 2500 times.

When I run this loop in a python script it takes 5 seconds.
When I run this loop on a web2py page it takes 23 seconds.
When I run this loop in web2py with reading and writing to an sqlite 
database it takes 30seconds.

Do you guys have any ideas on how to reduce this run time?

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: Copy and insert a row in a database

2016-11-09 Thread Simon Andersson

On Tuesday, 8 November 2016 17:54:48 UTC, Anthony wrote:
>
>
> The second argument to .store() should be the original filename (which 
> will then be encoded again), not a full file path. To get the original 
> filename, use the .retrieve() method instead of manually constructing the 
> file path and opening the file:
>
> filename, stream = db.name.file.retrieve(a.file)
> db.name.insert(..., file=db.name.file.store(stream, filename))
>
> Also, your use of a.file implies the upload field is named "file", but in 
> your insert code, you use "file_up" -- not sure which is correct.
>
> Anthony
>

 Thanks this is exactly what I was after! 

(I had edited the original code down to something more readable so it 
should have been consistent as "file")

-- 
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] Copy and insert a row in a database

2016-11-08 Thread Simon Andersson
Hi guys, I'm making a function to copy and insert a row of a database.

I want to copy and rename a file but the automatic b16 renaming becomes too 
long and breaks when you make a copy of a copy.

It also breaks some of my later processing of the file.

Here is some code:

def copy():
import os
a = db.name(db.name.id== request.args(0))
filepath = os.path.join(request.folder, 'uploads', a.file)
stream = open(filepath, 'rb')
db.name.insert(title= '%s_copy' % (a.title),
file_up = db.name.file.store(stream, filepath),

-- 
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: data processing conditional on form input

2016-11-08 Thread Simon Andersson
Solution was: 

def processing():
if db.dbname(db.dbname.id == request.args(0)).file == 'file1':
pathDir = /path/to/file1
else:
pathDir = /path/to/file2

-- 
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] data processing conditional on form input

2016-11-01 Thread Simon Andersson
Hey guys I have a relatively simple question to ask:

I have a form storing my input in an sqlite database.
Based on the response in the form I want to choose a certain file stored on 
the server.
How do I go about writing the if statement?

eg

db = DAL('sqlite://storage.sqlite')
db.define_table('dbname', Field('file', requires=IS_IN_SET(['file1','file2']
))) 




Then I want to write something conditional on the input being eg file1

def processing():
if db.dbname(request.args(0)).file == file1:
pathDir = /path/to/file1
else:
pathDir = /path/to/file2

What should I use to tell the processing to use the current row in the 
database? How do I tell the server to start processing once the form has 
been submitted?

Thanks!
-a noob

-- 
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: SQLFORM.grid links not working

2016-05-09 Thread Simon Carr
Thanks Anthony,

I actually got it working using request.args(len(request.args)-1)

Your solution is far more elegant. I have not used python for a few years 
and I forgot about slicing.

Thanks
Simon

On Monday, 9 May 2016 16:37:10 UTC+1, Anthony wrote:
>
> See my response here: 
> https://groups.google.com/d/msg/web2py/covZOWYOQ1M/NyZkDW5IBAAJ
>
> You need something like SQLFORM.grid(..., args=request.args[:1]).
>
> Anthony
>
> On Sunday, May 8, 2016 at 4:17:57 PM UTC-4, Simon Carr wrote:
>>
>> I think I now know why it's not working, but I don't know how to fix it. 
>> I think the issue is that I am filtering my supplier_contacts by getting 
>> the supplier_id from request.args(0) however, the links on the SQLFORM.grid 
>> look like this
>>
>> http://127.0.0.1:8000/srm/supplier/view/view/supplier_contacts/1
>>
>> As you can see the supplier_id is not collected by request.args(0).
>>
>> Is it possible for SQLFORM.grid to use url vars i.e.  
>>
>> http://
>> 127.0.0.1:8000/srm/supplier/view/view/supplier_contacts?supplier_id=1
>>
>>
>>
>> On Sunday, 8 May 2016 19:45:22 UTC+1, Simon Carr wrote:
>>>
>>> I have an SQLFORM.grid in a view to display a list of supplier contacts
>>>
>>> When I click "Add Record", I get the error below.
>>>
>>> Traceback
>>>
>>> 1.
>>> 2.
>>> 3.
>>> 4.
>>> 5.
>>> 6.
>>>
>>> Traceback (most recent call last):
>>>   File "E:\web2py\gluon\restricted.py", line 227, in restricted
>>> exec ccode in environment
>>>   File "E:\web2py\applications\srm\views\supplier/view.html", line 75, in 
>>> 
>>> AttributeError: 'NoneType' object has no attribute 'company_name'
>>>
>>>
>>>
>>> I don't understand why  'company_name' is causing an error because it is 
>>> not a field in my supplier_contacts table, it is in my supplier table.
>>>
>>>
>>>

-- 
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: SQLFORM.grid links not working

2016-05-08 Thread Simon Carr
I think I now know why it's not working, but I don't know how to fix it. I 
think the issue is that I am filtering my supplier_contacts by getting the 
supplier_id from request.args(0) however, the links on the SQLFORM.grid 
look like this

http://127.0.0.1:8000/srm/supplier/view/view/supplier_contacts/1

As you can see the supplier_id is not collected by request.args(0).

Is it possible for SQLFORM.grid to use url vars i.e.  

http://127.0.0.1:8000/srm/supplier/view/view/supplier_contacts?supplier_id=1



On Sunday, 8 May 2016 19:45:22 UTC+1, Simon Carr wrote:
>
> I have an SQLFORM.grid in a view to display a list of supplier contacts
>
> When I click "Add Record", I get the error below.
>
> Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
>
> Traceback (most recent call last):
>   File "E:\web2py\gluon\restricted.py", line 227, in restricted
> exec ccode in environment
>   File "E:\web2py\applications\srm\views\supplier/view.html", line 75, in 
> 
> AttributeError: 'NoneType' object has no attribute 'company_name'
>
>
>
> I don't understand why  'company_name' is causing an error because it is 
> not a field in my supplier_contacts table, it is in my supplier table.
>
>
>

-- 
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] SQLFORM.grid links not working

2016-05-08 Thread Simon Carr
I have an SQLFORM.grid in a view to display a list of supplier contacts

When I click "Add Record", I get the error below.

Traceback

1.
2.
3.
4.
5.
6.

Traceback (most recent call last):
  File "E:\web2py\gluon\restricted.py", line 227, in restricted
exec ccode in environment
  File "E:\web2py\applications\srm\views\supplier/view.html", line 75, in 

AttributeError: 'NoneType' object has no attribute 'company_name'



I don't understand why  'company_name' is causing an error because it is 
not a field in my supplier_contacts table, it is in my supplier table.


-- 
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: Not Authorized - but I don't know why

2016-05-08 Thread Simon Carr
I found the problem, I had to add

user_signature=False

to the SQLFORM.grid i.e. (SQLFORM.grid(.,user_signature=False)

This sorted out the problem


On Sunday, 8 May 2016 17:04:52 UTC+1, DenesL wrote:
>
>
> http://www.web2py.com/books/default/chapter/29/07/forms-and-validators#login-required-by-default-for-data-updates
> By default all the URLs generated by the grid are digitally signed and 
> verified. This means one cannot perform certain actions (create, update, 
> delete) without being logged-in.
>
>
> On Sunday, May 8, 2016 at 11:58:08 AM UTC-4, Simon Carr wrote:
>>
>> Here is the code in my controller.
>>
>> # -*- coding: utf-8 -*-
>> # try something like
>> def index():
>> return dict(message="hello from supplier.py")
>>
>>
>> def manage_suppliers():
>> links = [lambda row: A(SPAN(_class='glyphicon glyphicon-search'),' 
>> View',_class='button btn btn-default',_href=URL("supplier","view",args=[
>> row.id]))]
>> form = SQLFORM.grid(db.suppliers,links=links,details=False)
>> return locals()
>>
>>
>> def view():
>> supplier = db.suppliers(request.args(0))
>> form = SQLFORM.grid(db.supplier_contacts)
>> return supplier
>>
>>
>> I can get to manage_suppliers just fine, but when I click "View" against 
>> one of the suppliers I get "Not Authorized".
>>
>> If I remove 
>> form = SQLFORM.grid(db.supplier_contacts)
>>
>> from the the view method. It works fine, so the issue seems with this 
>> line of code.
>>
>

-- 
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] Not Authorized - but I don't know why

2016-05-08 Thread Simon Carr
Here is the code in my controller.

# -*- coding: utf-8 -*-
# try something like
def index():
return dict(message="hello from supplier.py")


def manage_suppliers():
links = [lambda row: A(SPAN(_class='glyphicon glyphicon-search'),' 
View',_class='button btn 
btn-default',_href=URL("supplier","view",args=[row.id]))]
form = SQLFORM.grid(db.suppliers,links=links,details=False)
return locals()


def view():
supplier = db.suppliers(request.args(0))
form = SQLFORM.grid(db.supplier_contacts)
return supplier


I can get to manage_suppliers just fine, but when I click "View" against 
one of the suppliers I get "Not Authorized".

If I remove 
form = SQLFORM.grid(db.supplier_contacts)

from the the view method. It works fine, so the issue seems with this line 
of code.

-- 
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 define tables in a new model file

2016-05-08 Thread Simon Carr
I created a new model and called it data.py

I created a definition for a table

db.define_table('suppliers',
Field('company_name','string'),
Field('address1','string'),
Field('address2','string'),
Field('town','string'),
Field('county','string'),
Field('country','string'),
Field('postcode','string'),
Field('telephone','string'))

But I get the error that db is not defined.

I thought db was already defined by db.py

-- 
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: Error No module named copy_reg after upgrading web2py

2016-02-05 Thread Simon Ashley
Having a similar issue this morning.

OS: windows 10.
Python distribution: Anaconda
Have an older project under version 2.9.11 / 214.09.15.23.35.11 which runs 
OK

Have downloaded a fresh copy of web2py from source this morning, and 
installed in a freshly created directory (c:\w2p_12 rather than c:\web2py).
Copied the application from the original folder to c:\w2p_12\applications\

Version
web2py™ Version 2.13.4-stable+timestamp.2015.12.26.04.59.39
Python Python 2.7.10: C:\Anaconda\pythonw.exe (prefix: C:\Anaconda)

Traceback

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

Traceback (most recent call last):
  File "C:\w2p_12\gluon\restricted.py", line 227, in restricted
exec ccode in environment
  File "C:/w2p_12/applications/csm02_4/models/db_ship.py" 
, line 204, 
in 
db.charge.id.writable = db.charge.id.readable = False
  File "C:\Anaconda\lib\site-packages\pydal\base.py", line 920, in __getattr__
return self.lazy_define_table(tablename, *fields, **args)
  File "C:\Anaconda\lib\site-packages\pydal\base.py", line 873, in 
lazy_define_table
polymodel=polymodel)
  File "C:\Anaconda\lib\site-packages\pydal\adapters\base.py", line 500, in 
create_table
sql_fields_old = pickle.load(tfile)
  File "C:\w2p_12\gluon\custom_import.py", line 95, in custom_importer
return base_importer(pname, globals, locals, fromlist, level)
ImportError: No module named copy_reg

-- 
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: Do I need to Install a Date base program

2015-10-29 Thread Simon Ashley
No, just use sqlite. Already configured for it.

On Friday, 30 October 2015 09:51:26 UTC+10, Glenn Plummer wrote:
>
> Since I am very new to web2py software am I correct in saying it does not 
> contain an actual database and you need to install one if you wish to use 
> the relational database to store data for availability web2py web page?
>

-- 
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: Thanks for pydal in pypi, python 3

2015-10-18 Thread Simon Ashley
If you're doing a lot of spreadsheet work, pydal and ipython notebook is a 
excellent combination.

-- 
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 inspired framework

2015-07-31 Thread Simon Ashley
+1. Quite like it for our use case and plan to direct more resources to it.




-- 
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 2.11.2 is OUT

2015-05-31 Thread Simon Ashley
On windows 8.1 and Chrome, I'm finding the Welcome screen badly formatted 
(no visible menus, unusual buttons etc).
Under Firefox and IE11. its fine.

https://lh3.googleusercontent.com/-yQKhCtaMTqo/VWqtmgjCH9I/Aaw/hcHQ7F-pxCs/s1600/chrome%2B2.11.2.png


On Sunday, 31 May 2015 02:37:25 UTC+10, Massimo Di Pierro wrote:

 There was a problem with 2.11.1 and it has been addressed in 2.11.2. 
 Please skip 2.11.1 and report any issue you may find with 2.11.2.

 Massimo


-- 
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: Linking directly to an uploaded image

2015-05-04 Thread Simon Marshall


 i've been trying to work this out but so far no image is showing, below is 
 my mvc:

 Model:

db.define_table('images',
Field('picture', 'upload', 
uploadfolder=request.folder+'static/uploaded')) 

Controller:

def index():
res = db(db.images).select()
#res = db(db.images.id==request.args(0)).select(db.images.picture)

return locals()

View: 

{{for row in res:}}
a class=thumbnail href=#
img src={{URL('static','uploaded',row.picture) }} /
/a
{{pass}} 

i can get the image to show when i do this - img 
src=../static/uploaded/{{=row.picture}} / but not the above, is using 
the URL helper is better?

-- 
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] if I use the one step production deployment will it overwrite these existing settings?

2015-03-05 Thread Simon Redmond
quick install question, I have postfix,dovecot apache and an ssl cert 
already installed and configured on my server, if I use the one step 
production deployment will it overwrite these existing settings?

-- 
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 static files and bootstrap 3

2015-03-04 Thread Simon Marshall
i would also like to know this please

-- 
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 deployment with installer script.

2015-02-16 Thread Simon Marshall
Hi All,

When installing on a ubuntu server with the install script does it 
configure the postgresql correctly? if it does what is the default DAL 
config to use it instead of SQLite?

is there any harm in using SQLite in a production environment?


Many Thanks,

Simon

-- 
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] queries from SQLFORM.grid and smart grid with related views

2015-02-13 Thread Simon Marshall
Hi All,

I'm trying to create a management interface for the following tables, but i 
cannot get it to work the way i want.

i'm trying to manage the auth_user table and another table containing a 
reference to auth_user. but i cannot get them to show as i'm unsure the 
best way to construct the query my code below:

Models

#player_stats.py#

db.define_table('player_stats', Field('player', 'reference auth_user'),
Field('events_attended','integer', 
default=0),
Field('player_kills','integer', default=0),
Field('player_deaths','integer', default=0)
)
db.player_stats._singular = Player Stats
db.player_stats._plural = Player Stats


##auth_user extra fields#

auth.settings.extra_fields['auth_user']= [
  Field('IOA_number', writable=False, unique=True, default=IOA_GEN(5,True)),
  Field('user_status', default='Active', 
requires=IS_IN_SET(['Active','Suspended','Banned'])),
  Field('nickname', 'string'),
  Field('date_of_birth', 'date', requires=IS_NOT_EMPTY()),
  Field('mobile', 'string', requires=IS_NOT_EMPTY()),
  Field('phone','string', requires=IS_NOT_EMPTY()),
  Field('address_line_1', 'string', requires=IS_NOT_EMPTY()),
  Field('address_line_2', 'string'),
  Field('address_line_3', 'string'),
  Field('city','string', requires=IS_NOT_EMPTY()),
  Field('post_code', 'string', requires=IS_NOT_EMPTY()),
  Field('county', 'string', requires=IS_NOT_EMPTY()),
  Field('country','string', requires=IS_NOT_EMPTY()),
  Field('medical_conditions', 'text'),
 

#Manage.py 

db.auth_user.id.readable=False 

#Define the fields to show on grid.
fields = (db.auth_user.IOA_number, db.auth_user.first_name, 
db.auth_user.last_name, db.auth_user.ioa_team_pref)

#Define headers as tuples/dictionaries
headers = {'auth_user.IOA_number':   'IOA ID',
   'auth_user.first_name': 'First Name',
   'auth_user.last_name': 'Last Name',
   'auth_user.last_name': 'Last Name',
   'ioa_team_pref': 'Team Preference',
}
#Default sort order in grid
default_sort_order=[db.auth_user.IOA_number]

#query to select the user profile and player stats
query = (db.auth_user)

form = SQLFORM.grid(query=query, fields=fields, headers=headers, 
orderby=default_sort_order,
create=auth.has_membership('Staff'), 
deletable=auth.has_membership('Staff'), 
editable=auth.has_membership('Staff'), maxtextlength=64, paginate=25)
return dict(form=form) 

what i am aftef, when i click on the view/edit buttons i would like to show 
field from both auth_user and player_stats. would i need to creating a 
custom view file.

Thanks in Advance,

Simon

-- 
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: Showing menu only after successful login

2015-02-11 Thread Simon Marshall
thank you to you both, i tried each solution and the second one works best 
for me!

Simon

-- 
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] Showing menu only after successful login

2015-02-10 Thread Simon Marshall

Hi All,

is there a way to hide the top menu until a person has logged in, i have a 
requirement that present a user just with a login page before the can do 
anything on the site.

Any suggestion or pointer would be grateful.

Thanks

Simon

-- 
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] correct way to add more fields to db

2015-02-08 Thread Simon Marshall
Hi All,

i have been using web2py for a couple of weeks now while following the 
videos on vimeo and i have a couple of questions.

1. what is the best way to add fields to database made by auth? i plan on 
making an app for an online social community where i need to be able to 
have an extensive user profile with certain statistics. Is it better to 
make a separate table and reference them or extend the auth user table?

2. Is there a way to edit the default user views? specfically the profile 
and registration pages?

3. is the CSS editing purely done in the web2py.css file? can override the 
with another file when creating a new layout for specific pages?

Best Regards,

Simon

-- 
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] extnding tables and modifying layouts

2015-02-08 Thread Simon Marshall
Hi all,

i've been learning web2py following the videos on vimeo and i have a few 
questions:

1. is it better to extend the auth user table? or create a new model and 
reference auth user of the current registered user? i plan on creating an 
online community app, that need a detailed user profile with certain 
statistics. the profile would need to made on registration. and then be 
viewable by other members. i also plan on have a news page and bookable 
events, with a management interface for staff members.

2. is there a way to edit the default user views? specifically the profile 
and registration pages? 

3. can i override the web2py.css file or is it better to create my own .css 
and layout file?

Many Thanks  Best Regards,


Simon

-- 
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: Australian Users

2014-12-22 Thread Simon Ashley
 That's a negative but went to school both ends of Johnston St. Family's in 
Vic for the holidays while I slave away on the GC on EOY system changes. 
 :) 
 
 

-- 
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: Australian Users

2014-12-17 Thread Simon Ashley
Where are you at?

-- 
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: presenting None values in SQLFORM.grid

2014-12-11 Thread Simon Ashley
something like this may help: 
db.table.field.represent = lambda value, row: DIV(value if value else '-', 
etc...)

-- 
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: RSVP: Massimo @ Bay Area web2py meetup (refreshments) -- 12/5/2014, 6:30PM - 9:00PM -- BE THERE!!!

2014-11-09 Thread Simon Ashley
Unfortunately, I'm out (snowed under with work).

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report 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 meetup with Massimo in north Bay Area

2014-09-16 Thread Simon Ashley

Tempted. Feel like an adventure.

-- 
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] getting type 'exceptions.IOError' [Errno 13] Permission denied over and over

2014-09-13 Thread Simon Ashley
Had installed the anaconda distribution so couldn't uninstall just pywin32. 
(needed it for other apps). No mention of it in the 8.1 registries. Renamed 
all pywin32 related files to non-descipt file extentions (on Win8.1) and 
have hammered it for the last 8 hours without issue. Another machine with 
win7, without modification, still sucks. Both development machines.

-- 
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] getting type 'exceptions.IOError' [Errno 13] Permission denied over and over

2014-09-11 Thread Simon Ashley



 quite painful on win8.1 and web2py™Version 
2.9.5-stable+timestamp.2014.03.16.02.35.39PythonPython 2.7.7: 
C:\Anaconda\python.exe (prefix: C:\Anaconda)


 

-- 
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: rname and reserved names

2014-07-22 Thread Simon Ashley
The missing piece was check_reserved=None. 

-- 
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: rname and reserved names

2014-07-21 Thread Simon Ashley
Thanks. I could, but need to check this for postgres. Seems a little bit 
strange when I have a look at the sql.log file:

timestamp: 2014-07-21T15:57:35.749000
 CREATE TABLE auth_cas(
 id INTEGER PRIMARY KEY AUTOINCREMENT,
 user_id INTEGER REFERENCES auth_user (id) ON DELETE CASCADE,
 created_on TIMESTAMP,
 service CHAR(512),
 ticket CHAR(512),
 renew CHAR(1)
 );
 success!
 timestamp: 2014-07-21T15:59:39.06
 CREATE TABLE this_is_the_easy_name_table(
 id INTEGER PRIMARY KEY AUTOINCREMENT,
 this_is_the_field_name CHAR(512)
 );
 success!


and when I look at the table generated, I get this:

(dp1
 S'position1'
 p2
 (dp3
 S'length'
 p4
 I512
 sS'unique'
 p5
 I00

 
Note that I've changed* position* to *position1* to escape the error and 
generate the table. I would have thought that it would have generated the 
rname. I might try a fresh dal.py source.

-- 
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: rname and reserved names

2014-07-21 Thread Simon Ashley
Thanks but basically, all we're trying to do is to specifically map the DAL 
field name to the name as stored in the database, and ascertain why our 
original scenario/ approach fails. 
(reserved names maybe only a subset of issues we're trying to avoid.
Have a feeling that a QUOTE_TEMPLATE solution may turn out to be 
inflexible. I think we are at cross purposes).

-- 
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: rname and reserved names

2014-07-21 Thread Simon Ashley
Thanks Niphlod, its the latter. A question just concerning rname/ quoting 
101. 
Haven't used it before, and trying baby steps to see how it works.
A simple working example would give me a push in the right direction.

While Limedrop raises interesting points which I''ll explore but its not 
where my headspace is currently at.

-- 
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] rname and reserved names

2014-07-20 Thread Simon Ashley

Haven't used rname before but the way I read it it should work with 
reserved names. Have changed a given example to read:

db.define_table('easy_name',
 Field http://127.0.0.1:8000/examples/global/vars/Field('position', 
rname='this_is_the_field_name'),
 rname='this_is_the_easy_name_table')

but it returns an error as follows:

Traceback (most recent call last):
  File C:\w2p_5\gluon\restricted.py, line 220, in restricted
exec ccode in environment
  File C:/w2p_5/applications/test_1/models/db_1.py 
http://127.0.0.1:8000/admin/default/edit/test_1/models/db_1.py, line 11, in 
module
rname='this_is_the_easy_name_table')
  File C:\w2p_5\gluon\dal.py, line 8223, in define_table
table = self.lazy_define_table(tablename,*fields,**args)
  File C:\w2p_5\gluon\dal.py, line 8240, in lazy_define_table
table = table_class(self, tablename, *fields, **args)
  File C:\w2p_5\gluon\dal.py, line 8754, in __init__
check_reserved(field_name)
  File C:\w2p_5\gluon\dal.py, line 7931, in check_reserved_keyword
'invalid table/column name %s is a %s reserved SQL/NOSQL keyword' % 
(name, backend.upper()))
SyntaxError: invalid table/column name position is a ALL reserved SQL/NOSQL 
keyword

Running 2.9.5

*There there something I've overlooked? TIA*




-- 
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: rname and reserved names

2014-07-20 Thread Simon Ashley


 Yep,  agree with that but to quote Niphlod 


*For the ones in need of:*

*- accessing legacy tables with some funny names *

 *- use reserved keywords for table and field names  *


https://groups.google.com/forum/#!msg/web2py/_q5qcARON4E/6JLCHM3eQHAJ 

-- 
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: SQLEDITABLE plugin

2014-07-01 Thread Simon Ashley
+1. Very nice work. Thanks you for sharing

-- 
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: cannot access web2py.com today

2014-06-26 Thread Simon Ashley
Finding it flaky as well.  Probably AWS playing up again.

-- 
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: Error while inserting in table with custom id

2014-06-26 Thread Simon Ashley
Believe it will be failing with the id=1 etc. Interfering with the primary 
key/ auto increment. Try it without.

-- 
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: Error while inserting in table with custom id

2014-06-26 Thread Simon Ashley


 I tend to agree with this. We ended up dropping the id field from 
 bulk_insert routines and if we need integrity (for references) in the 
 target databases, we would/ should base it on other fields.


-- 
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: PyCon AU

2014-04-30 Thread Simon Ashley
No, not an organiser, but thinking/ willing to organise some off agenda 
web2py functions for those who are interested
(papers are about to close, so maybe a bit late for something official). 
The main issue where you are is the travelling time (30 hours each way ex 
Chicago), rather than the expense.

-- 
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] PyCon AU

2014-04-29 Thread Simon Ashley
Anyone interested in attending http://2014.pycon-au.org/ in Brisbane, in 
August?

-- 
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 conference, next week!

2014-04-28 Thread Simon Ashley
Wouldn't be adverse to canvassing the idea of a weekend get together 
somewhere along the east coast ...

On Saturday, 26 April 2014 19:47:21 UTC+10, Greg Vaughan wrote:

 Make the next one in Sydney (Australia) Massimo :)

 Just joking... all the best for it and looking forward to seeing the 
 videos...

 On Saturday, 26 April 2014 13:08:01 UTC+10, Massimo Di Pierro wrote:

 Please register only if you plan to attend in person. We will record the 
 talks and post them.

 On Friday, 25 April 2014 16:29:28 UTC-5, David Rager wrote:

 Is there an online option (if you don't tick the will attend in 
 person)?

 On Thursday, April 24, 2014 9:20:56 AM UTC-6, Massimo Di Pierro wrote:

 There is one more to the first web2py conference

 http://www.experts4solutions.com/web2py_conference

 We got a bigger room and we can take 10-15 more people. register now!

 Massimo



-- 
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: Can the DAL produce pivot table query (for use with Google Charts Plugin)?

2014-03-22 Thread Simon Ashley


 or if you're not restricted to Google Charts, output the data as json in a 
 request from dc.js. If you're doing a bit of multidimensional analysis, it 
 can be a nice solution.



-- 
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: Example of web2py integration with an AJAX grid (preferably jquery based) which updates backend db ?

2014-03-07 Thread Simon Ashley
Try the simple things first (good exercise in debugging):


   1. ensure that jeditable is being loaded (check the code, and paths)
   2. if that passes, put a breakpoint (and the debugger) on the second 
   line (beginning with* id, column*) of *upd_dog_name*.
  1. check what *request.vars* are being passed (you can also use the 
  console, toward the bottom of the debug page to query variables)
   



-- 
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: I'm speaking at Melbourne PUG about web2py, 30 mins. Tips/e.g. slides?

2014-03-06 Thread Simon Ashley


 Where's it being held?


-- 
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/groups/opt_out.


[web2py] Re: Roadmap

2014-02-27 Thread Simon Ashley
Try some dc.js

-- 
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/groups/opt_out.


[web2py] Re: Problems with the server stalling out. Setting up debuging.

2014-02-02 Thread Simon Ashley
Spin up an instance on Rackspace/ Linmode/ Digital Ocean and compare the 
result. 
(have had unpleasant experiences with AWS and elements of this have a 
similar smell)




-- 
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/groups/opt_out.


Re: [web2py] Re: Problems with the server stalling out. Setting up debuging.

2014-02-02 Thread Simon Ashley
Not saying to move, but to identify where it could be infrastructure 
related. If so, you can take it up with Amazon support. 

On Monday, February 3, 2014 7:54:18 AM UTC+10, Encompass solutions wrote:

 Have others had issues similar to this on Amazon? 
 Takes a bit of effort to do such things, and eventually I will need many 
 of the services amazon provide to import the sites abilities.  Like S3 
 and the Transcoding services.  It would be a big step to move away from 
 Amazon. 
 Additionally, I think the issue should seriously be looked at because I 
 use Amazon on many sites my business runs and it would be a large 
 annoyance to have to transition just one of them. 
 BR, 
 Jason 


 On Sun, 2014-02-02 at 13:26 -0800, Simon Ashley wrote: 
  Spin up an instance on Rackspace/ Linmode/ Digital Ocean and compare 
  the result. 
  (have had unpleasant experiences with AWS and elements of this have a 
  similar smell) 
  
  
  -- 
  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 a topic in the 
  Google Groups web2py-users group. 
  To unsubscribe from this topic, visit 
  https://groups.google.com/d/topic/web2py/BZQF88jug54/unsubscribe. 
  To unsubscribe from this group and all its topics, send an email to 
  web2py+un...@googlegroups.com javascript:. 
  For more options, visit https://groups.google.com/groups/opt_out. 




-- 
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/groups/opt_out.


Re: [web2py] Re: Problems with the server stalling out. Setting up debuging.

2014-02-02 Thread Simon Ashley


On Monday, February 3, 2014 8:00:53 AM UTC+10, Simon Ashley wrote:

 Not saying to move, but to identify where it could be infrastructure 
 related. If so, you can take it up with Amazon support. (YMMV, but we had 
 significant issues leading to deprecation of 8 of our EC2 instances)

 


 On Monday, February 3, 2014 7:54:18 AM UTC+10, Encompass solutions wrote:

 Have others had issues similar to this on Amazon? 
 Takes a bit of effort to do such things, and eventually I will need many 
 of the services amazon provide to import the sites abilities.  Like S3 
 and the Transcoding services.  It would be a big step to move away from 
 Amazon. 
 Additionally, I think the issue should seriously be looked at because I 
 use Amazon on many sites my business runs and it would be a large 
 annoyance to have to transition just one of them. 
 BR, 
 Jason 


 On Sun, 2014-02-02 at 13:26 -0800, Simon Ashley wrote: 
  Spin up an instance on Rackspace/ Linmode/ Digital Ocean and compare 
  the result. 
  (have had unpleasant experiences with AWS and elements of this have a 
  similar smell) 
  
  
  -- 
  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 a topic in the 
  Google Groups web2py-users group. 
  To unsubscribe from this topic, visit 
  https://groups.google.com/d/topic/web2py/BZQF88jug54/unsubscribe. 
  To unsubscribe from this group and all its topics, send an email to 
  web2py+un...@googlegroups.com. 
  For more options, visit https://groups.google.com/groups/opt_out. 




-- 
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/groups/opt_out.


Re: [web2py] Re: Problems with the server stalling out. Setting up debuging.

2014-02-02 Thread Simon Ashley
One quick thing that could/ may rule it in or out is to change data 
centres. 
For example, in this part of the world, I would go for the SG rather than 
the local AU data centre.

On Monday, 3 February 2014 07:54:18 UTC+10, Encompass solutions wrote:

 Have others had issues similar to this on Amazon? 
 Takes a bit of effort to do such things, and eventually I will need many 
 of the services amazon provide to import the sites abilities.  Like S3 
 and the Transcoding services.  It would be a big step to move away from 
 Amazon. 
 Additionally, I think the issue should seriously be looked at because I 
 use Amazon on many sites my business runs and it would be a large 
 annoyance to have to transition just one of them. 
 BR, 
 Jason 


 On Sun, 2014-02-02 at 13:26 -0800, Simon Ashley wrote: 
  Spin up an instance on Rackspace/ Linmode/ Digital Ocean and compare 
  the result. 
  (have had unpleasant experiences with AWS and elements of this have a 
  similar smell) 
  
  
  -- 
  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 a topic in the 
  Google Groups web2py-users group. 
  To unsubscribe from this topic, visit 
  https://groups.google.com/d/topic/web2py/BZQF88jug54/unsubscribe. 
  To unsubscribe from this group and all its topics, send an email to 
  web2py+un...@googlegroups.com javascript:. 
  For more options, visit https://groups.google.com/groups/opt_out. 




-- 
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/groups/opt_out.


[web2py] Re: Need opinions/reviews about embedded jquery/javascript XHTML editor

2014-01-16 Thread Simon Ashley
Just to save you a little bit of time:

def advanced_editor(field, value):
return TEXTAREA(_id=str(field).replace('.', '_'), _name=field.name,_class
='text ckeditor',
_contenteditable='true', _toolbarStartupExpanded='false'
, value=XML(value), _cols=80)

Field('description','text',widget=advanced_editor ),

.description.represent = lambda v, r: XML(v);






On Thursday, 16 January 2014 17:23:18 UTC+10, weheh wrote:

 Good to hear that, since I just downloaded it. THANKS. Any more opinions?

 On Thursday, January 16, 2014 2:18:35 PM UTC+8, Simon Ashley wrote:

 +1 CKeditor seems to work fine, generically linked to text based widgets 
 in models. No heavy demands/ extensions through.



-- 
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/groups/opt_out.


[web2py] Re: Need opinions/reviews about embedded jquery/javascript XHTML editor

2014-01-15 Thread Simon Ashley
+1 CKeditor seems to work fine, generically linked to text based widgets in 
models. No heavy demands/ extensions through.

-- 
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/groups/opt_out.


Re: [web2py] Re: Writing Web2Py specification and finding free lance Web2Py coders

2014-01-13 Thread Simon Ashley
Yep but more community based and focused. W2p is still just a small subset 
of the hire a contractor market.  Elements could be open sourced and used 
by the wider community as slices. Maybe bounties/ rewards/ competitions to 
push applications that are currently thought bubbles (albeit mature ones) 
such as d3/dc.js wrappers, angular.js integration into one page w2py sites, 
w2py front ends to pacioli. Just floating the idea for comments etc


On Tuesday, January 14, 2014 3:58:05 AM UTC+10, Calvin Morrison wrote:

 elance.com? 




-- 
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/groups/opt_out.


[web2py] Re: Writing Web2Py specification and finding free lance Web2Py coders

2014-01-11 Thread Simon Ashley
Often thought that it would be good to push this to another level. We have 
projects from time to time that would be good to outsource, if people were 
interested. Something like a project post board, with bidders, assignment, 
monitoring and completion. 

-- 
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/groups/opt_out.


[web2py] Re: Why web2py and AnguljarJS?

2014-01-06 Thread Simon Ashley


 One point of view and YMMV. It depends on your application. You can build 
 very effective one page apps (typically the domain of client side tools) 
 with standard w2p components (.js, jquery). After all it's a framework 
 using a mix of tools. One can argue that w2p has broader scope, is more 
 homogeneous and handles back ends more effectively than Angular by itself. 
 Its also a eclectic environment for integration with other tools. Front 
 end jquery becomes verbose when you start to push it. At that point you can 
 start introducing angular's methods. Any developer needs multiple tools and 
 the ability to select different ones depending on the needs. 


-- 
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/groups/opt_out.


[web2py] Re: slice added showing technique for inline SQLFORM.grid editing (no plugin)

2013-12-31 Thread Simon Ashley
+1 ... inspired a solution to a long standing issue. May have to take back 
a few things I've said about Collingwood of late :)

-- 
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/groups/opt_out.


[web2py] Re: I'm really struggling - Upload file, parse out variables, display in a table.

2013-12-27 Thread Simon Ashley


Failing any other replies, this is what we do:

   1. copy the file to the server (read then write; we get the files first 
   and store them natively, outside a db, for later batch processing ) 
   2. use ElementTree to parse the file to get a decent dict
   3. use the dict in a bulk_insert into the db file
   4. sqlform it to the view

 


-- 
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/groups/opt_out.


[web2py] Re: I'm really struggling - Upload file, parse out variables, display in a table.

2013-12-27 Thread Simon Ashley


A little difficult to share to code (done for a client, its similar and but 
not exactly what you're doing i.e. maybe a lot more complicated than what 
you need), but I think you're almost there. 

You need to upload the files to the server, then parse them to get each 
dict. My understanding is that you don't have issues generating the dict 
and there it should be a simple bulk_insert ...  
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=bulk_insert
.

My feeling that you may be having issues with parsing the uploaded file and 
you should be able to get the file name/ location for parsing routines by 
following 
http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=upload#SQLFORM-and-uploads

-- 
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/groups/opt_out.


[web2py] Re: I'm really struggling - Upload file, parse out variables, display in a table.

2013-12-27 Thread Simon Ashley

   
   1. We just do it in the controller as a function . Try an .insert but 
   .bulk_insert should be fine for individual records.
   2. You may need a path to find the file.

Following code is cut, pasted and sanitised from a working controller.
(for illustration only)

## initiates getting files from a remote server
def GET():
getfile('_00_S_BTRI')
getfile('_ST_S_ELST')


## reads remote files and writes to a folder on the local server
def getfile(f3):
import datetime
from datetime import date, timedelta
import urllib2
import contextlib
import requests
import time
f0 = 'http://mcs./getfile.aspx?filename='
dr = 15 #target range

today = datetime.date.today()
for x in range(dr):
start = today-timedelta(days=x)
f1 = start.strftime('%Y%m%d')
path = os.path.join(request.folder, 'data//')
f4 = '.xml'
file1 = f0 + f1 + f3 + f4
try:
u = urllib2.urlopen(file1)
except urllib2.HTTPError, e:
print str(e)
else:
if not 'alert' in u.read(100):
rf = requests.get(file1)
wf = open(path + f1 + f3 + f4, 'w')
for line in rf:
newline = line
wf.write(newline)
wf.close()


# scans folder and writes db records of files found
def update_PROCESS():
import os
path = os.path.join(request.folder, 'data\\')
p1 = {}
d1 = {}
d2 = {}
for files in os.listdir(path):
if files.endswith(.xml):
p1 = path + files
dd1 = {'FILE': p1}
d1.update(dd1)
dd2 = {'PREFIX': p1[-8:-4]}
d1.update(dd2)
d1.update({'UPDATED':0})
d1.update({'RETRIEVED':datetime.now()})
db1.PROCESSING.bulk_insert([d1])
db.commit()


# processes unprocessed files
def PROCESS():
q = db1(db1.PROCESSING.UPDATED == 0).select()
if q:
for row in q:
f1 = row.FILE
if row.PREFIX == 'ASUM':
try:
attend(f1)
d1 = db1.PROCESSING.update_or_insert((db1.PROCESSING.id 
== row.id), UPDATED = 1, PROCESSED=datetime.now())
except:
d1 = db1.PROCESSING.update_or_insert((db1.PROCESSING.id 
== row.id), UPDATED = 2)
db1.commit()


# reads file, create dict, performs bulk_insert
def atten(f1):
from xml.etree import ElementTree
with open(f1, 'rt') as f:
try:
tree = ElementTree.parse(f)
except:
pass
else:
dh = {}
dd = {}

def onlyascii(char):
if ord(char)  32 or ord(char)  127: return ''
else: return char

for node in tree.iter():
if node.tag == 'ATTEN':
dh = node.attrib

if node.tag == 'RECORD':
dd = node.attrib
remap = 
{'DATE':'RECORD_DATE','TOTAL':'RECORD_TOTAL','PUBLIC':'RECORD_PUBLIC','MEMS':'RECORD_MEMS','COSE':'RECORD_COSE'}
dd = dict((remap[key], value) for (key, value) in 
dd.items())
dd.update(dh)
db1.ATTEN.bulk_insert([dd])
dd = {}
db1.commit()


-- 
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/groups/opt_out.


[web2py] Re: How to represent dynamic fields in table

2013-12-25 Thread Simon Ashley
On a related note, is there a way to control the order/ sequence of the 
generated fields? 
(i.e. each time the model is run, generated fields will be returned in a 
different order)

-- 
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/groups/opt_out.


[web2py] Pycon 2014?

2013-12-19 Thread Simon Ashley
Just contemplating the 4+ days to get to and from Pycon '14 (Montreal) and 
although its not on the schedule, wondering if there will be any web2py 
involvement (official or otherwise)

-- 
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/groups/opt_out.


[web2py] Format date after selecting field from database

2013-12-09 Thread Simon Carr
I have this line 
   
 
 comment_RS = self.db(self.db.aol_comments.aol_id == item.text(0)).select(
orderby=~self.db.aol_comments.comment_date) 
  
 

 I want to format the date field like dd/mm/ 
 
How would I do this in Python?
 
Thanks
Simon

-- 
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/groups/opt_out.


[web2py] Loaded SQLForm.grid file upload fails

2013-11-07 Thread Simon Ashley
Have an issue where files can't be uploaded via a SQLFORM.grid form that is 
loaded/ called via ajax. 

The update/ create write to the table fails. 
If a file isn't selected, and other fields are updated, the write is 
successful.

A non ajax called form works OK.

The error message following a failed update is: 
Uncaught InvalidStateError: An attempt was made to use an object that is not
, or is no longer, usable.

The following duplicates the issue:

*Model*
db.define_table('dogs', Field('dog', 'string'), format='%(dog)s')
db.define_table('fleas', Field('dog', 'reference dogs'), Field('flea_file', 
'upload'))

*Controller*
*flea_test*
db.dogs.truncate()
db.dogs.insert(dog='gus')
db.dogs.insert(dog='spot')

def dogs():
g = SQLFORM.grid(db.dogs)
return dict(grid=g)

def fleas():
g = SQLFORM.grid(db.fleas)
return dict(grid=g)

def fleas_1():
return dict()

*Views*
*fleas_1 (the entry point)*
{{extend 'layout.html'}}
div
{{=LOAD('flea_test', 'fleas', ajax=True, cid='f1')}}
/div
(note: also occurs with *web2py_component *calls)

*fleas*
{{=grid}}


Using 2.7.4-stable+timestamp.2013.10.14.15.16.29
web2py.js, jquery.js are dated 2013-9-15

Any ideas/ pointers/ failings on my behalf?
TIA

-- 
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/groups/opt_out.


[web2py] Re: Loaded SQLForm.grid file upload fails

2013-11-07 Thread Simon Ashley
Thanks Niphlod

-- 
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/groups/opt_out.


[web2py] Re: OLAP python style

2013-11-05 Thread Simon Ashley


 +1. Thanks for sharing. Worth further investigation. 

-- 
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/groups/opt_out.


[web2py] Re: wsgi on directory

2013-11-02 Thread Simon Berry
Please could someone who has actually set up an Apache server with WSGI and 
successfully mounted www.[domain].com/web2py kindly weigh in on this topic?

As a newbie to this group, there seem to be a lot of people requesting this 
- however none of the solutions posted has worked for me yet...


On Friday, October 11, 2013 3:19:58 PM UTC-4, Niphlod wrote:

 you have to play hard with apache rewrite rules 
 I'm not an expert on apache configs (as soon as nginx was out, it was 
 clear to me that its syntax was more understandable to me) but basically 
 you need to tell your apache that everything coming to / should be passed 
 to joomla, except /web2py/ that should be treated by mod_wsgi.

 On Friday, October 11, 2013 6:44:22 PM UTC+2, Vicente Deluca wrote:

 Hi, I'm running web2py like wsgi (
 http://web2py.com/book/default/chapter/13#mod_wsgi) and that's fine, I 
 can access to my web2py on www.[domain].com. But I need now run the same on 
 www.[domain].com/web2py, because on www.[domain].com are running one joomla 
 system.

 What I have to modify?

 Thanks a lot.

 Vicente.



-- 
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/groups/opt_out.


[web2py] Web2Py, Apache, WSGI and a mount point other than /

2013-11-02 Thread Simon Berry
Does the latest version of Web2Py using Apache and WSGI support a mount 
point of anything other than /?

The following works on my system i.e. when I go to www.[mydomain].com the 
hello world app comes up.  (This is a line from my 
/etc/apache2/sites-available/www.[mydomain].com file.)

WSGIScriptAlias / /home/www-data/web2py/wsgihandler.py

The following does not work on my system i.e. when I go to 
www.[mydomain].com/ace the hello world app DOES NOT come up.

WSGIScriptAlias /ace /home/www-data/web2py/wsgihandler.py

While relatively new to Web2Py, I have read the book, browsed the web, 
reviewed the topics here - and have yet to find a solution that works.  I 
saw in one previous answer “it is very easy” and to do

#in routes.py 
routes_out=(('(?Panything.*)','/ace\ganything'),)

But this has not worked for me.

Should this work?  Am I the only one suffering?  Is there a way that does 
actually work?

Thanks in advance!

-- 
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/groups/opt_out.


[web2py] Re: Example of web2py integration with an AJAX grid (preferably jquery based) which updates backend db ?

2013-10-07 Thread Simon Ashley
w2p is a great framework with many bells and whistles. 
Examples/ defaults are full of them. 
One of the issue when you're learning the framework, you need to take baby 
steps, and study them one at a time. 
(particularly if, like myself, you are new to python, js, CSS3, Bootstrap, 
etc, etc and feel, at times, you dumber than dogs...)

The example posted was stripped from a larger system, sanitised and tested. 
Unfortunately, I didn't strip out a few (i.e truncate) testing lines.
 
I find simple, one or 2 line code snippets, great (the smaller the better).
Its easier to join/ merge later.

Similar comments go for troubleshooting and posting issues.
Its always easier for others if you reduce code just to key elements, to 
illustrate the point.
Slices are good, but they are a bit static/ non interactive.

I'm now wondering how difficult it would be to clone and host a jsfiddle 
type sandbox in w2p, whereby we could post, share, test and modify code 
snippets within the community?

-- 
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/groups/opt_out.


[web2py] Re: Example of web2py integration with an AJAX grid (preferably jquery based) which updates backend db ?

2013-10-05 Thread Simon Ashley
Just remark out/ delete the truncate fleas line.
If the 'upd_dog_name' function is not called, check installation and 
calling of jeditable

-- 
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/groups/opt_out.


[web2py] Re: how to assign classes to TDs in SQLFORM.grid

2013-09-24 Thread Simon Ashley
Suspect that a jquery onclick event may be involved, followed by a 
calculateSum. 
Would help if you posted a simple example of what you need to happen.
(based on lateral thinking/interpretation of your first paragraph)

-- 
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/groups/opt_out.


[web2py] Re: how to assign classes to TDs in SQLFORM.grid

2013-09-24 Thread Simon Ashley


 May not work out of the box but a hint could include something like 
 $(this).find('td').eq(1).addClass('highlighted')



-- 
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/groups/opt_out.


[web2py] response.js is executed twice unless I set web2py-component-content

2013-09-07 Thread simon
When I set response.js it seems to get executed twice. This is because of 
the following code in web2py.js:

   /* run this here only if this Ajax request is NOT for a web2py 
component. */
if(xhr.getResponseHeader('web2py-component-content') == null) {
  web2py.after_ajax(xhr);
};

What is the purpose of this? Do I have to set web2py-component-content as 
well as response.js?

-- 

--- 
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/groups/opt_out.


[web2py] Re: Example of web2py integration with an AJAX grid (preferably jquery based) which updates backend db ?

2013-09-06 Thread Simon Ashley
Thanks, enjoy.  Most of our forms are loaded and still works fine.

-- 

--- 
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/groups/opt_out.


[web2py] Re: Example of web2py integration with an AJAX grid (preferably jquery based) which updates backend db ?

2013-09-04 Thread Simon Ashley
Download jeditable, 
Install in the static/js folder.

Include in layout.html i.e.
  script src={{=URL('static','js/jquery.jeditable.js')}}/script


*Model*
db.define_table('dogs',
Field('dog_name','string'))


*Controller:*
def populate():
db.dogs.truncate()
db.fleas.truncate()
db.dogs.insert(dog_name='dagwood')
db.dogs.insert(dog_name='daisy')

def dogs():
db.dogs.dog_name.represent = lambda value, row: DIV(value if value else 
'-',_class='dog_name', _id=str(row.id)+'.dog_name')
g = SQLFORM.grid(db.dogs, searchable=False, csv=False, user_signature=
False)
return dict(form = g)


def upd_dog_name():
id,column = request.post_vars.id.split('.')
value = request.post_vars.value
db(db.dogs.id == id).update(**{column:value})
return value


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

script
jQuery(document).ready(function(){
jQuery('.dog_name').editable({{=URL('dogs', 'upd_dog_name')}},{   

tooltip: Click to edit, enter to save,
 indicator : 'updating',
 });})
/script


div id='dogs'
{{=form}}
/div



-- 

--- 
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/groups/opt_out.


[web2py] Re: Example of web2py integration with an AJAX grid (preferably jquery based) which updates backend db ?

2013-09-03 Thread Simon Ashley

jeditable is reasonably easy to work with for a cell at a time editing, and 
works with SQLFORM.grids. Have played around with kendoui grids and their 
editing is some of the nicest. Could put together some crude examples.

-- 

--- 
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/groups/opt_out.


[web2py] Re: new web2py.js changes the sequence of execution

2013-08-29 Thread simon
Niphlod - I have tried latest trunk and get same issue. 

Paolo - I tried that but it makes no difference. 

Anthony is correct. The problem is:
 that the  eval(decodeURIComponent(command)) happens in ajax.success then 
the t.html(html);



On Thursday, 29 August 2013 14:54:19 UTC+1, Paolo Valleri wrote:

 Just to understand better what is going on, try to comment line 257 in 
 web2py.js 
 or even better the whole success block.

 Paolo

 On Thursday, August 29, 2013 3:42:29 AM UTC+2, Anthony wrote:

 Looks like this 
 changehttps://code.google.com/p/web2py/source/browse/applications/admin/static/js/web2py.js?r=b995ca36cd33a28339d54f15bcf8eebb6d58f2e6was
  actually made in January in response to this 
 issue https://code.google.com/p/web2py/issues/detail?id=1254. 
 Technically, I suppose it does break backward compatibility because 
 previously web2py-component-command (i.e., the content of response.js) was 
 executed synchronously after the component content loaded, and now it is 
 run asynchronously. Actually, this was probably not a good move, because 
 you might need the JS to run after the component content has loaded, so we 
 might want to revert this change. The web2py-component-command and 
 web2py-component-flash headers were intended for use specifically with 
 components. If we want to enable such functionality more generally, perhaps 
 we should use alternative headers for that purpose. Please open an issue 
 about this and link back to this thread.

 Anthony

 On Wednesday, August 28, 2013 1:20:53 PM UTC-7, simon wrote:

 I have some very simple jquery scripts for creating dialog boxes. This 
 was all working fine until the replacement of web2py.js in release 5113. 
 However now it no longer works.

 The pre-5113 version had a web2py_ajax_page complete function that first 
 filled my dialog box and then executed response.js in that order.

 The new version does these two things asynchronously.  Response.js is 
 executed within event_handler and generally this happens before the 
 ajax_page complete function.

 Is there some reason why this was changed or could it be changed back so 
 things happen in the same sequence? This does break backward compatibility.




-- 

--- 
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/groups/opt_out.


[web2py] Re: new web2py.js changes the sequence of execution

2013-08-29 Thread simon


New version of web2py.js executes:
   eval(decodeURIComponent(command))in ajax.success
   t.html(html) in ajax.complete
However in the previous version these two commands executed in the reverse 
order.



If I change doc.ajaxSuccess to doc.ajaxComplete then it works.Not sure if 
this breaks something else though!

Have logged as an issue.


On Thursday, 29 August 2013 14:54:19 UTC+1, Paolo Valleri wrote:

 Just to understand better what is going on, try to comment line 257 in 
 web2py.js 
 or even better the whole success block.

 Paolo

 On Thursday, August 29, 2013 3:42:29 AM UTC+2, Anthony wrote:

 Looks like this 
 changehttps://code.google.com/p/web2py/source/browse/applications/admin/static/js/web2py.js?r=b995ca36cd33a28339d54f15bcf8eebb6d58f2e6was
  actually made in January in response to this 
 issue https://code.google.com/p/web2py/issues/detail?id=1254. 
 Technically, I suppose it does break backward compatibility because 
 previously web2py-component-command (i.e., the content of response.js) was 
 executed synchronously after the component content loaded, and now it is 
 run asynchronously. Actually, this was probably not a good move, because 
 you might need the JS to run after the component content has loaded, so we 
 might want to revert this change. The web2py-component-command and 
 web2py-component-flash headers were intended for use specifically with 
 components. If we want to enable such functionality more generally, perhaps 
 we should use alternative headers for that purpose. Please open an issue 
 about this and link back to this thread.

 Anthony

 On Wednesday, August 28, 2013 1:20:53 PM UTC-7, simon wrote:

 I have some very simple jquery scripts for creating dialog boxes. This 
 was all working fine until the replacement of web2py.js in release 5113. 
 However now it no longer works.

 The pre-5113 version had a web2py_ajax_page complete function that first 
 filled my dialog box and then executed response.js in that order.

 The new version does these two things asynchronously.  Response.js is 
 executed within event_handler and generally this happens before the 
 ajax_page complete function.

 Is there some reason why this was changed or could it be changed back so 
 things happen in the same sequence? This does break backward compatibility.




-- 

--- 
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/groups/opt_out.


[web2py] new web2py.js changes the sequence of execution

2013-08-28 Thread simon
I have some very simple jquery scripts for creating dialog boxes. This was 
all working fine until the replacement of web2py.js in release 5113. 
However now it no longer works.

The pre-5113 version had a web2py_ajax_page complete function that first 
filled my dialog box and then executed response.js in that order.

The new version does these two things asynchronously.  Response.js is 
executed within event_handler and generally this happens before the 
ajax_page complete function.

Is there some reason why this was changed or could it be changed back so 
things happen in the same sequence? This does break backward compatibility.


-- 

--- 
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/groups/opt_out.


[web2py] Jquery 404 error

2013-08-26 Thread Simon Ashley
Having an issue with passing javascript variables to a controller (as in a 
click or button call). 
A common thread running through all the attempts is an error in loading 
jquery, returning a 404 error. 
As a simple example, consider the following:

*MODEL:*
db.define_table('dogs',
Field('dog_name','string'),
Field('dComment','string'))

db.define_table('fleas',
Field('dog_name','string'),
Field('flea_name','string'),
Field('fDescription','string'))

*CONTROLLER:*
def populate():
db.dogs.truncate()
db.fleas.truncate()
db.dogs.insert(dog_name='dagwood')
db.dogs.insert(dog_name='daisy')
db.fleas.insert(dog_name='daisy', flea_name='felix')
db.fleas.insert(dog_name='dagwood', flea_name='fatso') 

def dogs():
g = SQLFORM.grid(db.dogs, searchable=False, csv=False)
return dict(form = g)


def fleas():
q = (db.fleas.dog_name == request.vars.dog_name)
g = SQLFORM.grid(q, searchable=False, csv=False)
return dict(form = g)

*VIEW:*
DOGS
{{extend 'layout.html'}}
div id='dogs'
{{=form}} 
/div

div id='fleas'
/div

script
$(document).ready(function(){
$('tr').click(function () {
var rec_id = $(this).find('td').eq(0).text();
ajax(fleas+?+rec_id,[],'fleas');});})
/script
(basically the same as the solution proposed by Anthony in 
https://groups.google.com/forum/#!searchin/web2py/pass$20variable$20to$20controller/web2py/5rXctmuIj9o/J9b1wQDIiPsJ
) 

FLEAS:
{{=fleas}}


*Procedure*: 
click on a row, it should make a call to flea function, but returns a 
 ..jquery-1.10.0.min.map 404 error
(using a 2.5.1 fresh stable version)

Any pointers?

-- 

--- 
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/groups/opt_out.


Re: [web2py] Jquery 404 error

2013-08-26 Thread Simon Ashley
Thanks for the link.
You were right.
The error was elsewhere in the example.
Will revisit the actual/ primary issue.




-- 

--- 
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/groups/opt_out.


[web2py] Re: auth.wiki() allow guests to view the wiki

2013-08-20 Thread Simon Carr
Very sorry,

I know now what I was doing. I changed the name of the page from index to 
Hello World, so when I tried to visit the page it was asking me to create 
the index page, which of course required me to login.

Thanks
Simon

On Monday, 19 August 2013 21:36:20 UTC+1, Alan Etkin wrote:

 Hi,

 I am trying to make use of auth.wiki() but I am finding that to even a 
 view a wiki page I have to be logged in. I want visitors to be able to view 
 the wiki pages without having to first register an account.


 Are you using the default settings? AFAIK, wikis are public by default 
 unless you enable permissions.


-- 

--- 
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/groups/opt_out.


[web2py] auth.wiki how to align and resize images

2013-08-20 Thread Simon Carr
I have added a photo to my page using Edit Page Media

 I have added the following line to my page to display the image

@1/road.jpg

This gives me the image full size and centered. 

Is there something I can include on this line to add style such as size and 
alignment?

-- 

--- 
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/groups/opt_out.


[web2py] Re: auth.wiki how to align and resize images

2013-08-20 Thread Simon Carr
I found the solution myself here is how to do it

[[The Road [This is a picture of the road] @1/road.jpg left 150px]]

I found the answer on http://www.web2py.com/init/static/markmin.html

[[alt-string for the image [the image title] 
http://www.web2py.com/examples/static/web2py_logo.png right 200px]].

On Tuesday, 20 August 2013 10:28:36 UTC+1, Simon Carr wrote:

 I have added a photo to my page using Edit Page Media

  I have added the following line to my page to display the image

 @1/road.jpg

 This gives me the image full size and centered. 

 Is there something I can include on this line to add style such as size 
 and alignment?



-- 

--- 
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/groups/opt_out.


[web2py] Re: plugin_clientapi

2013-08-20 Thread Simon Ashley
Thanks Alan, will do so in the next couple of days (after current deadlines)

-- 

--- 
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/groups/opt_out.


[web2py] auth.wiki() allow guests to view the wiki

2013-08-19 Thread Simon Carr
Hi,

I am trying to make use of auth.wiki() but I am finding that to even a view 
a wiki page I have to be logged in. I want visitors to be able to view the 
wiki pages without having to first register an account.

How do I do this?

Thanks
Simon

-- 

--- 
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/groups/opt_out.


[web2py] plugin_clientapi

2013-08-18 Thread Simon Ashley

Alan, you you have a simple example app, that just goes through the basics.
Have looking at it and trying to learn it but have come up against 
configuration issues/ errors.
It would help me out if I could study a simple app, that works, to see 
where I've gone wrong.
TIA

-- 

--- 
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/groups/opt_out.


[web2py] Re: accounting appliance

2013-08-09 Thread Simon Ashley
You could get a head start by forking this: 
https://github.com/mdipierro/pacioli

-- 

--- 
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/groups/opt_out.


[web2py] is this is postgres issue with groupby?

2013-08-07 Thread Simon Carr
Hi,

in the docs it uses this code as an example.

for row in db().select(
db.person.ALL,
orderby=db.person.name, groupby=db.person.name):
print row.name
Alex
Bob
Carl


When I run this code it fails.

rsSuppliers = db().select(
db.weekly_data.ALL,
orderby=db.weekly_data.supplier_name, groupby=db.weekly_data.
supplier_code)

I get this error
gluon.contrib.pg8000.errors.ProgrammingError: ('ERROR', '42803', 'column 
weekly_data.id must appear in the GROUP BY clause or be used in an 
aggregate function')

I think this issue is related specifically to postgres. How do I group by 
supplier_code and get the first supplier_name?

-- 

--- 
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/groups/opt_out.




Re: [web2py] is this is postgres issue with groupby?

2013-08-07 Thread Simon Carr
So the web2py documentation is incorrect then and  the db.person.ALL line 
removed from the example.




-- 

--- 
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/groups/opt_out.




Re: [web2py] is this is postgres issue with groupby?

2013-08-07 Thread Simon Carr
does gluon have notion of .first() (as in sum(), count(), first())?. If 
some change to gluon is going to be made in the future then you could have 
gluon assume that table.ALL when used with groupby should refer to the 
first value in each group.

On Wednesday, 7 August 2013 12:20:29 UTC+1, Johann Spies wrote:

 Yes, I think the documentation is not correct.  It is nonsensical anyhow 
 to do a groupby when you select all the fields including the primary key 
 id.  Groupby groups similar values and if you do select.ALL there cannot be 
 two similar records.

 Regards
 Johann


 On 7 August 2013 13:15, Simon Carr simon...@gmail.com javascript:wrote:

 So the web2py documentation is incorrect then and  the db.person.ALL line 
 removed from the example.



  -- 
  
 --- 
 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 javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  




 -- 
 Because experiencing your loyal love is better than life itself, 
 my lips will praise you.  (Psalm 63:3)
  

-- 

--- 
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/groups/opt_out.




[web2py] Re: GET request from kendo ui returning an invalid argument

2013-08-04 Thread Simon Ashley
Solution:

This _=1375342185703 is appended by jQuery.ajax which the Kendo DataSource 
uses under the hood. That thing is used as a cache buster (prevents browser 
caching). The fix is simple - disable jQuery caching:

transport: {
   read: {
  url: your service,
  dataType: jsonp,
  cache: true // enable caching which disables the cache buster
   }
}

-- 

--- 
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/groups/opt_out.




  1   2   3   4   5   >