Re: [web2py] Re: janrain and web2py

2014-03-28 Thread Quint
But, like already mentioned, there _is_ an alternative:

https://github.com/omab/python-social-auth



-- 
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: Finnish language translator

2014-03-28 Thread at

Thank$ : )

-- 
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: Finnish language translator

2014-03-28 Thread 黄祥
for start i think you can do like example below, the rest will 
automatically add when the page is load in finnish language, and please 
translate the loaded new phrase on the fi.py file.
e.g.
*languages/fi.py*

# -*- coding: utf-8 -*-
{
'!langcode!': 'fi',
'!langname!': 'Finnish',
'Application name:': 'Sovelluksen Nimi:',
}

if you want, i think you can add your fi.py to the web2py github, so that 
another webp2y user that use finnish language can also use the default that 
already trasnlated.

best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Cannot unzip the downloaded files from http://www.web2py.com/init/default/download

2014-03-28 Thread Antonis Loumiotis

On Thursday, March 27, 2014 8:12:42 PM UTC+2, Dave S wrote:



 On Thursday, March 27, 2014 4:00:43 AM UTC-7, Antonis Loumiotis wrote:

 Hi,

 I'm trying to unzip (using 7-zip) the source code obtained from 
 http://www.web2py.com/init/default/download but I get the following 
 error:

 Can not open file 'C:\Documents and Settings\...\web2py_src.zip' as 
 archive.

 Actually I face the same problem with any of the files in 
 http://www.web2py.com/init/default/download.

 My operating system is Windows XP and I have already installed 
 Python27.   


 Any ideas?  I'm a newbie, just started teaching myself web programming 
 using Python...
  


 Nope, I don't have any ideas beyond ... broken download.  I've just done a 
 quick check of those downloads.  Beyond Compare has no trouble opening the 
 files using its archive handlers, and on Windows 8, explorer.exe (Windows 
 Explorer) is able to open the file (as a virtual folder) and extract files 
 (I opened VERSION in Notepad).

 Check the MD5 checksums of the download.It looks like you should get 
   4725AD01EE5AC287F8B4E0C33C48B230
 for web2py_win.zip.

 Oh, a second idea ... check 7zip for updates.

 /dps
  

Thanks Dave for your help.

I checked the MD5 hash using the Microsoft File Checksum Integrity Verifier 
version 2.05 and I get
e19d91843d6c2e7049f34febd9a24a1f 
for web2py_win.zip.

Antonis
 

-- 
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: Remove query db field

2014-03-28 Thread xgp . latino
Mandar.

Thank you very much.

I will try a different aproach.



Regards


On Tuesday, March 25, 2014 11:30:01 PM UTC-5, xgp.l...@gmail.com wrote:

 Hi all.

 As mostly may know, when doing a select query the result will show a db 
 field title for each column.

 How do i remove or change this db field title for some nice header as use 
 with smartgrid.?



 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.


Re: [web2py] Re: URL of an external website

2014-03-28 Thread Jonathan Lundell
On 28 Mar 2014, at 6:35 AM, villas villa...@gmail.com wrote:
  URL(a='a',c='c',f='f')
 '/a/c/f'
 
  URL(a='a',c=' ',f=' ')
 '/a/ / '
 
  URL(a='a')
 '/APPNAME/a'
 
  URL(a='a',c='',f='')
 '/APPNAME/a'
 
 
 In the last two commands,  APPNAME appears.  Why?  That's looks like a bug.
 
 @Jonathan,  I cannot see why URL() cannot generate external urls in 
 principle.  Otherwise why have scheme and host arguments?

We added those primarily to generate absolute URLs for use in (for example) 
emails and other external references to web2py-generated pages, and to override 
hostnames in some odd cases of multiple-domain sites (IIRC). 

It's not that you might not be able to induce it to make external URLs, but it 
doesn't make it easy, and the interactions with routing on the outgoing side 
could be hard to predict.

The thing is, it's harder to force URL to do the right thing here than it is to 
use the standard Python library to do the encoding correctly. If we really 
wanted to wrap those functions, and allow the use of constructs like args and 
vars in the URL's construction, it'd be better to write another wrapper. Call 
it XURL for external URL.

-- 
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: Beginner question: foreign key constraint failed (?)

2014-03-28 Thread Krzysztof Socha
On Thursday, March 27, 2014 5:21:34 PM UTC+1, Niphlod wrote:

 did you try with a fresh database ?


After some investigation, it seems that the problem is not related to what 
I wrote above (!)

I tried to change the DB - to MySQL - and the error reported changed to 
something like 'attribute first_name not found'. From this I managed to 
understand what happens. 

In fact, the 'company' table is redefining auth_user table. However, it 
seems that (contrary to the documentation) the 'first_name' field is needed 
by the default implementation of the NavBar. And hence the error. It is 
weird that SQLite reports it as foreign constraint failed... Or maybe 
indeed there was something wrong with the SQLite database in the first 
place...

Anyway... The conclusion is - the code I gave above actually 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] search engine

2014-03-28 Thread Hanna Meressa

how to collect data? how to create ad work indexing and stemming? 

-- 
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] Development DB Changes

2014-03-28 Thread Alan Williams
New to web2py and I'm having trouble understanding some of the built in db 
alter functionality.  I have the following table design in a model called 
db_structure.py:

# coding: utf8
db.define_table('dealers',
Field('name', length=75),
Field('address1', length=100),
Field('address2', length=100),
Field('city', length=100),
Field('st', length=100, label='State'),
Field('zip', length=12),
Field('phone', length=11),
redefine=True)
db.define_table('products',
Field('part_id', type='string', length=100),
Field('description', type='string', length=250),
Field('dealer_cost', 'float', default=0.00),
Field('msrp', 'float', default=0.00),
Field('dealer', db.dealers),
redefine=True)


In my db.py model I have the following for my DAL:

db = 
DAL('mysql://dbuser:dbpassword@localhost/dbname',pool_size=1,check_reserved=['all'],migrate=True)

When I make changes to a table, I get errors such as this:

Traceback (most recent call last):
  File /home/www-data/web2py/gluon/restricted.py, line 220, in restricted
exec ccode in environment
  File /home/www-data/web2py/applications/Blitz/models/db_structure.py 
https://192.168.0.29/admin/default/edit/Blitz/models/db_structure.py, line 
17, in module
redefine=True)
  File /home/www-data/web2py/gluon/dal.py, line 8223, in define_table
table = self.lazy_define_table(tablename,*fields,**args)
  File /home/www-data/web2py/gluon/dal.py, line 8260, in lazy_define_table
polymodel=polymodel)
  File /home/www-data/web2py/gluon/dal.py, line 1132, in create_table
fake_migrate=fake_migrate
  File /home/www-data/web2py/gluon/dal.py, line 1245, in migrate_table
self.execute(sub_query)
  File /home/www-data/web2py/gluon/dal.py, line 1969, in execute
return self.log_execute(*a, **b)
  File /home/www-data/web2py/gluon/dal.py, line 1963, in log_execute
ret = self.cursor.execute(command, *a[1:], **b)
  File /home/www-data/web2py/gluon/contrib/pymysql/cursors.py, line 117, in 
execute
self.errorhandler(self, exc, value)
  File /home/www-data/web2py/gluon/contrib/pymysql/connections.py, line 202, 
in defaulterrorhandler
raise errorclass, errorvalue
ProgrammingError: (1146, uTable 'blitz.products' doesn't exist)


I'm sure I'm just over looking something, but I'm not sure what it is...


Any thoughts?



-- 
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: URL of an external website

2014-03-28 Thread Massimo Di Pierro
URL('function') - /app/contr/function
URL('controller','function') - /app/controller/function
URL('myapp','controller','function') - /myapp/controller/function

You are specifying an appname (a) but no controller nor function. I believe 
that behavior is unspecified.




On Friday, 28 March 2014 08:35:39 UTC-5, villas wrote:

























 *Hi Louis  URL(a='a',c='c',f='f')'/a/c/f' URL(a='a',c=' ',f=' ')'/a/ 
 / ' URL(a='a')'/APPNAME/a' URL(a='a',c='',f='')'/APPNAME/a'In the 
 last two commands,  APPNAME appears.  Why?  That's looks like a 
 bug.@Jonathan,  I cannot see why URL() cannot generate external urls in 
 principle.  Otherwise why have scheme and host arguments?Regards,David*


-- 
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: Remove query db field

2014-03-28 Thread villas
If you display the rows 'variable' in a view it will be displayed with 
SQLTABLE.  
You can also set the headers for that,  if you choose to do so.



On Thursday, 27 March 2014 03:47:02 UTC, xgp.l...@gmail.com wrote:

 Mandar,

 I use DAL to make a select to my db. 
 I get field name's as titles and then content of select.

 variable = db(db.hcregistros.id
 ==1).select('hcregistros.noid','hcregistros.fecha','hcregistros.registro')

 *hcregistros.noid hc*cregistros.fecha   
 hcregistros.registro

 I would like to custom them if possible.

 I mention smartgrid because with it you can customize headers, but i dont 
 know if possible using DAL.



 Thanks.



 On Tuesday, March 25, 2014 11:30:01 PM UTC-5, xgp.l...@gmail.com wrote:

 Hi all.

 As mostly may know, when doing a select query the result will show a db 
 field title for each column.

 How do i remove or change this db field title for some nice header as use 
 with smartgrid.?



 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: URL of an external website

2014-03-28 Thread villas
@Massimo,  Regarding

 * URL(a='a')*
 *'/APPNAME/a'*

* URL(a='a',c='c')*
 *'/APPNAME/a/c'*


... may be 'unspecified',  but it is still unexpected and confusing.  In 
the latter case,  the 'a' becomes the controller and the 'c' the function.

@Jonathan,  Re: external urls.  I see,  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] Installation Error Windows Vista Home

2014-03-28 Thread egigi

Could someone help me about this error?

I'm trying to install the framework just downloaded but something doesn't 
work fine:

C:\web2pyweb2py.exe
Traceback (most recent call last):
  File string, line 6, in module
  File __main__.py, line 128, in module
  File __main__web2py__.py, line 18, in module
  File /home/mdipierro/make_web2py/web2py/gluon/__init__.py, line 15, in 
module
  File /home/mdipierro/make_web2py/web2py/gluon/globals.py, line 19, in 
module
  File /home/mdipierro/make_web2py/web2py/gluon/xmlrpc.py, line 10, in 
module
  File SimpleXMLRPCServer.pyc, line 102, in module
  File xmlrpclib.pyc, line 144, in module
  File httplib.pyc, line 78, in module
  File mimetools.pyc, line 6, in module
  File tempfile.pyc, line 34, in module
  File random.pyc, line 873, in module
  File random.pyc, line 96, in __init__
  File random.pyc, line 110, in seed
WindowsError: [Error -2146893795] Inizializzazione non corretta eseguita da 
una DLL del provider

Any suggest for me 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] Re: URL of an external website

2014-03-28 Thread villas
























*Hi Louis  URL(a='a',c='c',f='f')'/a/c/f' URL(a='a',c=' ',f=' ')'/a/ 
/ ' URL(a='a')'/APPNAME/a' URL(a='a',c='',f='')'/APPNAME/a'In the 
last two commands,  APPNAME appears.  Why?  That's looks like a 
bug.@Jonathan,  I cannot see why URL() cannot generate external urls in 
principle.  Otherwise why have scheme and host arguments?Regards,David*

-- 
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: Beginner question: foreign key constraint failed (?)

2014-03-28 Thread Krzysztof Socha
Just an update. It appears to be an issue with SQLITE. The actual problem 
was related to the fact that I have redefined AUTH_USER table (by company 
table - not all of it quated in my post). I had a missing field used in the 
default NavBar - first_name. When I switched from SQLITE to MYSQL, the 
error message was more informative - somthing about missing attribute 
'first_name'. This led in turn to discovering that in fact the 'first_name' 
is kind of required field when redefining the AUTH_USER table, even though 
the documentation does not say so

Hope it will help others. 

BTW: The error message from SQLITE could be improved... 

-- 
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: search engine

2014-03-28 Thread Dave S
On Thursday, March 27, 2014 12:25:15 PM UTC-7, Hanna Meressa wrote:


 how to collect data? how to create ad work indexing and stemming? 


Building an alternative to Google?  That means cURLing a lot of web pages, 
parsing them for the information, building a database, and indexing that.  
For the first part, you want to study web crawlers and spiders, which 
are forms of bots (robotic web processes).  The latter is just database 
stuff, but doing it on any scale gets into Big Data ... there's a reason 
that the history of Hadoop includes papers from Google Research.

I think some apps (especially mobile applications) subscribe to an ad 
service, rather than trying to sign up a bunch of advertisers directly.

/dps
 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: New Windows Vista Install problem

2014-03-28 Thread Dave S


On Thursday, March 27, 2014 2:41:14 PM UTC-7, User wrote:

 Did you install web2py source version or  web2py_win.zip?  What python 
 version are you using? And when you run it, what are you doing 
 specifically?


 On Wednesday, March 26, 2014 4:51:30 PM UTC-4, ian james wrote:

 I have installed Win2py on my Vista laptop.  (My laptop video hardware is 
 not supported on windows 7)

 When I run Win2py, the CMD window flashes on my screen and then 
 disappears.  I have had this problem with a previous Python install years 
 ago.  However, the PY application opens a CMD window and seems to run a 
 Python interpreter, so Python does not seem to be the problem.

 Any suggestions on what to check?


User asks some good questions, but note that there were recently some 
issues in packaging the release for Windows and Mac (web2py_win.zip, for 
instance).  This has been fixed in the latest night builds since about a 
week ago,  so you might try going to the downloads page for that, or 
getting an older release.

/dps

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Cannot unzip the downloaded files from http://www.web2py.com/init/default/download

2014-03-28 Thread Dave S


On Thursday, March 27, 2014 11:56:50 PM UTC-7, Antonis Loumiotis wrote:


 On Thursday, March 27, 2014 8:12:42 PM UTC+2, Dave S wrote:



 On Thursday, March 27, 2014 4:00:43 AM UTC-7, Antonis Loumiotis wrote:

 Hi,

 I'm trying to unzip (using 7-zip) the source code obtained from 
 http://www.web2py.com/init/default/download but I get the following 
 error:

 Can not open file 'C:\Documents and Settings\...\web2py_src.zip' as 
 archive.

 Actually I face the same problem with any of the files in 
 http://www.web2py.com/init/default/download.

 My operating system is Windows XP and I have already installed 
 Python27.   


 Any ideas?  I'm a newbie, just started teaching myself web programming 
 using Python...
  


 Nope, I don't have any ideas beyond ... broken download.  I've just done 
 a quick check of those downloads.  Beyond Compare has no trouble opening 
 the files using its archive handlers, and on Windows 8, explorer.exe 
 (Windows Explorer) is able to open the file (as a virtual folder) and 
 extract files (I opened VERSION in Notepad).

 Check the MD5 checksums of the download.It looks like you should get 
   4725AD01EE5AC287F8B4E0C33C48B230
 for web2py_win.zip.

 Oh, a second idea ... check 7zip for updates.

 /dps
  

 Thanks Dave for your help.

 I checked the MD5 hash using the Microsoft File Checksum Integrity 
 Verifier version 2.05 and I get
 e19d91843d6c2e7049f34febd9a24a1f 
 for web2py_win.zip.

 Antonis
  



Is that from the For Normal Users link, or from the For Testers link?
It looks like at the moment, those give the same results (as each other, 
and matching the value I posted earlier) but that may not have been true 
everyday of the last week.

/dps
 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: URL of an external website

2014-03-28 Thread Niphlod
its expected if you don't pass the request argument (as the URL() was 
originally written).
basically, URL() behaves with a,c,f consistently only if you pass 
r=request, else, a c and f are just positional, and missing pieces are 
set on current request.


On Friday, March 28, 2014 5:15:59 PM UTC+1, villas wrote:

 @Massimo,  Regarding

 * URL(a='a')*
 *'/APPNAME/a'*

 * URL(a='a',c='c')*
 *'/APPNAME/a/c'*


 ... may be 'unspecified',  but it is still unexpected and confusing.  In 
 the latter case,  the 'a' becomes the controller and the 'c' the function.

 @Jonathan,  Re: external urls.  I see,  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.