[web2py] Re: IS_EMPTY_OR(IS_IN_DB incompatible with custom form?

2014-08-27 Thread José L .


El martes, 26 de agosto de 2014 22:49:17 UTC+2, Anthony escribió:
>
>
>
> On Tuesday, August 26, 2014 3:13:35 PM UTC-4, José L. wrote:
>>
>> Hi, I'm using a custom form to represent the fields of a table. This 
>> table has referenced fields.
>> If I use:
>> db.define_table('department', 
>> Field('dept_id'), 
>> Field('nombre'),format='%(nombre)s') 
>>
>> db.define_table('employee', 
>> Field('firstName'), 
>> Field('lastName'), 
>> Field('dept_id', db.department))
>>
>> The table employee represents correctly the dept names. But if I do:
>>
>>
>> db.define_table('employee', 
>> Field('firstName'), 
>> Field('lastName'), 
>> Field('dept_id', db.department), requires=IS_EMPTY_OR(IS_IN_DB(db, 
>> db.department.id,
>> '%(nombre)s')))
>>
>
> I assume the above is a typo -- should be:
>
> Field('dept_id', db.department, requires=IS_EMPTY_OR(IS_IN_DB(db, db.
> department.id,
>   '%(nombre)s'
>
>
Yes, it was a typo.
 

> {{=form.custom.widget.dept_id}} shows the departament id instead of the 
>> name.
>> I need to add the "IS_EMPTY_OR" condition, I've also tried adding 
>> notnull=False without success.
>>
>
> Are you saying that in a create or update form, the select dropdown 
> includes a list of IDs rather than names, or that in a grid or read-only 
> form you see IDs rather than names? The former should not be the case, and 
> when I try it, I see a list of names. If the latter is the problem, that is 
> because you have not defined a "represent" attribute for the dept_id field 
> (if you explicitly specify a "requires" argument when defining a reference 
> field, you do not get the automatic "represent" attribute defined, so you 
> have to define that explicitly as well).
>
> Anthony
>

It was the latter case. It worked when using a create form but not with the 
view. I didn't know that requires removed the "representation", I can not 
recall reading that in the documentation either.  Now it works perfectly in 
both cases adding the represent attribute to the field definition:

represent = lambda id, row: db.department._format % db.department(id)



Thanks very much for your help.

José L. 

-- 
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] IS_EMPTY_OR(IS_IN_DB incompatible with custom form?

2014-08-26 Thread José L .
Hi, I'm using a custom form to represent the fields of a table. This table 
has referenced fields.
If I use:
db.define_table('department', 
Field('dept_id'), 
Field('nombre'),format='%(nombre)s') 

db.define_table('employee', 
Field('firstName'), 
Field('lastName'), 
Field('dept_id', db.department))

The table employee represents correctly the dept names. But if I do:


db.define_table('employee', 
Field('firstName'), 
Field('lastName'), 
Field('dept_id', db.department), requires=IS_EMPTY_OR(IS_IN_DB(db, 
db.department.id,
'%(nombre)s')))

{{=form.custom.widget.dept_id}} shows the departament id instead of the 
name.
I need to add the "IS_EMPTY_OR" condition, I've also tried adding 
notnull=False without success.

Any hint?

Thanks.
José L.

-- 
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] oncreate callback inside a component

2014-07-24 Thread José L .
Hi, I'm using load to put two sqlform.grid inside a page in an application. 
I have added 
...
editable=True,
create=True,
searchable=False,
onvalidation=check_documento,
oncreate = check_documento,
onupdate = check_documento,
formname='grid1'
)

inside the function that is loaded by the view. 
check_documento is activated whenever I edit a line in the grid, but if I 
use the "Add" button, after adding the record, the oncreate function is not 
called and the record is not added to the database.
I have in my view:
  {{ =LOAD('inventario','loadDocsGrid.load',ajax=False)}}

Any idea of why editing works inside the component but not creating new 
records?

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] Validator for sqlform combo list

2012-05-31 Thread José L .
Hi, I'm using a referenced table with IS_IN_DB validator, but I'd like to 
filter the fields to be shown in the combo list.
As an example:

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

db.define_table('class_attendant',
Field('Date','date'),
Field('Classname'), 
Field('person_id',db.person,readable=True,writable = True, 
label="User"))

db.class_attendant.person_id.requires = IS_IN_DB(db,'person.id','%(name)s 
%(surname)s')

When using a SQLFORM(db.class_attendant) to add new persons to  the 
class_attendant table, the combo list shows all the persons in the person 
table, but I'd like it to show only the persons whose age is upper than 18.
What's the best method to do it?



[web2py] executing javascript after accepting a form

2012-03-27 Thread José L .
Hi, I'm having problems trying to show a modal window after the user 
submits correctly a form.
I've tried to do it with:

def index():

if form.accepts(request.vars):
response.js='$( "#dialog-message" ).dialog({ modal: true   });'
...

being #dialog-message a div in the same index.html page, but response.js 
doesn't do anything, and it seems to work only inside componentes.

Any idea to get this funcionality working?
Thanks.


[web2py] Translation error in SQLFORM.grid

2011-11-27 Thread José L .
When using SQLFORM.grid, the message:
'%(nrows)s records found'
is never translated and it fills the language/lang.py file with 
untranslated strings whenever the number of rows change.

Changing in gluon/sqlhtml.py, in the grid static method, the line:

message = error or T('%(nrows)s records found' % dict(nrows=nrows))


by:

message = error or T('%s records found', nrows)


The problem is fixed.

I've filled bug #539 to follow this issue.

Regards.
José L.


[web2py] Autocomplete in GAE

2011-11-02 Thread José L .
Has anybody a solution for this?
Autocomplete web2py widget doesn't work in gae. 
I've been searching in this group archive and I haven't found any solution.
Googling gives me some possible solutions, but they are really complex 
unless you'd be a GAE expert.
One of the most attractive things of web2py is that the developer can 
abstract (mostly) the database, but it seems to me that when using gae, 
this is not possible.

Has anybody else had this kind of problem? Does anybody have a good 
solution for a good autocomplete widget in gae?
I mean, a widget that really search in the database, not a simple combo 
with a very short list of possible items to show/search.

Thanks in advance
José L.


[web2py] Running web2py in an apache directory

2011-10-21 Thread José L .
Hi,
I've been running successfully web2py under apache in a directory following 
the slice at http://www.web2pyslices.com/slices/take_slice/56 . I need it 
running in a subdirectory because this apache server is running some other 
apps, some of them in php.

It worked perfectly with version 1.95.1, but after trying to update web2py 
to versions >=1.96.1, it doesn't work.

I see this behaviour when going to the url where web2py should work:
http://miserver/mysubdir
with 1.95.1, it redirects to:
http://miserver/mysubdir/init/default/user/login?_next=/mysubdir/init/default/index
but with versions >=1.96.1 it redirects to:
http://miserver/init/default/user/login?_next=/init/default/index

So, web2py it's removing the "/mysubdir/" part somewhere.

After checking the changelog between both versions I can not find anything 
related to this routes changes. Running under apache I'm not using the 
routes.py file nor changing apache configuration between web2py versions.

Any idea?
Thanks


[web2py] Re: PowerFormWizard 0.1.4 - Bug Fixes and auto_validation (+ a new plugin for grids)

2011-08-09 Thread José L .
Hi Bruno, I'm trying to use PowerFormWizard and it was working fine until I 
found a bug using an Autocomplete widget for one of the fields. I can 
reproduce the error even using your example application (I just added a 
colors table and 
db.person.colors.widget = SQLFORM.widgets.autocomplete(
 request, db.colors.color, id_field=db.colors.id)
to the person model.

This is the traceback:

Traceback (most recent call last):
  File "/opt/src/web2py/dotcloud/web2py/gluon/restricted.py", line 192, in 
restricted
exec ccode in environment
  File 
"/opt/src/web2py/dotcloud/web2py/applications/PFWExample/controllers/default.py",
 
line 628, in 
  File "/opt/src/web2py/dotcloud/web2py/gluon/globals.py", line 145, in 

self._caller = lambda f: f()
  File 
"/opt/src/web2py/dotcloud/web2py/applications/PFWExample/controllers/default.py",
 
line 93, in index
if form.accepts(request.vars, session):
  File "/opt/src/web2py/dotcloud/web2py/gluon/sqlhtml.py", line 1093, in 
accepts
self.field_parent[row_id].components = [ widget ]
AttributeError: 'PowerFormWizard' object has no attribute 'field_parent'


Regards.


[web2py] Form for two tables (one of them repeated)

2011-08-03 Thread José L .
Hello, I need the help of some web2py guru...

I'm developing an application where I have to add and modify couples of 
people. So I've defined a table called "person", and a table called "pairs" 
which have two fields related to "person".
I need to show a form to add/edit couples (so adding/editing in the same 
form two persons with only one submit button)   and I'm lost in the 
interface.
My first thought was using 
http://www.web2py.com/book/default/chapter/07#One-form-for-multiple-tables , 
but I can not use it to create the form because I have to add at the same 
time two records for the table person.

I'd like to use the web2py automatic validation comprobations based on the 
requirements the fields have in their table definitions.

Any ideas on how to deal with this problem ?

Thanks in advance


[web2py] autocomplete widget does not work on GAE

2011-07-03 Thread José L .
I've checked autocomplete widget can not work in gae, as it uses like in its 
callback.
Checking this group archives, I've found this 
thread: https://groups.google.com/d/topic/web2py/HdnWTp7h3Do/discussion
but even if it looks like it would work, finally it was not implemented.

So, does anybody know of any workaround to make autocomplete work in GAE?

BTW: A note should be added at the web2py book section 
(http://www.web2py.com/book/default/chapter/07#Autocomplete-Widget ) warning 
it does not work in gae. It will save time to many people.

Regards.
José L.


[web2py] Insert "One to many" related tables in GAE

2011-07-02 Thread José L .
Hi, I have a very simple case use that I'm not able to solve using GAE:
I have a file with the content of two tables (cities and provinces). Cities 
have a db.provinces field, and when I start a new aplicacation I use to 
populate these tables using data from a module with this structure:
Provinces=(
(1, 'Álava', 'alava', 'ALV','01'),
(2, 'Castellón', 'castellon', 'CAS','12'),
...)

where the first field is the id of the province

Cities=(
(1,1,'Alegría-Dulantzi', 'alegria-dulantzi', '01240', '42.841171', 
'-2.512608'),
(2,1,'Amurr...)

(first field is the id of the city and second field is the province_id 
field) 

So I do a bulk insert in the provinces table, and using the province_id I do 
a bulk insert in the cities tables.
So far, so good using mysql, or sqlite.

But using GAE I can not fill it using the province_id (the id is ignored and 
gae puts another one) and I have no clue on how to associate both data.

Can anybody lend me a hand?

Regards
José L.


[web2py] Re: New bug working with 1.96.4

2011-06-22 Thread José L .
I've checked the problem comes 
since 
http://code.google.com/p/web2py/source/detail?r=9153fbe0349812922daae09c487f4dfe68280d76&path=/gluon/tools.py
where the 
user_id = table_user.insert(**keys)
replaced the old method to insert data in the auth table. 

No idea of the rationale behind the change, but it's causing this problem.


[web2py] New bug working with 1.96.4

2011-06-22 Thread José L .
I'm having an authentication error in an application that works without any 
problem in 1.95.1.
This application uses ldap authentication, the backtrace is:

Traceback (most recent call last):
  File "/opt/src/web2py/web2py/gluon/restricted.py", line 192, in restricted
exec ccode in environment
  File "/opt/src/web2py/web2py/applications/controlies/controllers/default.py" 
, 
line 69, in 
  File "/opt/src/web2py/web2py/gluon/globals.py", line 137, in 
self._caller = lambda f: f()
  File "/opt/src/web2py/web2py/applications/controlies/controllers/default.py" 
, 
line 48, in user
return dict(form=auth())
  File "/opt/src/web2py/web2py/gluon/tools.py", line 1069, in __call__
return getattr(self,args[0])()
  File "/opt/src/web2py/web2py/gluon/tools.py", line 1609, in login
user = self.get_or_create_user(form.vars)
  File "/opt/src/web2py/web2py/gluon/tools.py", line 1366, in get_or_create_user
user_id = table_user.insert(**keys)
  File "/opt/src/web2py/web2py/gluon/dal.py", line 4699, in insert
return self._db._adapter.insert(self,self._listify(fields))
  File "/opt/src/web2py/web2py/gluon/dal.py", line 4675, in _listify
raise SyntaxError, 'Field %s does not belong to the table' % name
SyntaxError: Field remember does not belong to the table


My form doesn't have a "remember" field, but it appears in the form.vars 
when debugging at gluon/tools.py login method.

Any idea?


[web2py] Re: plugins

2011-06-19 Thread José L .
selecta, the downloads from 
http://pymantis.org/pymantis_server/plugin_release/download don't work in 
any of its versions.
Do you have some control version system where I could take a look to these 
plugins?

Thanks.


[web2py] Re: Use plugin_wiki widgets in standard views

2011-06-19 Thread José L .
Forget my previous email , I've found the answer in the book:
{{=plugin_wiki.widget('jqgrid',table='... ) }}


[web2py] Use plugin_wiki widgets in standard views

2011-06-19 Thread José L .
I'd like to use some of the widgets plugin_wiki has (mainly jqgrid and tags) 
, but I don't want to use plugin wiki pages to build the site because I'd 
like to have more flexibility (specially with layouts and javascript).
Is there an easy way to use some of these widgets in a "normal" view? (I've 
thought of loading a wiki page from the normal page, but I'd like to know if 
there is an easier method)

Regards.


[web2py] Pack applications stored on control version filesystems

2011-05-26 Thread José L .
Hi
I was having problems (Internal error) when trying to pack an application 
that I have under subversion control.
I've detected the problem was in the app_cleanup function in gluon/admin.py 
(it tried to remove files, but raised an error when tried to remove the .svn 
directory).
I guess this will happen with any control version system that creates this 
kind of hidden directory.

Attached is a very simple patch that solved the problem for me.

Regards.
--- admin.py.orig	2011-05-26 19:04:56.0 +0200
+++ admin.py	2011-05-26 19:00:00.0 +0200
@@ -104,7 +104,7 @@
 if os.path.exists(path):
 for f in os.listdir(path):
 try:
-os.unlink(os.path.join(path,f))
+if f[:1]!='.': os.unlink(os.path.join(path,f))
 except IOError:
 r = False
 
@@ -113,7 +113,7 @@
 if os.path.exists(path):
 for f in os.listdir(path):
 try:
-recursive_unlink(os.path.join(path,f))
+if f[:1]!='.': recursive_unlink(os.path.join(path,f))
 except IOError:
 r = False
 
@@ -122,7 +122,7 @@
 if os.path.exists(path):
 for f in os.listdir(path):
 try:
-os.unlink(os.path.join(path,f))
+if f[:1]!='.': os.unlink(os.path.join(path,f))
 except IOError:
 r = False
 return r


[web2py] What's the utility of auth.settings.alternate_requires_registration?

2011-04-15 Thread José L .
I've tried to use it to avoid registering automatically users in the 
database after a login using ldap, but the result is almost the opposite.
If auth.settings.alternate_requires_registration=True, then only database 
users are allowed, and the alternate_login_methods are ignored.
Is it a bug or am I missing some other utility for this variable?



Regards.


[web2py] Re: web2py 1.94.1 is OUT

2011-03-18 Thread José L .
Debian packages for 1.94.4 are already available where usual:
http://people.debian.org/~jredrejo/web2py/lenny/ (for python2.5)
or
http://people.debian.org/~jredrejo/web2py/squeeze/ (for python >> 2.5)

Regards.


[web2py] Re: web2py always writes on language files to translate

2011-03-14 Thread José L .
Is there anyway to force the update of translations files by code?
I'll add it to the Debian package in case it's possible, so this problem 
will disappear...


[web2py] Re: greetings from PyCon

2011-03-14 Thread José L .


On Monday, March 14, 2011 2:38:24 PM UTC+1, Massimo Di Pierro wrote:
>
> http://blip.tv/file/4879126 
>
> Can you see it? 
>
>

Perfectly, thanks very much.
 

> On Mar 14, 6:50 am, Mengu  wrote: 
> > so, what about the video?



[web2py] Re: web2py always writes on language files to translate

2011-03-13 Thread José L .


On Sunday, March 13, 2011 6:33:00 PM UTC+1, Massimo Di Pierro wrote:
>
> How do you know there is no need for it? Did you look at what is being 
> re-written? It should only try to re-write if you have new text 
> needing translation. 
>


ok, catched, so there's not such bug, only my misunderstanding of the code.
So, if new strings must be added, it writes them. I thought it only would 
write them when trying to do the translation using the web interface.

My problem appeared running web2py with the admin/language directory 
without writing permissions, it looks like the language files I'm checking 
are not complete and this method creates the new strings the first time 
web2py is run.

Maybe this check should be done with all the language files when a new 
release is done, so they are complete, avoiding this write attempts. Anyway, 
it's clear this is not an important issue.

Thanks.
José L.

 

>
> Massimo 
>
> On Mar 13, 10:56 am, José L.  wrote: 
> > Hi, 
> > running web2py in a directory with restricted permissions I've checked 
> that 
> > anytime a translation is used, web2py try to re-write the translation 
> > string: 
> > 
> >   /var/lib/python-support/python2.5/gluon/languages.py(284)translate() 
> > -> write_dict(self.language_file, self.t) 
> > 
> > > /var/lib/python-support/python2.5/gluon/languages.py(95)write_dict() 
> > 
> > i.e.: 
> > As far as I can check, method translate, from class translator at 
> > gluon/languages.py , always call method  write_dict, and it looks there's 
> no 
> > need to do it. 
> > 
> > is it a bug ? 
> > 
> > Regards. 
> > José L.



[web2py] web2py always writes on language files to translate

2011-03-13 Thread José L .
Hi,
running web2py in a directory with restricted permissions I've checked that 
anytime a translation is used, web2py try to re-write the translation 
string:

  /var/lib/python-support/python2.5/gluon/languages.py(284)translate()
-> write_dict(self.language_file, self.t)
> /var/lib/python-support/python2.5/gluon/languages.py(95)write_dict()



i.e.:
As far as I can check, method translate, from class translator at 
gluon/languages.py , always call method  write_dict, and it looks there's no 
need to do it.

is it a bug ?

Regards. 
José L.


[web2py] web2py Debian packages available for testing

2011-02-28 Thread José L .
Hello,
I've prepared the packages to install web2py in Debian or other Linux Debian 
derivatives (as Knoppix, Ubuntu, Linex, etc.)

The packages are available at:
http://people.debian.org/~jredrejo/web2py/lenny/ for old releases with 
python 2.5 as default python version.

http://people.debian.org/~jredrejo/web2py/squeeze/ for new releases with 
python 2.6 or 2.7

Two packages are available:
python-gluon: with web2py libraries, needed to server web2py applications 
using Apache or other web werver
python-web2py (depending on python-gluon) : with web2py rocket server and 
admin, welcome and example applications.

After installed, if a desktop environment (like KDE or Gnome) is used, 
web2py can be run from the menu->development branch.
This will launch a gui to start the server, and the applications will be 
stored in $HOME/web2py

If web2py is launched from a terminal, the application will be stored in the 
directory where it's launched from (whenever write permissions are allowed, 
if not it will be done again at $HOME/web2py)

A README.Debian is also installed at /usr/share/doc/web2py-gluon/ with more 
details on running or installing web2py applications in Debian based 
distributions, including documentation and an example configuration file to 
use Apache.


My plan is uploading these packages to Debian at the end of this week if 
nobody complains with bugs, so I ask help to  all the Debian/Ubuntu users in 
this group to test it and tell me their opinion.

Regards
José L.


[web2py] Re: Small bug in gluon/widget.py and something more

2011-02-27 Thread José L .


On Sunday, February 27, 2011 3:32:36 AM UTC+1, Massimo Di Pierro wrote:
>
> OK. I only have one request. Can you define 
>
> gtk_presentation 
>
> in its own module in contrib and try import it from widget? 
>
> I am not sure how this plays out with py2exe and py2app 
>
>
Done. I have uploaded widget.py, widget.diff and  gtk_presentation.py (to be 
placed at gluon/contrib) again to http://people.debian.org/~jredrejo/web2py

update_canvas is also implemented now, so I consider it finished unless some 
bug arise.

Regards.
José L.


P.S.:  web2pyGtkDialog could also be taken to contrib if you like, but It 
seems it makes more sense having it inside the widget.py module.


[web2py] Re: Small bug in gluon/widget.py and something more

2011-02-26 Thread José L .


On Saturday, February 26, 2011 7:29:09 PM UTC+1, Massimo Di Pierro wrote:
>
> Thanks, 
> your fix is in trunk. 
>
> I'd like to see the gtk version and I am ok to you adding it to trunk 
> but Ido not think we should add a new dependence. 
>
>

I've uploaded the module widget.py and its diff with current stable version 
(1.92.1) to it to http://people.debian.org/~jredrejo/web2py/

In fact, it doesn't add a new dependency: if you have gtk installed it will 
run, otherwise it will try it with Tkinter or console if tk is not available 
either.

Most linux desktops have gtk available so, the look is much better. For the 
Debian package I'm adding python-gtk2 | python-tk as recommended packages, 
not dependencies.

It's almost finished, only the update_canvas method is still in work.


Also, I don't see the purpose of the update(self, text) method 
in web2pyDialog, so I haven't translated it into the gtk class. Tell me if 
it's needed.

Regards.
José L.

 

> Massimo 
>
>
>

[web2py] Small bug in gluon/widget.py and something more

2011-02-26 Thread José L .
Hello,
I'm finishing the Debian packages for web2py (I hope to finish them this 
weekend), and as the tk graphic interface in widget.py is really ugly on a 
linux machine, I've done a gtk clone of this same interface.
Doing it , I've seen a bug in line 411 of 
http://code.google.com/p/web2py/source/browse/gluon/widget.py :
t1 = os.path.size('httpserver.log')
should be:
t1 = os.path.getsize('httpserver.log')

On the other hand, Massimo, would you be interested in adding the gtk web2py 
server interface to web2py? If not I'd just add it as a patch to the Debian 
packages.

Regards

José L.


[web2py] Re: Digging in the web2py license(s)

2011-02-18 Thread José L .
Bumping
Massimo, I really need your help on this topic, specially on the part of the 
unlicensed files.


[web2py] Digging in the web2py license(s)

2011-02-17 Thread José L .
Hello, in my progress of making the Debian packaging of web2py I'm dealing 
with the non-always-clear world of licensing.
Up to now, I've some clear parts, which can be read at:

http://paste.debian.net/107968/


For Massimo and all the web2py contributors, it would be great if you can 
take a look at the above link to check everything is right.


At the dark side, I have the license of these files/dirs:

gluon/contrib/login_methods/*
gluon/contrib/gae_memcache.py
gluon/contrib/memcache/*
gluon/contrib/populate.py
gluon/contrib/taskbar_widget.py Author: Mark Larsen, mostly stolen from Mark 
Hammond's C:\Python25\Lib\site-packages\win32\Demos\win32gui_taskbar.py


They have no clear license, so I would need to know the real author of these 
files, the copyright and license, and if that's not possible, if some/all of 
these files can be removed from the sources. If the license is not right 
they can cause the rejecting of web2py in Debian.


Thanks in advance for your help.
Regards.
 


[web2py] Re: web2py launcher for Debian package

2011-01-26 Thread José L .
This message has disappeared from the web2py google groups site . I don't 
know why. 
So, I'm bumping it 

On Wednesday, January 26, 2011 8:33:37 PM UTC+1, José L. wrote:
>
> Hello, in order to do the packaging of web2py, I've done these things:
> - moved gluon to be a standard library of the system, integrated in the 
> PYTHONPATH
> - moved :
> applications  deposit  logs  site-packages  VERSION  web2py.py  welcome.w2p
> to /usr/share/web2py
> -add created a web2py launcher at /usr/bin/
>
> this web2py launcher is available at http://paste.debian.net/105739/
>
> I've tried to keep:
> - the normal behaviour of web2py,
> - fulfill the FHS
> - respect the user changes in his permissions land
> - when a new version of the web2py package is installed the admin and 
> welcome application are upgraded to the user (gluon and all the stuff at 
> /usr/share/web2py are upgraded), but the upgrading doesn't disturb other 
> applications the user has created in his userland, or the admin 
> configurations the user has done.
>
>
> I'd like to know your opinion about these steps, specially if the web2py 
> launcher is clean or it can raise any problem in the future.
>
> Also, when launcher starts from the Desktop menu, it should ask always for 
> the port and password admin, and then launch the web browser. As 
> gluon.widget.start(cron=True)
> begins the server loop, I'd like to know any idea about how to launch an 
> external process (the web browser), after it has started. 
>
> Regards.
> José L.
>


[web2py] web2py launcher for Debian package

2011-01-26 Thread José L .
Hello, in order to do the packaging of web2py, I've done these things:
- moved gluon to be a standard library of the system, integrated in the 
PYTHONPATH
- moved :
applications  deposit  logs  site-packages  VERSION  web2py.py  welcome.w2p
to /usr/share/web2py
-add created a web2py launcher at /usr/bin/

this web2py launcher is available at http://paste.debian.net/105739/

I've tried to keep:
- the normal behaviour of web2py,
- fulfill the FHS
- respect the user changes in his permissions land
- when a new version of the web2py package is installed the admin and 
welcome application are upgraded to the user (gluon and all the stuff at 
/usr/share/web2py are upgraded), but the upgrading doesn't disturb other 
applications the user has created in his userland, or the admin 
configurations the user has done.


I'd like to know your opinion about these steps, specially if the web2py 
launcher is clean or it can raise any problem in the future.

Also, when launcher starts from the Desktop menu, it should ask always for 
the port and password admin, and then launch the web browser. As 
gluon.widget.start(cron=True)
begins the server loop, I'd like to know any idea about how to launch an 
external process (the web browser), after it has started. 

Regards.
José L.


[web2py] Re: Application with no session

2011-01-26 Thread José L .
Forget my previous mail, I've checked that adding
session.forget() to the default controller makes the needed magic.

Regards.


[web2py] Application with no session

2011-01-26 Thread José L .
Making the Debian package for web2py, and trying to reduce to the maximum 
the things to be copied to the user folder, I'd like to keep the welcome 
application entirely in the "root" user land, so a normal user has no access 
to write in any of their directories.
I've checked the welcome application doesn't need database, so removing the 
models/db.py file works fine.
Now, I'm stalled with the need to create a session lock file into the 
welcome/session directory, but I can not see the need of having a session 
for this very simple application.
If this is the case, is there any option (or could it be added) to avoid 
using any kind of sessions in a web2py application?

Regards.
José L.


[web2py] Re: minimal setup on Debian for using Mail()

2010-12-05 Thread José L .


On 4 dic, 21:54, Miguel Lopes  wrote:
> Hi Bernado,
>
> 2010/12/4 Bernardo Botella Corbí 
>
> > Hi Miguel,
>
> > which test did you do from command line?
> > does web2py print something? Any error?
>
> > Try to do the next thing from the command line:
> > tail -f /var/log/mail.log
>
> If I try to send mail from web2py using local resources it fails silently.
> I can use a gmail account to send the email it works, so perhaps I'm
> configuring gluon.tools.Mail wrongly:
> mail.settings.server = 'myIP:25'                            # your SMTP
> server
> mail.settings.sender = 'u...@mydomain.pt'         # your email
> mail.settings.login = 'user:pass'                           # your
> credentials or None 'username:password'
>
> I'm unsure about mails.settings.server. Is this correct?
>
> > (if you are in ubuntu/debian, don't know where it would be in other
> > distributions...)
>
> > I'm using Debian Lenny.
>
> txs,
> Miguel


Using Debian Lenny you have probably intalled exim4 as mail server,
don't need to install postfix to do the same.
Do "dpkg-reconfigure exim4-config" (previously install exim4-config if
you don't have it installed) and choose the option of your mail server
settings you prefer.

Anyway, if you're not going to use it massively, I'd recomend you
replacing exim4 by ssmtp (the simplest mail server around), as it's
really easy to setup.
http://wiki.debian.org/sSMTP

To test if it's working, then install  mail-utils, and use the command
"mail" to send mails and check if they 're received. Then you are sure
your server setup is working and you can think of configuring mail in
web2py.

Regards
José L.


[web2py] Re: LMS experimenting

2010-11-28 Thread José L .

Hi Massimo,

On 28 nov, 19:03, mdipierro  wrote:
> Learning Scorm what a crappy protocol:
>

I agree, it's crappy and awful, butI don't think it's so bad as you
say:


> 1) it is a method for zipping lectures and metadata
> 2) lectures are in html and are vulnerable to XSS

this is not a problem of the protocol but of the tool used to do the
lecture.
html or javascript are vulnerable to XSS themselves too.

> 3) mixes content and presentation

again, it depends on the tool used to generate the scorm package

> 4) can contain quizzes (defined in the JS). students can find the
> right answers by looking in the page source code.


right :), anyway there are many more exercices that can be used, again
it depends on the tool used to generate them.

> 5) completely unreadable because of many XML files with incomplete
> specs.
>
> I cannot believe everybody uses this.
>


Believe it. It's the international standard used in education. Every
LMS has to implement it, because any serious (or considered serious by
the educative authorities) content generation tool for education must
be able to export to scorm. So, a teacher can use eXe to prepare the
lessons and, then, include the scorm package in a Moodle at the
school, or the national LMS.

About eXe, I must say that it's a killer application because of an
only point: teachers can use it easily. Its interface is really
teacher-intuitive. On the other hand, its development is dead since
more than two years ago, and any intent from other people to resume it
has been impossible because of the current owners of the application.
I know of several projects around the world patching it by their own.
Internally eXe it's totally crap, because its developer froze the
libraries they use and included them all in the binaries/sources, so
the versions of xul, nevow, TinyMCE, etc. that eXe uses are two years
old and almost impossible to update without rewriting a good part of
eXe.
Anyway, it has very good points, it's free,  its client-server
architecture design is a good and powerful design, and the way it
interacts with the teacher is a total sucess in many countries around
the world, and believe me: I've been working developing code and
applications for teachers for the last 8 years and it's not easy to
find an application that most teachers can use without problem.

My 2 cents
José L.




> Massimo
>
> On Nov 28, 10:46 am, mdipierro  wrote:
>
>
>
>
>
>
>
> > I am taking a second look at SCORM, the de-facto standard for creating
> > e-learning content, supported by all major LMSes. Looks like there is
> > only one engine that can parse SCORM files and it is commercial/closed
> > source.
>
> > This cannot be good for education.
>
> > Massimo
>
> > On Nov 28, 5:03 am, blye  wrote:
>
> > > I was researching LMS type stuff around the net and found eXe, a very
> > > attractive open source tool for creating Lessons ( standards
> > > compliant ) and generating the result as a sequence of html pages and
> > > resources. exeLearning.org    or  core-ed.net.
>
> > > I am experimenting to see if the eXe pages can be 'wrapped' in web2py
> > > ie.
>
> > > Idea
> > > web2py app maintains a table of categories and a table of lesson
> > > titles in these categories. This is fairly standard.
>
> > >  the user can then select and hopefully start a Lesson
>
> > > 1. is it possible to shell out to the lesson index.html from web2py?
> > > ( run the set of html files stored in local folder in separate browser
> > > window).
> > > (( the lesson is obviously Not a web2py app itself.))
>
> > > Where and how should the Lesson resources be stored and referenced
> > > from web2py field? (All eXe generated lessons begin with index.html)
> > > My trials with redirect and static have not worked. :-(
>
> > > 2. It would also need to upload a zip file and unzip it into folder.
> > > ( still researching this  :-/
>
> > > I suppose the ultimate idea is for the user to be able to upload
> > > lessons created with eXe for other users to download and use.
> > > Any ideas welcome.
>
> > > strength to the LMS mill!


[web2py] Re: Packaging web2py for Debian

2010-10-18 Thread José L .
The debian packaging group is online:
http://alioth.debian.org/projects/pkg-web2py/

Please, join the group if you want to collaborate/help/test the
packaging.

I'll wait some days before beginning to upload the first files.

Also, all the packaging talk can be done in the group, instead of
flooding this group of packaging technical details that most people
don't care.

Regards.
José L.


[web2py] Re: Packaging web2py for Debian

2010-10-17 Thread José L .
 and let the admin set it up with a
> web server of his choice.
>
> I'd be glad to hear any comments and could maintain the RPM part of
> packaging if the issues get ironed out. Or I can just provide my .spec
> files to give a head start to a future RPM maintainer, it really
> doesn't matter.



I'd like to read your .spec file. I'm sure it can help in the Debian
packaging as you've already worked in the same issues we've been
discussing here.


>
> All this being said, there is still a fundamental question of
> packaging rationale. Should web2py get packaged at all? Or should it
> remain in userland alltogether, similar to CakePHP and various other
> frameworks of any kind.
>
> Various other web application packages such as phpmyadmin, etc. do get
> packaged, so...
>


I think it should. Not only thinking in users wanting to use web2py,
but in applications developed using web2py. In the future there will
be applications made with web2py that we'll want to be in main Linux
distributions. If we want those applications being in the
repositories, a previous step is having web2py. In terms of Debian
packaging we have to study deeply all the dependencies. Not only
technical depedendencies but also legal ones. web2py includes several
javascript files made by other people, and I want it to pass the legal
exam in Debian.



> In any case, I'm going to keep maintaining the RPMs for our internal
> use and I'd appreciate any additional comments.
>


I thank you your comments, and I hope you can help in the Debian
packaging too, as most problems (if not they all) are common to any
distribution packaging. The final way of compiling the package
differs, but I can't recall of any other difference.

Regards.
José L.


> Kind regards to all.


[web2py] Re: Packaging web2py for Debian

2010-10-16 Thread José L .


On 16 oct, 10:54, Mark Breedveld  wrote:
> >> apache2-web2py
>
> Well I originally launched the same plan as you and we also came too
> the same conclusion as you. No way too do it, because of the three
> reasons I mentioned before.
> guidelines, maintainable, etc
>
> So stick to the original plan. Get a simple version of web2py on air.
> With documentation.
>
> And if my project succeeds, it will operate as management layer on top
> of it. But that's for later and has an other goal.
>
> If that is done, then we could do the apache package.
> apache2-wsgi-web2py
> apache2-fastgci-web2py
> apache2-proxy-web2py
> It is possible, but the last time the packaging got stuck on it.
>
> >> A pending question is how to deal with the needed writing permisions.
>
> If you want a per user instance, don't separate the admin.

I want to separate the admin because it's something the user should
not touch, and should be upgraded everytime the package is upgraded.
Moving the admin application to the userland won't allow upgrading it
with new versions of the package.

But... the user has to run the admin project, so it needs to write
sessions, logs, etc. for this project.

And keep
> the ports in mind. You can't run every instance on the same port and
> you can't give all user the same instance. Would be a major security
> leak.
>
> Suggestion: don't do per user instance. But use the same structure as
> apache. One instance, one user/group.
> If needed users can manual create there own instance.
>

I fully agree with you... but there's a big difference with apache if
you're not running apache. Starting the rocket server is done by any
user without special permssions (tcp port over 1000). So we have a
dillema: adding apache as a dependency and running it all under apache
umbrella would make things easier. At the same time this breaks the
easy of use of web2py when rocketserver is used and would force the
users to be in a special group to be able of program with web2py.


> Just too keep it going and to keep focus. I have simple question,
> because I'm loosing track of the discussion.
> Can you package web2py as you have in mind, besides the writing
> rights? Which you will discuss later on I guess.


I'll try. Anyway, I've requested the creation of a packaging group in
alioth.debian.org. As soon as it is created by the admins I'll tell it
here, so anybody can join to help.

Regards
José L.


>
> Mark,


[web2py] Re: Packaging web2py for Debian

2010-10-16 Thread José L .


On 16 oct, 09:59, Mark Breedveld  wrote:
> Some packager told as that libraries should be in some directory
> according too the guidelines. I checked it back then and he was right.
> But I don't now how heavy that counts.
>


It's a must: http://www.debian.org/doc/packaging-manuals/python-policy/



> It would also be easier to update several instances of web2py since
> the most updates will happen there.
>


sure, that's the reason for that policy

> But if you say you can pass the guidelines, please do so.
> Because it makes it more complex than necessary.
>


Not, I haven't said that. You must put the libraries in a directory
(done by python-support in Debian, the directory will depends on the
python version installed, but it will be something like /var/lib/
python-support/python2.5/ ), executables at /usr/bin,other files in /
usr/share/web2py and so on.
But you can do it all with only one package.
I.E. I don't mean it has to be done this way, I just wanted to know if
there are other technical reasons to do it.
It would make sense to have:
python-web2py as a metapackage that depends on python-gluon and python-
web2py-applications, for example. It's only that I don't know if there
are technical or logical reasons to do it. If it has been discussed
and agreed before, it's very possible that's the right way, but I can
not find the thread of discussion for this.

José L.



[web2py] Re: Packaging web2py for Debian

2010-10-15 Thread José L .


On 15 oct, 13:32, Mark Breedveld  wrote:
> You have the idea. Thanks for clearing it towards the others.
>
> My guesses it we need to do both.
> Because Jose goal is general purpose and mine aswell,
> but comes with overkill in the most cases.
>
> In Jose case I would suggest a slight change.
> web2py-core
> web2py-gluon
>
> This has been discusses before, I recall you where in those
> discussions 
> Jose.http://groups.google.com/group/web2py/browse_frm/thread/45ea4327d713b...
>
> http://groups.google.com/group/web2py/browse_frm/thread/51b731d9abb52...
>
> There are some other topics, search for turnkeylinux, where this is
> mentioned.
>
> I recall Dimo Barsky was busy with packaging Gluon, but I've been out
> for a while.
> I don't know him, but he might help with this.
>
> It was chaos post again, but I hope this one helps:p.
>
> Mark,


Thanks, but after looking for more info in the links you provided, I
have not been able to find the rationale
for a separate gluon and core packages.

can anybody enlight me?


[web2py] Re: Packaging web2py for Debian

2010-10-15 Thread José L .


On 15 oct, 11:33, Jurgis Pralgauskis 
wrote:
> Maybe You could usehttps://help.launchpad.net/Packaging/SourceBuilds/
>
> if you'd create stable branch on bazar and add packaging recipy 
> likehttps://code.edge.launchpad.net/~mdipierro/web2py/devel/+new-recipe
> fromhttps://code.edge.launchpad.net/~mdipierro/web2py/devel (notice
> code.EDGE.launch...)
>


I prefer to work on the mother distribution, so I've already asked for
a project in alioth.debian.org.


[web2py] Re: Packaging web2py for Debian

2010-10-15 Thread José L .


On 14 oct, 23:51, Christopher Steel  wrote:
> If your break things down into one or more “debian” packages and at
> least one web2py application you could end up with a phenomenally
> powerful and easy to maintain setup that could have resounding
> repercussions, so to speak, for all parties.
>
> How does the following example sound?
>
> Package 1, web2py
>

In Debian it should be python-web2py

> sudo apt-get install web2py
>
>         unpacks a stable version of web2py to the users home directory if one
> does not exist.
>
>         /home/mary/web2py/web2py
>


I'm thinking of a script doing (similar to what python-django package
does):

cd /home/me/whatever/

web2py-admin startproject newprojectname

would create
/home/me/whatever/web2py
.. .../applications/newprojectname
.../applications/admin (linking to /usr/share/
web2py/applications/admin)

../any needed stuff at web2py that needs to be
modified by the user and can not be in the PYTHONPATH or /usr/share/
web2py





> Adds scripts for starting, stopping and restarting web2py using the
> web2py *built in* web server. An option to install to a directory
> other than the “default” can be made available as well.


it could be just:
cd /home/me/web2py
python web2py

i.e. exactly as it is now.
I'm not sure if this process might be simplified more. One evident
simplification is adding a desktop menu entry calling web2py and
doing:

cd $HOME
if not exists, creates web2py/applications directory, and links admin
directory from /usr/share/web2py/applications/admin
launch web2py script
launc x-www-browser http://localhost:8900


So, the user can begin to work in the web browser without needing to
open a terminal window, whenever he wants to use web2py in its own
$HOME directory.

A pending question is how to deal with the needed writing permisions
in applications/admin/errors and application/admin/sessions
directories. If the directory admin is linked from /usr/share/web2py/
applications/admin, the current user doesn't have permissions there,
and should not have them if the computer is used by different users. A
way to allow each user have its own sessions and errors directories
for the admin application is needed.





>
> Advantages
> - Always works
> - Does not break anything, ever
> - Easy to customize
> - Highly portable
> - Can start developing right away
> - Easy to implement
> - easy to clean up via apt-get purge and so on.
> - easy to backup, delete, upgrade etc.



Fully agree, just upgrading the package the user benefits from the new
web2py code, including the admin or welcome applications, without
touching a line of his own applications.



>
> Disadvantages
> - Might be hard to justify doing a dissertation on this, but using
> Package X the sky is the limit ;)
>
> Package X example, web2py universal installer
>
> sudo apt-get install universal-web2py
>
> If the web2py package is not installed it gets installed, if mercurial
> is not already installed it gets installed.

easy to do adding dependencies on python-web2py and mercurial to the
universal-web2py package

If a clone of the web2py
> application called “universal installer” does not exist, it is created
> in ${HOME}/web2py/web2py/applications. if web2py is not running it
> starts it and opens default browser to the universal application.
>

mmm, I don't think that should happens without the user intervention.
Don't forget linux is multiuser (and in some schools is used with the
LTSP project, so it's multiuser concurrently).
I think that should be done after the user asks for it, clicking on a
desktop or menu icon.



> The universal application can do almost anything you like then and you
> would easily create additional packages and so forth in this way.
>
> People who want a “server installer” can create a “server installer”
> web2py application and /or debian package that could be made available
> via your universal installer.


my initial idea is providing in /usr/share/doc/python-web2py the
scripts to run web2py at the computer booting and the configuration
files for apache2, httpd-light, index.yaml, etc. with all the needed
documentation to do it manually.
Your idea may be useful to be done with apache, with a apache2-web2py
package, but I don't see how to do it universally for any web server.



>
> Sounds cool!
>

More than cool. It sounds as a need for many people!

Regards.

José L.


[web2py] Re: Packaging web2py for Debian

2010-10-14 Thread José L .


On 14 oct, 17:24, Mark Breedveld  wrote:
> I've not so much time.
> But we have done this discussion before.
> There where three problems with packaging web2py.
>
> - Really frequent release period (not impossible for someone with a
> lot time)

I've already answer this before: Debian sid for frequent uploads,
debian stable for stable servers (with security patches). The
frequency the package is updated will depend on how much web2py
changes between releases. With a good packaging it may take five
minutes recompiling the package. Also, if the packaging is done via a
group of people working together in alioth.debian.org it may be
updated very often.

> - Difficult to implement according the packaging guidelines

That's where I think I can help, with the help of others who know
better the internals of web2py to solve the problems that may arise.

> - Difficult to implement with user separation

It's related to the above problem, but I think it can be done.

> - (Too) many configuration possible

>From my point of view the package only should provide one possible
configuration, the less intrusive (in terms of changing user
configurations): use the rocket server and sqlite. It may also provide
Readme or example files to configure apache, or other servers, but
that's something not needed to begin to work with web2py. Configuring
a server is done to put a server in production, and that's something
that, in my opinion, should always be done manually, not automatically
by installing a package.


>
> If we solve the above and find someone with enough time. Yes, that
> would be perfect and I would support that.
>
> The application I have in mind looks like webmin, ecplipse IDE (plugin
> framework), netbeans (plugin framework). A kind of universal installer
> for web2py. This situation would mean the web2py is plugin in the
> system. Every plugin has its own capability's and configuration. like
> - Apache ( wsgi+ web2py + mysql + jailroot )
> - http ligth + web2py + postgres
>
> But the first release would contain a simple plugin.
> Just web2py in some folder under some user.
>
> And the internal updater of web2py is used to update it.
>
> But if you say that this is not allowed.

It's not allowed as a Debian package inside Debian repositories, but
you can do a Debian package with it inside for your personal use, or
to put it in a web2py download page.

> Then there is only one thing to do.
> Find a company or person which has explicit benefit or/and willing to
> contribute a large amount of time by packaging.
> He/They would become the Release manager of web2py.
>


I think I don't understand what you mean or what you would like to do.
A package maintainer is not a release manager of the application. The
package maintainer always works with upstream, and after upstream has
released. It doesn't matter the way upstream releases, and, obviously,
the release manager must be some of the upstream team. The package
maintainer doesn't need to be part of the upstream team. He just pick
up the sources and make a package that fullfils the distribution
packaging guidelines. I want to have a Debian package of web2py, so I
volunteer to work on it, but I do not want to be part of the web2py
release team. I think Massimo is doing a great work with the help of
many people who know of Python and web development much more than me .
Also, I don't have any interest in releasing for Mac, windows, or even
Red Hat. I am just a Debian Developer who is using web2py, knows the
internal of packaging, has permissions to upload new software to the
official Debian repository,  and would like to have it in Debian. So
far, so good. No more ambitions, no more needs.

Regards
José L.


[web2py] Re: Packaging web2py for Debian

2010-10-13 Thread José L .


On 14 oct, 02:36, Mark Breedveld  wrote:
> Hello Guys,
>
> My apologise for my late update on the project.
> Had to get my propedeuse  :p.
>
> And next 1 - 1,5 year I hope to do my graduation project on HRO.
> Which I hope is implement or extends web2py manager.
>
> In other topics we discussed the complexity and problems.
> Some of us agreed that we would make an application that maintains the
> web2py instances.
>
> I've set up some main features. (MoSCoW)
> - The application must be cross-platform too keep it maintainable for
> us.
> - The application must be run by its own user or the system user
> - The application could support the multiple connectors
> - The application could check/install/config on multiple platforms
> multiple depencies like database/frontend servers
>
> This is very hard too accomplish. And that's why I want too spend a
> hole year on it.


That's not a packaging of an application for a distribution. What you
want to do doesn't exist and, as far as I know, has never being
integrated in a linux distribution.

I don't mean you must not do it, I just mean that I don't think your
work will be accepted in any distribution, but it may be useful as a
package to be downloaded from the web2py site. But, a package that
works is different from a package that can be accepted in the official
repository of a linux distribution.




[web2py] Re: Packaging web2py for Debian

2010-10-13 Thread José L .


On 13 oct, 23:18, Tim Michelsen  wrote:
> > I feel this will be a maintenance nightmare unless it somehow upgrades
> > itself. The release process of debian is very slow compared to ours.
>
> You can have automatic daily builds of a source tree import to your 
> PPA:https://help.launchpad.net/Packaging/SourceBuilds/Recipes

Debian backports provide a much safer upgrading. I won't like to trust
my server installation in a daily built package. I'd prefer using a
stable package, or if I want the latest feature, using a backports
that has already been checked and passed through a period of days
before being added to Debian testing from unstable.


[web2py] Re: Packaging web2py for Debian

2010-10-13 Thread José L .


On 13 oct, 23:17, Richard  wrote:
> I remember talk about ability to upgrade through admin - is that
> practical?
>


It works, but it must be disabled in the Debian package. Versions can
not be upgraded without upgrading the package, that would break the
system packages database. As an example, OpenOffice or firefox have
that same feature disabled in their Debian packages. If you want to
upgrade the application you have to upgrade the package.



[web2py] Re: Packaging web2py for Debian

2010-10-13 Thread José L .


On 13 oct, 22:29, mdipierro  wrote:
> I feel this will be a maintenance nightmare unless it somehow upgrades
> itself. The release process of debian is very slow compared to ours.
>

Yes and not. Debian is three distributions: stable, testing and sid.
If you want to run sid, you have the most upgraded distribution in the
world.


The web2py package in stable must be stable, i.e. it must not change,
except for security patches. Even if it's two years old, it must be
work. I don't think it should be a nightmare if web2py changelog
explicits says when a security fix is applied.
This would allow a web2py application installed in a stable Debian
machine can run for years, without worrying if a new change in the
latest web2py release would break the compatibility.
Also, this would allow some new "applications" built over web2py could
be added to the Debian repository, just adding python-web2py as a
dependency.

I've been using web2py for about a year, and some of my applications
are running a 10 months web2py version without any problem, and I
don't plan to upgrade it. I feel happy using the new features of the
latest versions, but for new applications: that's what Debian testing
or Debian sid distributions are for.





> On Oct 13, 3:12 pm, Michele Comitini 
> wrote:
>
>
>
>
>
>
>
> > Hi José,
>
> > The .deb is badly needed to spread web2py even more!
>
> > Would that be useful for ubuntu also which is probaly the most common
> > linux distro?
>
> > The packaging must also take into account that a machine could have
> > different instances of web2py.
> > It would be a good idea to have some tools in the .deb to support the
> > creation of different instances, maybe
> > throughhttp://pypi.python.org/pypi/virtualenvsothat upgrade of
> > system python doesn't break everything as it usually happens on
> >  debian with other python frameworks.
>
> > mic
>
> > 2010/10/13 José L. :
>
> > > Hi, as it seems that time goes by, and no available packages for
> > > Debian are ready, I'm going to begin to work on it seriously to upload
> > > web2py to Debian.
> > > I know 
> > > (http://groups.google.com/group/web2py/browse_thread/thread/45ea4327d7...
> > > ) Mark told he was going to work on it, but I think that I have been
> > > patient enough waiting since April. It's not only Debian is one of the
> > > most important Linux distribution, also many other distributions as
> > > Ubuntu are derivatives from Debian, so uploading web2py to Debian will
> > > bring it to many users in the Linux world.
>
> > > I'd like to have a package similar to the django one. There is a
> > > python-django package, and I'd like to make a python-web2py package to
> > > work in a similar way, so people don't need to relearn a new method of
> > > work.
> > > I'd like it to work as similar as possible to
> > >http://codeghar.wordpress.com/2007/12/01/django-in-ubuntu/.
>
> > > So, the main question for me is:
> > > once gluon is installed in the PYTHONPATH and web2py.py installed in /
> > > usr/bin,  I would  like to be able to tell the user:
> > > execute python web2py.py in any directory and point your browser to
> > >http://localhost:8000tobegin to work.
>
> > > But, as web2py structure is today, I don't know if such thing is
> > > possible (after adding every needed file to every needed path).
>
> > > If not, what other approaches might be used to make any user in the
> > > system able to use a system with a installed web2py structure?
>
> > > On the other hand, if more people want to collaborate in the packaging
> > > I'll be glad to open a project in alioth.debian.org, so we can work
> > > together.
>
> > > Regards.
> > > José L.


[web2py] Re: Packaging web2py for Debian

2010-10-13 Thread José L .


On 13 oct, 21:00, mdipierro  wrote:
> web2py -f folder
>
> It should work but you may want to check. Perhaps we may need a patch.



I'll try it,
I guess some other files will be needed, but I'll report my progress.


Anyway maybe you could add some code to web2py.py so if it doesn't
find the gluon dir (or any other flag file) in the same directory it's
executed, it might pass automagically -f $HOME to the script.

Regards


[web2py] Packaging web2py for Debian

2010-10-13 Thread José L .
Hi, as it seems that time goes by, and no available packages for
Debian are ready, I'm going to begin to work on it seriously to upload
web2py to Debian.
I know ( 
http://groups.google.com/group/web2py/browse_thread/thread/45ea4327d713bdd8/252d25418aeb42fd
) Mark told he was going to work on it, but I think that I have been
patient enough waiting since April. It's not only Debian is one of the
most important Linux distribution, also many other distributions as
Ubuntu are derivatives from Debian, so uploading web2py to Debian will
bring it to many users in the Linux world.

I'd like to have a package similar to the django one. There is a
python-django package, and I'd like to make a python-web2py package to
work in a similar way, so people don't need to relearn a new method of
work.
I'd like it to work as similar as possible to
http://codeghar.wordpress.com/2007/12/01/django-in-ubuntu/ .

So, the main question for me is:
once gluon is installed in the PYTHONPATH and web2py.py installed in /
usr/bin,  I would  like to be able to tell the user:
execute python web2py.py in any directory and point your browser to
http://localhost:8000 to begin to work.

But, as web2py structure is today, I don't know if such thing is
possible (after adding every needed file to every needed path).

If not, what other approaches might be used to make any user in the
system able to use a system with a installed web2py structure?


On the other hand, if more people want to collaborate in the packaging
I'll be glad to open a project in alioth.debian.org, so we can work
together.

Regards.
José L.


[web2py] Re: Debian Packaging

2010-09-08 Thread José L .
We're on September 8th, and no news from the packaging. Debian testing
is frozen, which means that we won't see web2py in Debian stable
before a year or two.

I'd like to know if you keep on trying to do the packaging. Also, if
you need help I can create a collaboration group for the packaging in
alioth.debian.org.
And, if you think you can not do it, please let me hijack to ITP, I'd
try to do the packaging, so in the medium term, we can have a working
package to be tested by the Debian community (and its derivatives, as
Ubuntu, Linux Mint, LinEx, etc.)

Regards.
José L.

On 2 jul, 14:41, Mark Breedveld  wrote:
> Thanks, i'm currently busy on a class diagram and a technical report
> to make the application clear. Because it's quite complex, but
> possible.
>
> But in the mean while, I would like to get a list of currently used
> configurations.
> Like this.
> web2py + apache wsgi + postgreSQL (textual configuration)
> web2py (textual configuration) + apache proxy (textual configuration)
> + postgreSQL (textual configuration)
> web2py (textual configuration) + tomcat  (XML configuration)  +
> postgreSQL  (textual configuration) //This will probably not exist,
> just an example
>
> On 18 jun, 15:46, Christopher Steel  wrote:
>
>
>
>
>
>
>
> > Mark,
>
> > That sounds like a great idea.
>
> > Chris
>
> > On Jun 18, 5:33 am, mdipierro  wrote:
>
> > > This is an excellent idea.
>
> > > On Jun 17, 12:35 pm, Mark Breedveld  wrote:
>
> > > > Hello everone,
>
> > > > I've two announcements to make.
> > > > First one is that the Hogeschool Rotterdam (HRO) about to launch a
> > > > test educational environment with web2py.
> > > > Tested on GAE and SUN. So support is on his way.
>
> > > > Secondly I just got an idea with a hole different approach to
> > > > packaging.
> > > > We make a program that manages (create, delete, update, configures)
> > > > multiple instances of web2py with different users and frontend servers
> > > > like apache.
> > > > With configures, I mean the wsgi, fastgci, proxy, but also passwords,
> > > > clustering. etc.
> > > > We upload that single program into the repo.
>
> > > > - This is ideal for universities how want to give every student a
> > > > web2py server.
> > > > - Hosting compagnies (same idea as above)
> > > > - Single users
> > > > And of course our packagers who have not to take up against the
> > > > release frequency of web2py (which is to high for industrial
> > > > packaging).
> > > > Also it easier the get compliant to the guidelines ofdebian/novell
> > > > opensuse.
>
> > > > And last but not least. The current publishing way has not the be
> > > > changed.
>
> > > > I hope the idea is clear and I hope to hear of you al soon.
>
> > > > regards Mark Breedveld,
>
> > > > On May 27, 1:38 pm, Mark Breedveld  wrote:
>
> > > > > My excuse for my late reaction, but you all landed up my spambox of my
> > > > > provider.
> > > > > Which I've solved now.
>
> > > > > Thank you both for your reaction.
> > > > > You're (Jose) right on the best practices.
>
> > > > > In order to set up adebianpackaging proces we should have or do the
> > > > > following
> > > > > - The web2py community should have a maintainer (group)
> > > > >        - Which has manage the releases repo's
> > > > >        - Ajust web2py for use through the repo
> > > > >               - example : disables the buildin update function /
> > > > > splits data into the right locations etc
>
> > > > > - We should release a debain version on short notice after the sources
> > > > > release of Massimo.
>
> > > > > - We could usehttp://build.opensuse.orgwhichis/looksverygood
>
> > > > > Because the maintainer has to invest a lot of time on regular bases.
> > > > > My idea is to launch a vacature for it on the community.
> > > > > And have Massimo make a decide how will become the lead packager,
> > > > > because he will have to work with him
>
> > > > > I will testhttp://build.opensuse.orgtolookifit'susefull for
> > > > > web2py.
> > > > > My guesses is that it will be.
> > > > > I hope to do the testing this weekend.
>
> > > > > Di

[web2py] does anybody know what happened to www.web2pyslices.com?

2010-06-09 Thread José L .
It's not reachable since a couple of days, and it's a very valuable
tool for web2py users...

José L.


[web2py] Re: Debian Packaging

2010-05-17 Thread José L .


On 17 mayo, 17:32, Mark Breedveld  wrote:
> I've been through the material and it's quite straight forward.
> So we could keep the current packaging system like it's now.
>
> But we both now that it ain't suitable for debian packaging system.
> So I have a tiny idea.
>
> We start working with a major and a tiny release.
> The major release will not be up to date, but a proven version.
> And released every quarter or half a year. Just like ubuntu.
>
> This we make it easier for companies to offer long term support.
> Which is an important issue for customers.
>
> It also shows that web2py has reached the status of an mature
> webserver/framework.
>
> My excuse for the long waiting for my answer, but I starting my own
> business.
> While I'm also busy with school.
>
> But I've made request on Hogeschool Rotterdam to support web2py.
> And they where very positieve, so I keep you all posted.
>
> regards Mark Breedveld,
>
> On Apr 20, 7:06 pm, Mark Breedveld  wrote:
>
>
>
> > Thank you very much,
> > This are some of the answers I was looking for.
>
> > I'll dive into it, tomorrow.
> > But this gives me an idea about how the release cicle is done.
> > And how we could implement thedebianpackages in it.
>
> > Which has been discussed in an 
> > earlier.http://groups.google.com/group/web2py/browse_frm/thread/51b731d9abb52...
> > This might give an idea why we want to package web2py.
>
> > And the reason I started this post was because I had the same
> > questions as you.
> > The frequent releases of Massimo etc.
> > More than enough to discuss,
> > but first I'll study the answer you give me and come up with an idea
> > == more questions :p.
>
> > regards
>
> > Mark Breedveld,



I've found this thread of discussion today. I'am an official Debian
developer and was thinking also of packaging web2py for Debian, but
I've begun to use web2py only a few weeks ago and I prefer to know
more the framework before trying to package it.
Anyway, if I've understood it correctly, I've read in this thread that
you're planning to add the debianization to the web2py sources, so the
package can be created easily. That's a bad practice from the Debian
point of view, and package maintainers encourage upstream not to do
it, unless upstream is the package maintainer. In fact, it's very
usual that, if upstream sources contain a debian directory, the
maintainer removes it before adding the definitive one.

The oficial maintainer must know and modify the debianization all the
time, so he (or they) are who must write it, not upstream. It's the
maintainer responsability having it in a good shape inside the debian
repository.

On the other hand, I've also read that you plan to recheck the package
every quarter of a year. That's not a good practice either, the
package should be checked when it's needed. I.e: everytime a new
upstream version is released, on when a bug in the packaging is
discovered.

If you want to do the Debian package for web2py I recommend you fill a
ITP (Intend to Package) bug in bugs.debian.org, so you'll be the
official maintainer of it, and do all the packaging in Debian. Doing
it in that way, web2py will be in the Debian archive and,
automatically, in all its derivatives, as Ubuntu.

If you need any help, I can lend you a hand, or even do the
maintaining of web2py together, but for that, I need more time to know
the insides of web2py before feeling I can do a good work with it.

Regards.
José L.


[web2py] web2py on twisted

2010-04-28 Thread José L .
Hi,
I'm using an application running on twisted to communicate with some
electronic devices. twisted is almost a need to handle this
application because of the async nature of the comms. Also I use
twisted + some javascript to render a http page with the info coming
from the devices and to give the user the chance to change some
parameters of these devices.
I'd like to have a much better user interface, adding database
support, authentication, role permissions, etc. and that's how I
arrived to web2py. After comparing some python frameworks, I feel
web2py fits pretty well with my programming habits.
As I've just arrived to web2py,  some days ago, I'm finishing of
reading the book and I've begun to code some things.

So my doubts are:
- has anybody run before web2py using twisted as server?
- is there any advice on how to integrate some external apps in the
web2py world?

The app I'm running on twisted needs to use different tcp ports,
handles different protocols and has been tested for a long time, so
I'd like to keep it as it is, when possible, without too many
modifications.

Any advice or help is welcome.
Regards