[web2py] Problem with one-to-many field

2011-01-17 Thread rif
Hi guys,

I just started working with web2py and I like it a lot. I have a
little problem with the following tables:

The firma field in the second table is shown as a text field where I
can only enter the ids and not as a select field. I admit that I might
have saved the db.py with firma field as a string first but now the
migration does not seem to take place.
I have other foreign key fields that are working fine but this one is
giving me troubles. Did I do something wrong here?

If you need more info please let me know.

Keep up the good work!
Radu

db.define_table('firma',
Field('nume', required=True, unique=True),
format='%(nume)s'
)

db.define_table('angajat',
Field('firma', db.firma, requires=[IS_IN_DB(db,
'firma.id', '%(nume)s')]),
Field('nume', required=True),
Field('prenume', required=True),
Field('norma', 'integer', required=True,
requires=[IS_INT_IN_RANGE(1,10)]),
Field('activ', 'boolean', default=True),
format='%(nume)s %(prenume)s'
)


[web2py] Re: Problem with one-to-many field

2011-01-18 Thread rif
It was Field('firma', db.firma), I added the requires parameter as a
desperate measure thinking that it will trigger the right
functionality. It really looks like a "glitch in the system". If it is
useful to you I can send you the whole app.

Radu (from Romania :)

On Jan 17, 6:29 pm, Massimo Di Pierro 
wrote:
> Replace
>
>  Field('firma', db.firma, requires=[IS_IN_DB(db, 'firma.id', '%
> (nume)s')]),
>
> with
>
>  Field('firma', db.firma,  requires=IS_IN_DB(db, 'firma.id', '%
> (nume)s')),
>
> or even better
>
>  Field('firma', db.firma),
>
> the validator is automatic for reference fields.
>
>  Field('firma', db.firma, requires=[IS_IN_DB(db,
> 'firma.id', '%(nume)s')]),
>
> On Jan 17, 5:11 am, rif  wrote:
>
>
>
>
>
>
>
> > Hi guys,
>
> > I just started working with web2py and I like it a lot. I have a
> > little problem with the following tables:
>
> > The firma field in the second table is shown as a text field where I
> > can only enter the ids and not as a select field. I admit that I might
> > have saved the db.py with firma field as a string first but now the
> > migration does not seem to take place.
> > I have other foreign key fields that are working fine but this one is
> > giving me troubles. Did I do something wrong here?
>
> > If you need more info please let me know.
>
> > Keep up the good work!
> > Radu
>
> > db.define_table('firma',
> >                 Field('nume', required=True, unique=True),
> >                 format='%(nume)s'
> >                 )
>
> > db.define_table('angajat',
> >                 Field('firma', db.firma, requires=[IS_IN_DB(db,
> > 'firma.id', '%(nume)s')]),
> >                 Field('nume', required=True),
> >                 Field('prenume', required=True),
> >                 Field('norma', 'integer', required=True,
> > requires=[IS_INT_IN_RANGE(1,10)]),
> >                 Field('activ', 'boolean', default=True),
> >                 format='%(nume)s %(prenume)s'
> >                 )


[web2py] Re: Problem with one-to-many field

2011-01-18 Thread rif
I changed it back to Field('firma', db.firma) and now it works as
expected. I really hope that it was somehow my mistake because I want
to learn to use and trust web2py.

Just for the record in case it happens to someone else:

I had a foreign key (OneToMany relationship) that was not rendered as
a select box in the database administration or on crud generated
forms.
This field was first added as a string field and then migrated to
db.firma (foreign key), however the field rendering remained as
textfield.

I added some requirements hoping that it will help the database schema
migration (as I learned the way that I added the requirements was
FORCING the field to be a textfield: the opposite of my intention).
When I change it back to the original form (Massiomo's suggestion) the
problem was corrected.

All the best,
Radu

On Jan 18, 4:39 pm, Massimo Di Pierro 
wrote:
> Before you send me the app. Please explain again what is your model
> now, what you get and what you expect.
>
> You original code was wrong because if the validator is a list than
> there is no dropdown. That is not a bug but a feature.
>
> On Jan 18, 2:09 am, rif  wrote:
>
>
>
>
>
>
>
> > It was Field('firma', db.firma), I added the requires parameter as a
> > desperate measure thinking that it will trigger the right
> > functionality. It really looks like a "glitch in the system". If it is
> > useful to you I can send you the whole app.
>
> > Radu (from Romania :)
>
> > On Jan 17, 6:29 pm, Massimo Di Pierro 
> > wrote:
>
> > > Replace
>
> > >  Field('firma', db.firma, requires=[IS_IN_DB(db, 'firma.id', '%
> > > (nume)s')]),
>
> > > with
>
> > >  Field('firma', db.firma,  requires=IS_IN_DB(db, 'firma.id', '%
> > > (nume)s')),
>
> > > or even better
>
> > >  Field('firma', db.firma),
>
> > > the validator is automatic for reference fields.
>
> > >  Field('firma', db.firma, requires=[IS_IN_DB(db,
> > > 'firma.id', '%(nume)s')]),
>
> > > On Jan 17, 5:11 am, rif  wrote:
>
> > > > Hi guys,
>
> > > > I just started working with web2py and I like it a lot. I have a
> > > > little problem with the following tables:
>
> > > > The firma field in the second table is shown as a text field where I
> > > > can only enter the ids and not as a select field. I admit that I might
> > > > have saved the db.py with firma field as a string first but now the
> > > > migration does not seem to take place.
> > > > I have other foreign key fields that are working fine but this one is
> > > > giving me troubles. Did I do something wrong here?
>
> > > > If you need more info please let me know.
>
> > > > Keep up the good work!
> > > > Radu
>
> > > > db.define_table('firma',
> > > >                 Field('nume', required=True, unique=True),
> > > >                 format='%(nume)s'
> > > >                 )
>
> > > > db.define_table('angajat',
> > > >                 Field('firma', db.firma, requires=[IS_IN_DB(db,
> > > > 'firma.id', '%(nume)s')]),
> > > >                 Field('nume', required=True),
> > > >                 Field('prenume', required=True),
> > > >                 Field('norma', 'integer', required=True,
> > > > requires=[IS_INT_IN_RANGE(1,10)]),
> > > >                 Field('activ', 'boolean', default=True),
> > > >                 format='%(nume)s %(prenume)s'
> > > >                 )


[web2py] Re: Why web2py? and not django?

2011-01-26 Thread rif
I'm oscillating between the two, myself. I find django more verbose
than it needs to be and as the number of the applications grows in
your project you'll be switching between files with the same name till
your finger (or mouse) hurts.

Web2py on the other hand has a poorer documentation and it does not
have a administration interface customizable for the client. I'm also
not sure about how well it scales outside of Google AppEngine. This
frase taken from the documentation:

"Even if there are multiple web servers, there must be one, and only
one, database server. "

worries me a bit.

Apart from that I did not found any downsides for web2py. In my
experience most of addons that I used in django was to supplement
django's own deficencies as a webframework and not to add extra
functionality to my applications. The top apps at 
http://djangopackages.com/categories/apps/
support my conclusion.


[web2py] Re: Why web2py? and not django?

2011-01-26 Thread rif
If someone has access to correct it, he/she should explain it more in
the book itself rather to spiritualize it here (as in: it is one
spiritual db server expressed by multiple physical entities).

On Jan 26, 4:35 pm, Jonathan Lundell  wrote:
> On Jan 26, 2011, at 8:30 AM, villas wrote:
>
>
>
> > In the book, chapter 11, Deployment Recipes.
>
> > Of course,  this isn't true because Web2py can connect to multiple DB
> > servers.
>
> > I think Massimo was trying to stress the importance of having all the
> > data in one place,  to be able maintain integrity of keys and
> > relationships, and make sure queries return accurate and up to date
> > data.
>
> Right. A single *logical* database server that presents a single consistent 
> view of the logical database.
>
>
>
>
>
>
>
>
>
> > On Jan 26, 2:10 pm, Bruno Rocha  wrote:
> >> 2011/1/26 rif 
>
> >>> "Even if there are multiple web servers, there must be one, and only
> >>> one, database server. "
>
> >> Where did you find this phrase? what context?


[web2py] Re: django admin like app/plugin in web2py

2011-01-27 Thread rif
I requested this feature in uservoice: 
http://web2py.uservoice.com/forums/42577-general

You can vote for it.

rif

On Jan 27, 6:37 am, William  wrote:
> Hi all,
> I just got started in web2py and like it so far.
> I noticed that it has a admin and an appadmin for each app.
>
> but i think appadmin is not for the users, right? is there an app or plugin
> like django admin or django grappelli?
>
> Thanks,
> Bill


[web2py] Re: django admin like app/plugin in web2py

2011-01-28 Thread rif
Yes, it is an amazing time saver.

On Jan 27, 11:56 pm, William  wrote:
> Just vote it!
> why nobody care this? They claim django admin is the kill feature of django.


[web2py] Re: need a simple wiki...

2012-08-20 Thread rif
The Search Pages is also not working. If I enter a page title and hit 
Submit I get:

Traceback (most recent call last):
  File "/home/rif/Downloads/web2py/gluon/restricted.py", line 205, in 
restricted
exec ccode in environment
  File 
"/home/rif/Downloads/web2py/applications/hopa/controllers/default.py", line 
67, in 
  File "/home/rif/Downloads/web2py/gluon/globals.py", line 182, in 
self._caller = lambda f: f()
  File 
"/home/rif/Downloads/web2py/applications/hopa/controllers/default.py", line 
13, in index
return auth.wiki()
  File "/home/rif/Downloads/web2py/gluon/tools.py", line 3146, in wiki
return self._wiki.read(slug)['content'] if slug else self._wiki()
  File "/home/rif/Downloads/web2py/gluon/tools.py", line 4573, in __call__
return self.search()
  File "/home/rif/Downloads/web2py/gluon/tools.py", line 4794, in search
content.append(DIV(T("No results",_class='w2p_wiki_form')))
NameError: global name 'T' is not defined

-- 





[web2py] Re: web2py nginx and uwsgi

2012-08-24 Thread rif
There are some (scripts/setup-web2py-nginx-uwsgi-ubuntu.sh and 
scripts/setup-web2py-nginx-uwsgi-on-centos.sh) that automate the processes 
of setting up web2py with nginx+uwsgi.

You can start by analyzing these scripts and then consult the upstream 
documentation.

-rif

vineri, 24 august 2012, 06:12:50 UTC+3, visuallinux a scris:
>
> Dear. 
>
> I am new in web developing and  always i used sample apache config. But i 
> see many post about my subject, so I would like use it. 
>
> Also I would like to integrate git to development environment, now i do 
> using trac + svn for my standalone projects. 
>
> I am following the follow howto: 
>
>
> http://alvarolizama.net/2012/06/30/mi-configuracion-para-servidores-con-python/
>  
>
> But i am some confused. 
>
> I would like to learn how to set up a development and production 
> environment for web2py with nginx + uwsgi. 
>
> Does anyone know some howto for beginners? 
>
> Does anyone let me know some links or how i can do slowly so i will can 
> understanding? 
>
>
> Regards. 
>

-- 





[web2py] Re: Book - Overview Typo

2012-08-27 Thread rif
Another mistake is here: 
http://web2py.com/books/default/chapter/29/6#Copy-data-from-one-db-into-another

hocalhost -> localhost (multiple times)

And I also thing that this is wrong:

postgresql:// -> postgres:// (multiple times)


-rif

miercuri, 15 august 2012, 16:33:18 UTC+3, Anthony a scris:
>
> Thanks for pointing this out. Note, the ")" should actually go after 
> (keyword):
>
> db(db.page.title.contains(keyword)).select().as_list()
>
>
> Anthony
>
> On Wednesday, August 15, 2012 5:52:53 AM UTC-4, Frank Cheong wrote:
>>
>> Just spotted one typo in the middle of the Overview Chapter inside the 
>> xmlrpc section, ")" is missing at the end of code.
>>
>>
>> 1.
>> 2.
>> 3.
>> 4.
>> 5.
>> 6.
>> 7.
>> 8.
>> 9.
>> 10.
>>
>> service = Service()
>>
>> @service.xmlrpc
>> def find_by(keyword):
>>  "finds pages that contain keyword for XML-RPC"
>>  return db(db.page.title.contains(keyword).select().as_list()
>>
>> def call():
>> "exposes all registered services, including XML-RPC"
>> return service()
>>
>>
>> whereas the final statement of the function find_by:-
>>
>> "return db(db.page.title.contains(keyword).select().as_list()" should be 
>> replaced by:-
>>
>> "return db(db.page.title.contains(keyword).select().as_list())"
>>
>>
>>

-- 





[web2py] GAE with Janrain problem 2.0.2

2012-08-30 Thread rif
After a succesful login from janrain running on GAE I get the following 
error:

Traceback (most recent call last):
  File "/home/rif/Documents/webframeworks/homepage/gluon/restricted.py", 
line 209, in restricted
exec ccode in environment
  File 
"/home/rif/Documents/webframeworks/homepage/applications/init/controllers/default.py",
 
line 105, in 
  File "/home/rif/Documents/webframeworks/homepage/gluon/globals.py", line 
185, in 
self._caller = lambda f: f()
  File 
"/home/rif/Documents/webframeworks/homepage/applications/init/controllers/default.py",
 
line 103, in user
    return dict(form=auth())
  File "/home/rif/Documents/webframeworks/homepage/gluon/tools.py", line 
1191, in __call__
    return getattr(self,args[0])()
  File "/home/rif/Documents/webframeworks/homepage/gluon/tools.py", line 
1961, in login
user = self.get_or_create_user(table_user._filter_fields(cas_user))
  File "/home/rif/Documents/webframeworks/homepage/gluon/tools.py", line 
1620, in get_or_create_user
(table_user[fieldname]==value)).select().first()
  File "/home/rif/Documents/webframeworks/homepage/gluon/dal.py", line 
8682, in select
return adapter.select(self.query,fields,attributes)
  File "/home/rif/Documents/webframeworks/homepage/gluon/dal.py", line 
4461, in select
    (items, tablename, fields) = self.select_raw(query,fields,attributes)
  File "/home/rif/Documents/webframeworks/homepage/gluon/dal.py", line 
4356, in select_raw
filters = self.expand(query)
  File "/home/rif/Documents/webframeworks/homepage/gluon/dal.py", line 
4232, in expand
return expression.op(expression.first, expression.second)
  File "/home/rif/Documents/webframeworks/homepage/gluon/dal.py", line 
4087, in OR
def OR(self,first,second): raise SyntaxError, "Not supported"
SyntaxError: Not supported


Does anybody experience the same problem?

-- 





[web2py] Re: web2py book on github

2012-09-01 Thread rif
Another small patch to chapter with to changes:

postrgresql:// -> postgres://
hocalhost -> localhost

sâmbătă, 1 septembrie 2012, 20:00:49 UTC+3, Massimo Di Pierro a scris:
>
> The web2py book app has been rewritten 
>
>http://www.web2py.com/book
>
> and the source of the app and the book itself is now on github
>
>https://github.com/mdipierro/web2py-book/tree/master/sources
>
> Hopefully this will make it easier to keep it updated. You can just send 
> me patches. You can also try run it yourself and see how it looks. It is no 
> more db based. it is file based. The syntax is markmin as documented in the 
> bok itself. 
>
> Massimo
>
>
>
>
>

-- 



>From 6456f13d4adecad93744feb82adc7c725656807c Mon Sep 17 00:00:00 2001
From: Radu Ioan Fericean 
Date: Sat, 1 Sep 2012 23:45:49 +0300
Subject: [PATCH] changed hocalhost->localhost, postgresql -> postgres

---
 sources/29-web2py-english/06.markmin |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sources/29-web2py-english/06.markmin b/sources/29-web2py-english/06.markmin
index 3697dc8..b8741bc 100644
--- a/sources/29-web2py-english/06.markmin
+++ b/sources/29-web2py-english/06.markmin
@@ -2606,7 +2606,7 @@ db = DAL('sqlite://storage.sqlite')
 and you wish to move to another database using a different connection string:
 
 ``
-db = DAL('postgresql://username:password@hocalhost/mydb')
+db = DAL('postgres://username:password@localhost/mydb')
 ``
 
 Before you switch, you want to move the data and rebuild all the metadata for the new database. We assume the new database to exist but we also assume it is empty.
@@ -2618,7 +2618,7 @@ cd web2py
 python scripts/cpdb.py \
-f applications/app/databases \
-y 'sqlite://storage.sqlite' \
-   -Y 'postgresql://username:password@hocalhost/mydb'
+   -Y 'postgres://username:password@localhost/mydb'
 ``
 
 After running the script you can simply switch the connection string in the model and everything should work out of the box. The new data should be there.
-- 
1.7.9.5



Re: [web2py] Updated cheatsheet

2012-09-05 Thread rif
Maybe the otherwise param should appear in the cheatsheet:
@auth.requires_login(otherwise=URL(...))

-- 





Re: [web2py] Updated cheatsheet

2012-09-05 Thread rif
Also the cast parameter. Are the sources for the cheatsheet available so we 
can make patch suggestions?

-rif

miercuri, 5 septembrie 2012, 18:53:45 UTC+3, Massimo Di Pierro a scris:
>
> It should
>
>
> On Wednesday, 5 September 2012 09:57:30 UTC-5, rif wrote:
>>
>> Maybe the otherwise param should appear in the cheatsheet:
>> @auth.requires_login(otherwise=URL(...))
>>
>>

-- 





[web2py] [ANN] Started development on web2admin

2012-09-10 Thread rif
I started the development of a new django-like admin interface.

You can find it here: https://github.com/rif/web2admin 

It is very basic but still usable because it uses SQLFORM.smartgrid.

I am announcing it early because I need your feedback and feature requests 
so that I can find out if grid will be able to support all the desired 
features.

For quick start you can create a w2a_root group and add your user to that 
group.

-rif

-- 





Re: [web2py] [ANN] Started development on web2admin

2012-09-12 Thread rif
Added plugin configuration options (inspired by sramana's instant-admin):

   - items per page
   - extra links in sidebar

Every day when I get some free time I am adding some new features. If you 
have requests or bug reports please don't hesitate :)

Thanks,
-rif

-- 





Re: [web2py] [ANN] Started development on web2admin

2012-09-12 Thread rif
There was a problem with the installation from master tip tar gz. Created 
plugin archive for download 
here<https://github.com/downloads/rif/web2admin/web2py.plugin.web2admin.w2p>
.

miercuri, 12 septembrie 2012, 18:50:20 UTC+3, rif a scris:
>
> Added plugin configuration options (inspired by sramana's instant-admin):
>
>- items per page
>- extra links in sidebar
>
> Every day when I get some free time I am adding some new features. If you 
> have requests or bug reports please don't hesitate :)
>
> Thanks,
> -rif
>

-- 





Re: [web2py] [ANN] Started development on web2admin

2012-09-13 Thread rif
New features:

   - Admin logo configuration
   - Actions (execute functions on multiple rows)
   - w2a_export permission for restricting export feature
   - Screenshots in readme :)
   - Tweaks and bug fixes 
   
More to come:

   - Table fields exclusion
   - Filters (easy restrict range of displayed rows)
   - Inline tables (related tables on a single row)
   - Your suggestion here

-rif 

miercuri, 12 septembrie 2012, 19:07:10 UTC+3, rif a scris:
>
> There was a problem with the installation from master tip tar gz. Created 
> plugin archive for download 
> here<https://github.com/downloads/rif/web2admin/web2py.plugin.web2admin.w2p>
> .
>
> miercuri, 12 septembrie 2012, 18:50:20 UTC+3, rif a scris:
>>
>> Added plugin configuration options (inspired by sramana's instant-admin):
>>
>>- items per page
>>- extra links in sidebar
>>
>> Every day when I get some free time I am adding some new features. If you 
>> have requests or bug reports please don't hesitate :)
>>
>> Thanks,
>> -rif
>>
>

-- 





Re: [web2py] [ANN] Started development on web2admin

2012-09-14 Thread rif
Hi rochacbruno, thank you for the kind words.

Yes select2 should be an improvement over chosen, I found about it here: 
https://github.com/h5bp/lazyweb-requests/issues/92 (they are planning to 
upgrade standard select). A widget would be great.

The url trick is very welcome I will get it in the release today, thank you.

The fields feature is ready and today I will work on action history (to 
keep a log of actions in the admin) and filters.

-rif

vineri, 14 septembrie 2012, 00:45:57 UTC+3, rochacbruno a scris:
>
> Nice work!
>
> the select2.js is the same as choosen? I really like it! should have a 
> web2py widget for this.
>
> SUGGESTION:
>
> it is very annoying to request "host/app/plugin_web2admin" the url does 
> not looks good. To change this, the hard option is tricking on routes. But 
> there is an easy way:
>
> NOTE: it is a tricky, maybe it can change in the future, for now it works 
> nice.
>
> On top of  MODELS/PLUGIN_WEB2ADMIN.PY add
>
> if request.controller == 'web2admin':
>> request.controller = 'plugin_web2admin'
>> response.view = response.view.replace('web2admin', 'plugin_web2admin')
>
>
>
> now you can calll "localhost:8000/app/web2admin/" 
>
> I will start to use this, great work!
>
> ** is there a license?
>
>

-- 





[web2py] App does not exist or your are not authorized

2012-09-14 Thread rif
Does anybody know why do I get "App does not exist or your are not 
authorized" when I install https://github.com/rif/web2admin ?

The plugin install fine, though.

-rif



-- 





[web2py] Re: [ANN] Started development on web2admin

2012-09-14 Thread rif
Thank you massimo,

Just added history, fields selection and better access url. I am working on 
filters and on using the links and left parameters from smartgrid.

Considering that most of the heavy lifting is done by the brilliant 
smartgrid I think it is quite ready for beta testing (and any bug report is 
appreciated). However there are more features in the pipeline so whenever 
you consider it to have enough features you can start using it.

About the place for visibility: well, my goal is to make it stand near 
plugin_wiki ;)

-rif

vineri, 14 septembrie 2012, 16:39:50 UTC+3, Massimo Di Pierro a scris:
>
> This is really nice? If you think this is ready for production (or when 
> you think it is ready for production) let me know. Where do you do you 
> think would be a place to link it to make it more visible?
>
> massimo
>
> On Monday, 10 September 2012 08:49:35 UTC-5, rif wrote:
>>
>> I started the development of a new django-like admin interface.
>>
>> You can find it here: https://github.com/rif/web2admin 
>>
>> It is very basic but still usable because it uses SQLFORM.smartgrid.
>>
>> I am announcing it early because I need your feedback and feature 
>> requests so that I can find out if grid will be able to support all the 
>> desired features.
>>
>> For quick start you can create a w2a_root group and add your user to that 
>> group.
>>
>> -rif
>>
>

-- 





Re: [web2py] Re: [ANN] Started development on web2admin

2012-09-14 Thread rif
Excellent suggestion. dbs will be available in the next version.

-rif

vineri, 14 septembrie 2012, 20:34:16 UTC+3, rochacbruno a scris:
>
> There is Pyodel (learning tool), I dont know about the status of QAStak 
> and PyForum.
>
> @rif what about multiple databases and databases named differently? 
>
> your code expects a "db" object, so I think you can put on the models a 
> config variable for dbs
>
> plugin_web2admin_dbs = [db, other_db, sessions_db, user_db]
>
> So in plugin code you can check
>
> if "plugin_web2admin_dbs" in globals():
> for db in  plugin_web2admin_dbs:
> # logic to create navbar menus to change the "db" context.
>
>
>

-- 





Re: [web2py] Re: [ANN] Started development on web2admin

2012-09-15 Thread rif
I have added initial multi-db support and now I am working on your 
suggestion. It should be ready in a couple of hours. I will let you know.

-rif

sâmbătă, 15 septembrie 2012, 02:33:49 UTC+3, rochacbruno a scris:
>
> @rif I have some suggestion
>
> Screenshot: http://i.imgur.com/3t2kv.png
>
> For the suggested [fields] buttom it can be done with a modal or popup, it 
> can loads a   inside the 
> popup or modal, or if prefered it can retrieve this info via ajax.
>
> To retrieve the info is easy,
>
> for field in table.fields:
> print name.name, name.type, name.length, name.comment, name.label, 
> name.compute, name.represent, name.requires, name.required, name.unique, 
> name.readable, name.writable
> *first_name string 128 None First name None None 
>  False False True True*
>  
> So that info will be very important for developers and admins, also the 
> buttom can show up only if admin is logged in.
>
> Let me know if you need some help, I am using this and I really think it 
> can be a replacement for appadmin.
>

-- 





Re: [web2py] Re: [ANN] Started development on web2admin

2012-09-15 Thread rif
You can pull from my devel branch for multi-db support. Please give me 
feedback.

I am merging your pull request. An I think I will use ajax.

-rif

sâmbătă, 15 septembrie 2012, 13:11:14 UTC+3, rochacbruno a scris:
>
> I did the modal part, now need to do the shortcuts.
>
> also as you are working on mult-db support, the code may change a little.
>
> look:
>
> [image: Inline image 1]
>
> [image: Inline image 2]
>

-- 





Re: [web2py] Re: [ANN] Started development on web2admin

2012-09-15 Thread rif
I bow before what you showed in modules/html.py, yet I preferred a much 
simpler solution even if it is not reusable (hopefully it will give a 
chance to less-python-gurus like me to understand :).

I will focus on the rest of the suggestions now.

-rif

sâmbătă, 15 septembrie 2012, 13:31:52 UTC+3, rochacbruno a scris:
>
> Your call, also if you prefer to take the modal logic from modules/server 
> side DOM on to HTML template it is easy to change.
>
> I just created as Server side DOM because it can be reused.
>

-- 





[web2py] Re: [ANN] Started development on web2admin

2012-09-15 Thread rif
I just thought that one might want to use the manager (without prefix) role 
for a different propose so I was just playing safe. I agree about namespace 
pollution.

We just need more opinions on this matter (Is it safe to just use manager 
role or general read/write/etc permissions?). And if we reach a conclusion 
I am happy to change.

Also the the plugin_web2admin->plugin_admin is OK, especially if it will 
become official :)

To others: please give feedback on this.

-rif

sâmbătă, 15 septembrie 2012, 15:25:27 UTC+3, Alan Etkin a scris:
>
> Shouldn't this be called plugin_admin or similar (following the 
> plugin_wiki fashion)?
>
> Does w2x_etc naming use any plugin convention?. For instance, in Pyodel 
> (also a plugin) I rely in an application manager role (without a prefix). 
> Maybe we can adopt a standard naming convention for plugin roles. Also, I 
> think that roles with prefixes somehow polute the group space.
>
> El lunes, 10 de septiembre de 2012 10:49:35 UTC-3, rif escribió:
>>
>> I started the development of a new django-like admin interface.
>>
>> You can find it here: https://github.com/rif/web2admin 
>>
>> It is very basic but still usable because it uses SQLFORM.smartgrid.
>>
>> I am announcing it early because I need your feedback and feature 
>> requests so that I can find out if grid will be able to support all the 
>> desired features.
>>
>> For quick start you can create a w2a_root group and add your user to that 
>> group.
>>
>> -rif
>>
>

-- 





[web2py] Re: [ANN] Started development on web2admin

2012-09-16 Thread rif
Check out the new global search, feedback most welcomed.

Features still to come:

   - Custom Links
   - Custom Left join


-rif

sâmbătă, 15 septembrie 2012, 15:38:14 UTC+3, rif a scris:
>
> I just thought that one might want to use the manager (without prefix) 
> role for a different propose so I was just playing safe. I agree about 
> namespace pollution.
>
> We just need more opinions on this matter (Is it safe to just use manager 
> role or general read/write/etc permissions?). And if we reach a conclusion 
> I am happy to change.
>
> Also the the plugin_web2admin->plugin_admin is OK, especially if it will 
> become official :)
>
> To others: please give feedback on this.
>
> -rif
>
> sâmbătă, 15 septembrie 2012, 15:25:27 UTC+3, Alan Etkin a scris:
>>
>> Shouldn't this be called plugin_admin or similar (following the 
>> plugin_wiki fashion)?
>>
>> Does w2x_etc naming use any plugin convention?. For instance, in Pyodel 
>> (also a plugin) I rely in an application manager role (without a prefix). 
>> Maybe we can adopt a standard naming convention for plugin roles. Also, I 
>> think that roles with prefixes somehow polute the group space.
>>
>> El lunes, 10 de septiembre de 2012 10:49:35 UTC-3, rif escribió:
>>>
>>> I started the development of a new django-like admin interface.
>>>
>>> You can find it here: https://github.com/rif/web2admin 
>>>
>>> It is very basic but still usable because it uses SQLFORM.smartgrid.
>>>
>>> I am announcing it early because I need your feedback and feature 
>>> requests so that I can find out if grid will be able to support all the 
>>> desired features.
>>>
>>> For quick start you can create a w2a_root group and add your user to 
>>> that group.
>>>
>>> -rif
>>>
>>

-- 





[web2py] Re: [ANN] Started development on web2admin

2012-09-18 Thread rif
Lots of new customization options and features. Check it out and please 
report bugs.

-rif

duminică, 16 septembrie 2012, 13:31:55 UTC+3, rif a scris:
>
> Check out the new global search, feedback most welcomed.
>
> Features still to come:
>
>- Custom Links
>- Custom Left join
>
>
> -rif
>
> sâmbătă, 15 septembrie 2012, 15:38:14 UTC+3, rif a scris:
>>
>> I just thought that one might want to use the manager (without prefix) 
>> role for a different propose so I was just playing safe. I agree about 
>> namespace pollution.
>>
>> We just need more opinions on this matter (Is it safe to just use manager 
>> role or general read/write/etc permissions?). And if we reach a conclusion 
>> I am happy to change.
>>
>> Also the the plugin_web2admin->plugin_admin is OK, especially if it will 
>> become official :)
>>
>> To others: please give feedback on this.
>>
>> -rif
>>
>> sâmbătă, 15 septembrie 2012, 15:25:27 UTC+3, Alan Etkin a scris:
>>>
>>> Shouldn't this be called plugin_admin or similar (following the 
>>> plugin_wiki fashion)?
>>>
>>> Does w2x_etc naming use any plugin convention?. For instance, in Pyodel 
>>> (also a plugin) I rely in an application manager role (without a prefix). 
>>> Maybe we can adopt a standard naming convention for plugin roles. Also, I 
>>> think that roles with prefixes somehow polute the group space.
>>>
>>> El lunes, 10 de septiembre de 2012 10:49:35 UTC-3, rif escribió:
>>>>
>>>> I started the development of a new django-like admin interface.
>>>>
>>>> You can find it here: https://github.com/rif/web2admin 
>>>>
>>>> It is very basic but still usable because it uses SQLFORM.smartgrid.
>>>>
>>>> I am announcing it early because I need your feedback and feature 
>>>> requests so that I can find out if grid will be able to support all the 
>>>> desired features.
>>>>
>>>> For quick start you can create a w2a_root group and add your user to 
>>>> that group.
>>>>
>>>> -rif
>>>>
>>>

-- 





[web2py] Re: [ANN] Started development on web2admin

2012-09-25 Thread rif
Added django like filters to web2admin.

I will stop adding new features for a while and declare the current build 
as beta. Please test it and report issues on 
github<https://github.com/rif/web2admin/issues>
.

Currently the GAE is not supported due to some dal issues.

Please test,
-rif

marți, 18 septembrie 2012, 14:37:57 UTC+3, rif a scris:
>
> Lots of new customization options and features. Check it out and please 
> report bugs.
>
> -rif
>
> duminică, 16 septembrie 2012, 13:31:55 UTC+3, rif a scris:
>>
>> Check out the new global search, feedback most welcomed.
>>
>> Features still to come:
>>
>>- Custom Links
>>- Custom Left join
>>
>>
>> -rif
>>
>> sâmbătă, 15 septembrie 2012, 15:38:14 UTC+3, rif a scris:
>>>
>>> I just thought that one might want to use the manager (without prefix) 
>>> role for a different propose so I was just playing safe. I agree about 
>>> namespace pollution.
>>>
>>> We just need more opinions on this matter (Is it safe to just use 
>>> manager role or general read/write/etc permissions?). And if we reach a 
>>> conclusion I am happy to change.
>>>
>>> Also the the plugin_web2admin->plugin_admin is OK, especially if it will 
>>> become official :)
>>>
>>> To others: please give feedback on this.
>>>
>>> -rif
>>>
>>> sâmbătă, 15 septembrie 2012, 15:25:27 UTC+3, Alan Etkin a scris:
>>>>
>>>> Shouldn't this be called plugin_admin or similar (following the 
>>>> plugin_wiki fashion)?
>>>>
>>>> Does w2x_etc naming use any plugin convention?. For instance, in Pyodel 
>>>> (also a plugin) I rely in an application manager role (without a prefix). 
>>>> Maybe we can adopt a standard naming convention for plugin roles. Also, I 
>>>> think that roles with prefixes somehow polute the group space.
>>>>
>>>> El lunes, 10 de septiembre de 2012 10:49:35 UTC-3, rif escribió:
>>>>>
>>>>> I started the development of a new django-like admin interface.
>>>>>
>>>>> You can find it here: https://github.com/rif/web2admin 
>>>>>
>>>>> It is very basic but still usable because it uses SQLFORM.smartgrid.
>>>>>
>>>>> I am announcing it early because I need your feedback and feature 
>>>>> requests so that I can find out if grid will be able to support all the 
>>>>> desired features.
>>>>>
>>>>> For quick start you can create a w2a_root group and add your user to 
>>>>> that group.
>>>>>
>>>>> -rif
>>>>>
>>>>

-- 





Re: [web2py] Re: [ANN] Started development on web2admin

2012-09-25 Thread rif
I really hope that my code meets your standards and if you find something 
you don't like please let me know and I'll fix it.

The code is quite small (especially if the static folder is merged with the 
welcome app, I just extended the main layout).

Any functionality requests are welcomed for the 1.1 release.

-rif

marți, 25 septembrie 2012, 15:22:06 UTC+3, Massimo Di Pierro a scris:
>
> Let me add... appadmin was never developed to be a production tool. 
> Something better like web2admin is very much welcome. I will review and we 
> will discuss on this list whether to replace appadmin.
>
> Some of the issues to be considered are:
> - functionality
> - bloat of the welcome app
>
>
>
> On Tuesday, 25 September 2012 07:19:51 UTC-5, Massimo Di Pierro wrote:
>>
>> No but it not excluded. I did not have time to review it in detail.
>>
>> On Tuesday, 25 September 2012 05:29:18 UTC-5, Alec Taylor wrote:
>>>
>>> Just a quick question, is your goal to eventually replace appadmin with 
>>> this?
>>>
>>> :)
>>>
>>> On Tue, Sep 25, 2012 at 8:24 PM, rif  wrote:
>>>
>>>> Added django like filters to web2admin.
>>>>
>>>> I will stop adding new features for a while and declare the current 
>>>> build as beta. Please test it and report issues on 
>>>> github<https://github.com/rif/web2admin/issues>
>>>> .
>>>>
>>>> Currently the GAE is not supported due to some dal issues.
>>>>
>>>> Please test,
>>>> -rif
>>>>
>>>> marți, 18 septembrie 2012, 14:37:57 UTC+3, rif a scris:
>>>>
>>>>> Lots of new customization options and features. Check it out and 
>>>>> please report bugs.
>>>>>
>>>>> -rif
>>>>>
>>>>> duminică, 16 septembrie 2012, 13:31:55 UTC+3, rif a scris:
>>>>>>
>>>>>> Check out the new global search, feedback most welcomed.
>>>>>>
>>>>>> Features still to come:
>>>>>>
>>>>>>- Custom Links
>>>>>>- Custom Left join
>>>>>>
>>>>>>
>>>>>> -rif
>>>>>>
>>>>>> sâmbătă, 15 septembrie 2012, 15:38:14 UTC+3, rif a scris:
>>>>>>>
>>>>>>> I just thought that one might want to use the manager (without 
>>>>>>> prefix) role for a different propose so I was just playing safe. I 
>>>>>>> agree 
>>>>>>> about namespace pollution.
>>>>>>>
>>>>>>> We just need more opinions on this matter (Is it safe to just use 
>>>>>>> manager role or general read/write/etc permissions?). And if we reach a 
>>>>>>> conclusion I am happy to change.
>>>>>>>
>>>>>>> Also the the plugin_web2admin->plugin_admin is OK, especially if it 
>>>>>>> will become official :)
>>>>>>>
>>>>>>> To others: please give feedback on this.
>>>>>>>
>>>>>>> -rif
>>>>>>>
>>>>>>> sâmbătă, 15 septembrie 2012, 15:25:27 UTC+3, Alan Etkin a scris:
>>>>>>>>
>>>>>>>> Shouldn't this be called plugin_admin or similar (following the 
>>>>>>>> plugin_wiki fashion)?
>>>>>>>>
>>>>>>>> Does w2x_etc naming use any plugin convention?. For instance, in 
>>>>>>>> Pyodel (also a plugin) I rely in an application manager role (without 
>>>>>>>> a 
>>>>>>>> prefix). Maybe we can adopt a standard naming convention for plugin 
>>>>>>>> roles. 
>>>>>>>> Also, I think that roles with prefixes somehow polute the group space.
>>>>>>>>
>>>>>>>> El lunes, 10 de septiembre de 2012 10:49:35 UTC-3, rif escribió:
>>>>>>>>>
>>>>>>>>> I started the development of a new django-like admin interface.
>>>>>>>>>
>>>>>>>>> You can find it here: 
>>>>>>>>> https://github.com/rif/**web2admin<https://github.com/rif/web2admin>
>>>>>>>>>  
>>>>>>>>>
>>>>>>>>> It is very basic but still usable because it uses 
>>>>>>>>> SQLFORM.smartgrid.
>>>>>>>>>
>>>>>>>>> I am announcing it early because I need your feedback and feature 
>>>>>>>>> requests so that I can find out if grid will be able to support all 
>>>>>>>>> the 
>>>>>>>>> desired features.
>>>>>>>>>
>>>>>>>>> For quick start you can create a w2a_root group and add your user 
>>>>>>>>> to that group.
>>>>>>>>>
>>>>>>>>> -rif
>>>>>>>>>
>>>>>>>>  -- 
>>>>  
>>>>  
>>>>  
>>>>
>>>
>>>

-- 





[web2py] Re: Problem runing on GAE

2012-04-09 Thread rif
Please check that your python version is 2.5. If this is not the case, 
change the app.yaml to use python2.7 runtime.

-rif

luni, 9 aprilie 2012, 20:57:21 UTC+3, waglik a scris:
>
> Hi guys.
>
>
> I try playing with web2py on GAE but on a very beginning I fail with 
> running my app. when I start my app I get :
>
> Internal errorTicket issued: 
> unrecoverable<http://localhost:8080/admin/default/ticket/unrecoverable>
>
> and in the dev_appserver console I get : 
>
>
> WARNING  2012-04-09 17:51:57,679 dev_appserver_import_hook.py:546] 
> Blocking access to skipped file "/home/waglik/workspace/aaa/gluon/rocket.py"
> WARNING  2012-04-09 17:51:57,687 dev_appserver_import_hook.py:546] 
> Blocking access to skipped file 
> "/home/waglik/workspace/aaa/applications/myapp/languages/en-us.py"
> WARNING  2012-04-09 17:51:57,687 dev_appserver_import_hook.py:546] 
> Blocking access to skipped file 
> "/home/waglik/workspace/aaa/applications/myapp/compiled"
> WARNING  2012-04-09 17:51:57,688 dev_appserver_import_hook.py:546] 
> Blocking access to skipped file 
> "/home/waglik/workspace/aaa/applications/myapp/models/db.py"
>
> ERROR2012-04-09 17:51:57,798 restricted.py:155] Traceback (most recent 
> call last):
>   File "/home/waglik/workspace/aaa/gluon/main.py", line 498, in wsgibase
> serve_controller(request, response, session)
>   File "/home/waglik/workspace/aaa/gluon/main.py", line 200, in 
> serve_controller
> run_models_in(environment)
>   File "/home/waglik/workspace/aaa/gluon/compileapp.py", line 512, in 
> run_models_in
> code = getcfs(model, model, None)
>   File "/home/waglik/workspace/aaa/gluon/cfs.py", line 37, in getcfs
> t = os.stat(filename)[stat.ST_MTIME]
>   File 
> "/home/waglik/Applications/google_appengine/google/appengine/tools/dev_appserver_import_hook.py",
>  
> line 620, in __call__
> raise OSError(errno.EACCES, 'path not accessible', path)
> OSError: [Errno 13] path not accessible: 
> '/home/waglik/workspace/aaa/applications/myapp/models/db.py'
>
>
> my db.py is :
>
> from gluon.contrib.gql import GQLDB
> db = GQLDB()
> session.connect(request,response,db=db)
>
> db.define_table('book',
>Field('name'),
>Field('code', unique=True),
>Field('file', 'upload'),
>format = '%(title)s')
>
>
> What do I do wrong? Is there a documentation that covers GAE integration 
> (I just find video on vimeo and some short post on old web2py blog)
>
> thanks for help
>
>
>

Re: [web2py] Re: Cookbook recipe for nginx/uwsgi woes

2012-04-27 Thread rif
I had the same issue and I solved by adding plugin python in the uwsgi 
web2py configuration:


python 
<--HERE
127.0.0.1:9001
/home/www-data/web2py/

wsgihandler



joi, 12 aprilie 2012, 09:23:39 UTC+3, Bruce Wade a scris:
>
> I am having the exact same problem with uwsgi
>
> 2012/04/12 06:16:49 [error] 9428#0: *1 upstream prematurely closed 
> connection while reading response header from upstream, client: 
> 108.172.101.4, server: 50.18.67.206, request: "GET / HTTP/1.1", upstream: 
> "uwsgi://127.0.0.1:9001", host: "50.18.67.206"
>
> I tested and I can get to my static files using nginx without a problem so 
> I know that isn't the issue.
>
> Thinking maybe sticking with apache is a better more stable solution?
>
> On Wed, Apr 11, 2012 at 2:05 PM, Michele Comitini 
> <*
> *> wrote:
>
>> To handle static request using "alias" instead of "root" with regexp
>> should work better
>>
>>
>>  set $web2pyroot 
>>
>>
>>location ~ ^/(.*)/static/(.*) {
>> alias $web2pyroot/applications/$1/static/$2;
>>}
>>
>> mic
>>
>>
>> Il 11 aprile 2012 18:23, pbreit <* **> ha 
>> scritto:
>> > Looks like it is having trouble with a file in /static. This is how I 
>> serve
>> > /static:
>> >
>> > location /static {
>> > root /opt/web2py/applications/myapp/;
>> > }
>> >
>> > You may just need to add the appname to:
>> > root  /home/www-data/web2py/applications/
>> >
>> > Also, I don't know if you need that extra stuff on the location line.
>>
>
>
>
> -- 
> -- 
> Regards,
> Bruce Wade
> http://ca.linkedin.com/in/brucelwade
> http://www.wadecybertech.com
> http://www.fittraineronline.com - Fitness Personal Trainers Online
> http://www.warplydesigned.com
>
>  

[web2py] Re: appadmin in Romanian (for Massimo)

2012-06-03 Thread rif
Thank you very much, Ionel!

-rif

sâmbătă, 2 iunie 2012, 18:30:30 UTC+3, ionel a scris:
>
> Hello Massimo,
>
> This is the language file for appadmin in Romanian.
>
> Thank you,
>
> i.a.
>
>

[web2py] LinuxJournal web development poll

2013-01-20 Thread rif
http://m.linuxjournal.com/content/web-development-poll

Most of my prefernces were not listed...

-- 





[web2py] Re: LinuxJournal web development poll

2013-01-20 Thread rif
Corrected link http://goo.gl/gOIJP



-- 





[web2py] Re: LinuxJournal web development poll

2013-01-20 Thread rif
Thanks Ron, the main point I was trying to make is that it seems that I am 
not main stream :)

duminică, 20 ianuarie 2013, 19:42:56 UTC+2, Ron McOuat a scris:
>
> You can write in your preference under Other, a text box opens when it is 
> selected.
>
> On Sunday, 20 January 2013 01:38:31 UTC-8, rif wrote:
>>
>> http://m.linuxjournal.com/content/web-development-poll
>>
>> Most of my prefernces were not listed...
>>
>

-- 





Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread rif
Yes, AFAIK it was never tested on windows.

-rif

vineri, 8 februarie 2013, 21:38:11 UTC+2, Derek a scris:
>
> It shouldn't be the default because it doesn't work for everyone (at 
> least, it doesn't work for me)
>
>  ('42000', "[42000] [Microsoft][ODBC SQL 
> Server Driver][SQL Server]Introducing FOREIGN KEY constraint 
> 'plugin_web2admin_history_modified_by__constraint' on table 
> 'plugin_web2admin_history' may cause cycles or multiple cascade paths. 
> Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN 
> KEY constraints. (1785) (SQLExecDirectW); [42000] [Microsoft][ODBC SQL 
> Server Driver][SQL Server]Could not create constraint. See previous errors. 
> (1750)")
>
> On Friday, February 8, 2013 12:05:50 PM UTC-7, rochacbruno wrote:
>>
>> I already suggested in a ticket => 
>> https://code.google.com/p/web2py/issues/detail?id=1103
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread rif
At the time when it was announced there were not many feature suggestions. 
However if many users find it useful we will find a better place for it.

-rif

vineri, 8 februarie 2013, 20:34:00 UTC+2, Ramos a scris:
>
> Also why is this not the default admin?
>
>
>
> 2013/2/8 António Ramos >
>
>> Why isn't  this refered in   web2py.com 
>>
>>
>>
>>
>> 2013/2/8 Bruno Rocha >
>>
>>> Use this one => https://github.com/rif/web2admin
>>>
>>> -- 
>>>  
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to web2py+un...@googlegroups.com .
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>  
>>>  
>>>
>>
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] web2py admin2 is DEAD?

2013-02-08 Thread rif
I'd love to work on it again :)

vineri, 8 februarie 2013, 22:05:41 UTC+2, rif a scris:
>
> At the time when it was announced there were not many feature suggestions. 
> However if many users find it useful we will find a better place for it.
>
> -rif
>
> vineri, 8 februarie 2013, 20:34:00 UTC+2, Ramos a scris:
>>
>> Also why is this not the default admin?
>>
>>
>>
>> 2013/2/8 António Ramos 
>>
>>> Why isn't  this refered in   web2py.com 
>>>
>>>
>>>
>>>
>>> 2013/2/8 Bruno Rocha 
>>>
>>>> Use this one => https://github.com/rif/web2admin
>>>>
>>>> -- 
>>>>  
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "web2py-users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to web2py+un...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>  
>>>>  
>>>>
>>>
>>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: web2py admin2 is DEAD?

2013-02-16 Thread rif
You can use any user email as long as you put the user in one of the w2a_root 
or w2a_manager groups:


   - 
   
   If a user is in the w2a_root group then it has full rights including 
   adding permissions or changing the groups of other users.
   - 
   
   If a user is in the w2a_manager group then it has all permissions for 
   all tables except auth tables (no changing permissions for other users).
   

So you must create at least one of the groups and add a membership for a 
user to that group. You can do that via old admin or in the shell.

-rif


sâmbătă, 16 februarie 2013, 17:04:17 UTC+2, MJo a scris:
>
> How to get going with web2admin? What is the e-mail address it's asking 
> for.. I have to fill db with some details (using old admin, or current 
> default if you like) and after that I'm able to login via web2admin? What 
> are the required minimums here?
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: how to show login/logout auth in custom layout

2013-02-17 Thread rif
try this:

{{='auth' in globals() and auth.navbar(mode="dropdown") or ''}}

you can also remove the mode="dropdown" parameter.

-rif

duminică, 17 februarie 2013, 07:24:11 UTC+2, 黄祥 a scris:
>
> hi,
>
> i've create the custom layout using 
> http://www.cssportal.com/layout-generator/ and also the menu 
> http://www.cssportal.com/css3-menu-generator/ and tried to use it on 
> web2py application.
>
> views/custom_layout.html
> 
> 
> {{  
> response.files.append(URL('static','css/custom_layout.css'))
> response.files.append(URL('static','css/custom_menu.css'))
> response.files.append(URL('static','css/custom_footer.css'))
> }}
>
> {{include 'web2py_ajax.html'}}
> 
> 
> 
> 
> {{=MENU(response.menu, _id='menu-bar')}}
> *{{='auth' in globals()}}*
> 
> 
> 
> 
>
> the login link is not show up in my custom layout, like in default 
> layout.html the login is on upper right in drop down style, is there anyone 
> know how to show it?
>
> many thanks before.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: web2py appadmin bad to use,is there appadmin easy to use? linke the django admin

2013-03-13 Thread rif
try https://github.com/rif/web2admin and post back your impressions.

-rif

miercuri, 13 martie 2013, 15:33:49 UTC+2, RunSky ruan a scris:
>
> I want to use the web2py because it easy to use,
> but the appadmin is not easy to use.
> is there some beautiful appadmin like the django?
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] session in redis

2012-10-08 Thread rif
Is the code bellow the correct way to create the sessions in redis?

from gluon.contrib.memdb import MEMDB
from gluon.contrib.redis_cache import RedisCache
cache.redis = RedisCache('localhost:6379',db=None, debug=True)
session.connect(request, response, db = MEMDB(cache.redis))

If yes, there is an error:

ERROR:web2py:Traceback (most recent call last):
  File "/home/rif/Documents/webframeworks/web2py/gluon/main.py", line 614, 
in wsgibase
BaseAdapter.close_all_instances('rollback')
  File "/home/rif/Documents/webframeworks/web2py/gluon/dal.py", line 529, 
in close_all_instances
THREAD_LOCAL.db_instances.clear()
AttributeError: 'thread._local' object has no attribute 'db_instances'

-- 





[web2py] Re: session in redis

2012-10-08 Thread rif
## connect to Google BigTable (optional 'google:datastore://namespace')
db = DAL('google:datastore')
## store sessions and tickets there
session.connect(request, response, db = db)
## or store session in Memcache, Redis, etc.

The last line above misled me. so it is possible to store them in memcache 
but not in redis...

-- 





[web2py] Re: session in redis

2012-10-08 Thread rif
I find it better than memcache because the sessions would survive a 
restart. So while I can settle on using memcache but I feel like I am 
loosing something.

I really see no reason to store them on the disk or in db (except limited 
memory).

-rif

luni, 8 octombrie 2012, 18:44:09 UTC+3, Niphlod a scris:
>
> ATM, storing session in redis is a bunch of lines put together a month ago 
> by me, but it needs to be tested carefully before releasing it. 
> Moreover, it's possible that there are 3 peoples using redis with web2py 
> (me, you, bruno), so I prefer spending time on developing other things.
>
> Il giorno lunedì 8 ottobre 2012 17:29:32 UTC+2, rif ha scritto:
>>
>> ## connect to Google BigTable (optional 'google:datastore://namespace')
>> db = DAL('google:datastore')
>> ## store sessions and tickets there
>> session.connect(request, response, db = db)
>> ## or store session in Memcache, Redis, etc.
>>
>> The last line above misled me. so it is possible to store them in 
>> memcache but not in redis...
>>
>

-- 





[web2py] Re: session in redis

2012-10-08 Thread rif
Thank you and take your time. I will report any issues I find with it.

Right now after Massimo's fix I get this:

Traceback (most recent call last):
  File "/home/rif/Documents/webframeworks/web2py/gluon/main.py", line 541, 
in wsgibase
session._try_store_in_db(request, response)
  File "/home/rif/Documents/webframeworks/web2py/gluon/globals.py", line 
668, in _try_store_in_db
record_id = table.insert(**dd)
  File "/home/rif/Documents/webframeworks/web2py/gluon/contrib/memdb.py", 
line 256, in insert
id = self._create_id()
  File "/home/rif/Documents/webframeworks/web2py/gluon/contrib/memdb.py", 
line 291, in _create_id
id = self._tableobj.incr(shard_id)
AttributeError: 'RedisClient' object has no attribute 'incr'

-rif

luni, 8 octombrie 2012, 19:21:08 UTC+3, Niphlod a scris:
>
> give me some time, I need to polish it with some improvements also on the 
> redis cache side.
> The current implementation is quite dumb (but redis is fast so no-one 
> noticed problems). 
> If you're up with testing it at least I can be sure it will work on 3 
> machines (my test rig, my production env, your test rig).
>
> Il giorno lunedì 8 ottobre 2012 18:07:50 UTC+2, rif ha scritto:
>>
>> I find it better than memcache because the sessions would survive a 
>> restart. So while I can settle on using memcache but I feel like I am 
>> loosing something.
>>
>> I really see no reason to store them on the disk or in db (except limited 
>> memory).
>>
>> -rif
>>
>> luni, 8 octombrie 2012, 18:44:09 UTC+3, Niphlod a scris:
>>>
>>> ATM, storing session in redis is a bunch of lines put together a month 
>>> ago by me, but it needs to be tested carefully before releasing it. 
>>> Moreover, it's possible that there are 3 peoples using redis with web2py 
>>> (me, you, bruno), so I prefer spending time on developing other things.
>>>
>>> Il giorno lunedì 8 ottobre 2012 17:29:32 UTC+2, rif ha scritto:
>>>>
>>>> ## connect to Google BigTable (optional 'google:datastore://namespace')
>>>> db = DAL('google:datastore')
>>>> ## store sessions and tickets there
>>>> session.connect(request, response, db = db)
>>>> ## or store session in Memcache, Redis, etc.
>>>>
>>>> The last line above misled me. so it is possible to store them in 
>>>> memcache but not in redis...
>>>>
>>>

-- 





Re: [web2py] Re: [ANN] Started development on web2admin

2012-10-12 Thread rif
Thank you Ovidio. Do you mean like auth.enable_record_versioning? Can you 
give more details?

-rif

vineri, 12 octombrie 2012, 00:55:00 UTC+3, Ovidio Marinho a scris:
>
> It really is a great job and I think it definitely will be incorporated as 
> a standard interface for administration. A suggestion is to make a historic 
> recording of data.
>   
>
>
>Ovidio Marinho Falcao Neto
> Web Developer
>  ovid...@gmail.com  
>   ovidio...@itjp.net.br 
>  ITJP - itjp.net.br
>83   8826 9088 - Oi
>83   9334 0266 - Claro
>     Brasil
>   
>
>
>
> 2012/9/25 rif >
>
>> I really hope that my code meets your standards and if you find something 
>> you don't like please let me know and I'll fix it.
>>
>> The code is quite small (especially if the static folder is merged with 
>> the welcome app, I just extended the main layout).
>>
>> Any functionality requests are welcomed for the 1.1 release.
>>
>> -rif
>>
>> marți, 25 septembrie 2012, 15:22:06 UTC+3, Massimo Di Pierro a scris:
>>
>>> Let me add... appadmin was never developed to be a production tool. 
>>> Something better like web2admin is very much welcome. I will review and we 
>>> will discuss on this list whether to replace appadmin.
>>>
>>> Some of the issues to be considered are:
>>> - functionality
>>> - bloat of the welcome app
>>>
>>>
>>>
>>> On Tuesday, 25 September 2012 07:19:51 UTC-5, Massimo Di Pierro wrote:
>>>>
>>>> No but it not excluded. I did not have time to review it in detail.
>>>>
>>>> On Tuesday, 25 September 2012 05:29:18 UTC-5, Alec Taylor wrote:
>>>>>
>>>>> Just a quick question, is your goal to eventually replace appadmin 
>>>>> with this?
>>>>>
>>>>> :)
>>>>>
>>>>> On Tue, Sep 25, 2012 at 8:24 PM, rif  wrote:
>>>>>
>>>>>> Added django like filters to web2admin.
>>>>>>
>>>>>> I will stop adding new features for a while and declare the current 
>>>>>> build as beta. Please test it and report issues on 
>>>>>> github<https://github.com/rif/web2admin/issues>
>>>>>> .
>>>>>>
>>>>>> Currently the GAE is not supported due to some dal issues.
>>>>>>
>>>>>> Please test,
>>>>>> -rif
>>>>>>
>>>>>> marți, 18 septembrie 2012, 14:37:57 UTC+3, rif a scris:
>>>>>>
>>>>>>> Lots of new customization options and features. Check it out and 
>>>>>>> please report bugs.
>>>>>>>
>>>>>>> -rif
>>>>>>>
>>>>>>> duminică, 16 septembrie 2012, 13:31:55 UTC+3, rif a scris:
>>>>>>>>
>>>>>>>> Check out the new global search, feedback most welcomed.
>>>>>>>>
>>>>>>>> Features still to come:
>>>>>>>>
>>>>>>>>- Custom Links
>>>>>>>>- Custom Left join
>>>>>>>>
>>>>>>>>
>>>>>>>> -rif
>>>>>>>>
>>>>>>>> sâmbătă, 15 septembrie 2012, 15:38:14 UTC+3, rif a scris:
>>>>>>>>>
>>>>>>>>> I just thought that one might want to use the manager (without 
>>>>>>>>> prefix) role for a different propose so I was just playing safe. I 
>>>>>>>>> agree 
>>>>>>>>> about namespace pollution.
>>>>>>>>>
>>>>>>>>> We just need more opinions on this matter (Is it safe to just use 
>>>>>>>>> manager role or general read/write/etc permissions?). And if we reach 
>>>>>>>>> a 
>>>>>>>>> conclusion I am happy to change.
>>>>>>>>>
>>>>>>>>> Also the the plugin_web2admin->plugin_admin is OK, especially if 
>>>>>>>>> it will become official :)
>>>>>>>>>
>>>>>>>>> To others: please give feedback on this.
>>>>>>>>>
>>>>>>>>> -rif
>>>>>>>>>
>>>>>>>>> sâmbătă, 15 septembrie 2012, 15:25:27 UTC+3, Alan Etkin a scris:
>>>>>>>>>>
>>>>>>>>>> Shouldn't this be called plugin_admin or similar (following the 
>>>>>>>>>> plugin_wiki fashion)?
>>>>>>>>>>
>>>>>>>>>> Does w2x_etc naming use any plugin convention?. For instance, in 
>>>>>>>>>> Pyodel (also a plugin) I rely in an application manager role 
>>>>>>>>>> (without a 
>>>>>>>>>> prefix). Maybe we can adopt a standard naming convention for plugin 
>>>>>>>>>> roles. 
>>>>>>>>>> Also, I think that roles with prefixes somehow polute the group 
>>>>>>>>>> space.
>>>>>>>>>>
>>>>>>>>>> El lunes, 10 de septiembre de 2012 10:49:35 UTC-3, rif escribió:
>>>>>>>>>>>
>>>>>>>>>>> I started the development of a new django-like admin interface.
>>>>>>>>>>>
>>>>>>>>>>> You can find it here: 
>>>>>>>>>>> https://github.com/rif/**w**eb2admin<https://github.com/rif/web2admin>
>>>>>>>>>>>  
>>>>>>>>>>>
>>>>>>>>>>> It is very basic but still usable because it uses 
>>>>>>>>>>> SQLFORM.smartgrid.
>>>>>>>>>>>
>>>>>>>>>>> I am announcing it early because I need your feedback and 
>>>>>>>>>>> feature requests so that I can find out if grid will be able to 
>>>>>>>>>>> support all 
>>>>>>>>>>> the desired features.
>>>>>>>>>>>
>>>>>>>>>>> For quick start you can create a w2a_root group and add your 
>>>>>>>>>>> user to that group.
>>>>>>>>>>>
>>>>>>>>>>> -rif
>>>>>>>>>>>
>>>>>>>>>>  -- 
>>>>>>  
>>>>>>  
>>>>>>  
>>>>>>
>>>>>
>>>>>  -- 
>>  
>>  
>>  
>>
>
>

-- 





[web2py] Re: session in redis

2012-10-13 Thread rif
It is working for me and the performance is very close to session.forget()

Good work,
-rif

sâmbătă, 13 octombrie 2012, 20:05:24 UTC+3, Niphlod a scris:
>
> it's in trunk. Docs will be available shortly but just looking at the 
> docstring it should be painless.
>
> On Saturday, October 13, 2012 2:49:18 PM UTC+2, Jose C wrote:
>>
>> +1 request for full Redis session integration.  Really like Redis' 
>> features over memcache, especially the auto- `save-to-db` config option.
>>
>> Would you prefer opening a feature request ticket?
>>
>

-- 





[web2py] Re: help me test sessions in cookies

2012-10-16 Thread rif
It works fine here. I get two cookies (listed below):

How can we set a longer expiration? 

Name: session_id_w2a
Content: None
Domain: localhost
Path: /
Send for: Any kind of connection
Accessible to script: Yes
Created: Tuesday, October 16, 2012 4:51:00 PM
Expires: When the browsing session ends

Name: session_data_w2a
Content: "a1cb[...]43FA"
Domain: localhost
Path: /
Send for: Any kind of connection
Accessible to script: Yes
Created: Tuesday, October 16, 2012 4:51:00 PM
Expires: When the browsing session ends

marți, 16 octombrie 2012, 14:24:00 UTC+3, Massimo Di Pierro a scris:
>
> This is new in trunk and needs to be tested. Add this to your app:
>
> session.connect(cookie_key='mypassphrase')
>
> and sessions will be stored in cookies (like Flask does). Cookies are 
> encrypted with AES 32bites and signed with HMAC+SHA1.
>
>
>

-- 





[web2py] Re: help me test sessions in cookies

2012-10-16 Thread rif
I'd go for this if the session is small and does not contain critical 
information. So it is good to have this option.

marți, 16 octombrie 2012, 22:27:01 UTC+3, Niphlod a scris:
>
>
> On Tuesday, October 16, 2012 7:46:16 PM UTC+2, VP wrote:
>>
>>
>> I think one advantage of moving session data to the client side is 
>> scalability.  There ought to be a noticeable difference between 100 
>> processes writing to the same filesytem and these computations moved to the 
>> client side.   
>>
>>  
> yep, you "save" the filesystem for accesses, but the time taken 
> serializing/deserializing remains the same, plus there's 
> encryption/decryption and the time took to send extra bytes back and forth 
> server and client. There's no "computation" moved to the client side. 
> Anyway, it's another option you can use with web2py, and as always, to be 
> chosen with a grain of salt.
>
>

-- 





[web2py] Re: pythondiary

2012-10-17 Thread rif
I guess two out of the three cons would be eliminated by web2admin. 

Please take some time to review it and give it some visibility.

joi, 18 octombrie 2012, 00:58:24 UTC+3, Massimo Di Pierro a scris:
>
> http://www.pythondiary.com/reviews/web2pyV2.0.html
>

-- 





Re: [web2py] Re: pythondiary

2012-10-18 Thread rif
One query support coming up!

joi, 18 octombrie 2012, 14:47:11 UTC+3, rochacbruno a scris:
>
> +1 web2admin is awesome! if we include query support it will be perfect to 
> replace appadmin
>  Em 18/10/2012 03:23, "rif" > escreveu:
>
>> I guess two out of the three cons would be eliminated by web2admin. 
>>
>> Please take some time to review it and give it some visibility.
>>
>> joi, 18 octombrie 2012, 00:58:24 UTC+3, Massimo Di Pierro a scris:
>>>
>>> http://www.pythondiary.com/**reviews/web2pyV2.0.html<http://www.pythondiary.com/reviews/web2pyV2.0.html>
>>>
>>  -- 
>>  
>>  
>>  
>>
>

-- 





Re: [web2py] Re: pythondiary

2012-10-19 Thread rif


I was working for the last few hours on supporting appadmin's queries into 
web2admin and these are my conclusions:

- executing queries and displaying them in the same smartgrid table would 
complicate the code very much (smartgrid already supports smart queries and the 
possibility of using both of them generates too many conditions)
- the appadmin and web2admin target two different needs although some features 
overlap (the ability to run powerful queries might not be a good idea to expose 
to the clients)
- if dal queries are a must for the admin then maybe the appadmin should stay 
as it is and web2admin should only be an optional plugin


Either way I hope more people would find out about it.

-rif

vineri, 19 octombrie 2012, 06:39:31 UTC+3, rochacbruno a scris:
>
> To don't let this issue to get lost, I created a ticket about this: 
> http://code.google.com/p/web2py/issues/detail?id=1103 

-- 





[web2py] web2py love

2012-10-20 Thread rif
Constrained by some performance requirements I am developing a web app 
using Go , Gorilla , The 
Goods  and MongoDB .

While I enjoy the beauty of go and the lightweight feeling of minimal 
libraries I stop from time to time to re-appreciate web2py for all the help 
it provides.

All the little things like: painless crud, csrf, auth, form validation, 
many little/unknown checks that we have come to take for granted came from 
hours of work done by someone else for us.

Thank you Massimo and web2py team and receive all our love!

-- 





[web2py] Re: GAE - SQL cloud connection

2012-11-16 Thread rif
I created today a sql cloud database. And I got the same error.

I changed to path VARCHAR(255) and now it works. Anybody else having the 
same problem?

-rif

marți, 7 august 2012, 18:27:13 UTC+3, Massimo Di Pierro a scris:
>
> Why does 512 result in "Specified key was too long; max key length is 767 
> bytes". Is one counting unicode and one bytes? If setting this length to 
> 128 is the only option, I will change it but I am afraid it may be too 
> short to store .table files. Did you encounter any problem after this 
> change?
>
> On Friday, 6 January 2012 18:43:22 UTC-6, howesc wrote:
>>
>> i don't know if i'm gonna regret this later, but in dal.py i changed that 
>> field length to 128:
>>
>> self.db.executesql("CREATE TABLE IF NOT EXISTS 
>> web2py_filesystem (path VARCHAR(128), content LONGTEXT, PRIMARY KEY(path) ) 
>> ENGINE=InnoDB;")
>>
>> now it works again.
>>
>

-- 





[web2py] Re: GAE - SQL cloud connection

2012-11-16 Thread rif
Done (http://code.google.com/p/web2py/issues/detail?id=1172)

Are the migrations issues to GoogleSQL still present?

-rif

vineri, 16 noiembrie 2012, 12:57:14 UTC+2, Massimo Di Pierro a scris:
>
> Please open a ticket and we will fix this asap.
>
> On Friday, 16 November 2012 04:49:35 UTC-6, rif wrote:
>>
>> I created today a sql cloud database. And I got the same error.
>>
>> I changed to path VARCHAR(255) and now it works. Anybody else having the 
>> same problem?
>>
>> -rif
>>
>> marți, 7 august 2012, 18:27:13 UTC+3, Massimo Di Pierro a scris:
>>>
>>> Why does 512 result in "Specified key was too long; max key length is 
>>> 767 bytes". Is one counting unicode and one bytes? If setting this length 
>>> to 128 is the only option, I will change it but I am afraid it may be too 
>>> short to store .table files. Did you encounter any problem after this 
>>> change?
>>>
>>> On Friday, 6 January 2012 18:43:22 UTC-6, howesc wrote:
>>>>
>>>> i don't know if i'm gonna regret this later, but in dal.py i changed 
>>>> that field length to 128:
>>>>
>>>> self.db.executesql("CREATE TABLE IF NOT EXISTS 
>>>> web2py_filesystem (path VARCHAR(128), content LONGTEXT, PRIMARY KEY(path) 
>>>> ) 
>>>> ENGINE=InnoDB;")
>>>>
>>>> now it works again.
>>>>
>>>

-- 





Re: [web2py] GAE - SQL cloud connection

2012-11-16 Thread rif
I was referring to http://web2py.com/books/default/chapter/29/06#Gotchas

vineri, 16 noiembrie 2012, 15:04:47 UTC+2, Massimo Di Pierro a scris:
>
>
> On Nov 16, 2012, at 5:17 AM, rif wrote:
>
> Done (http://code.google.com/p/web2py/issues/detail?id=1172)
>
> Are the migrations issues to GoogleSQL still present?
>
>
> I am not aware of any issue. Can you point me to some something about this?
>
>
> -rif
>
> vineri, 16 noiembrie 2012, 12:57:14 UTC+2, Massimo Di Pierro a scris:
>>
>> Please open a ticket and we will fix this asap.
>>
>> On Friday, 16 November 2012 04:49:35 UTC-6, rif wrote:
>>>
>>> I created today a sql cloud database. And I got the same error.
>>>
>>> I changed to path VARCHAR(255) and now it works. Anybody else having 
>>> the same problem?
>>>
>>> -rif
>>>
>>> marți, 7 august 2012, 18:27:13 UTC+3, Massimo Di Pierro a scris:
>>>>
>>>> Why does 512 result in "Specified key was too long; max key length is 
>>>> 767 bytes". Is one counting unicode and one bytes? If setting this length 
>>>> to 128 is the only option, I will change it but I am afraid it may be too 
>>>> short to store .table files. Did you encounter any problem after this 
>>>> change?
>>>>
>>>> On Friday, 6 January 2012 18:43:22 UTC-6, howesc wrote:
>>>>>
>>>>> i don't know if i'm gonna regret this later, but in dal.py i changed 
>>>>> that field length to 128:
>>>>>
>>>>> self.db.executesql("CREATE TABLE IF NOT EXISTS 
>>>>> web2py_filesystem (path VARCHAR(128), content LONGTEXT, PRIMARY KEY(path) 
>>>>> ) 
>>>>> ENGINE=InnoDB;")
>>>>>
>>>>> now it works again.
>>>>>
>>>>
> -- 
>  
>  
>  
>
>
>

-- 





[web2py] user_signature question

2012-11-22 Thread rif
If you create a link with user_signature=True and a controller 
with @auth.requires_signature() and a user clicks on it while not yet 
logged in he/she will be presented with the login page and after that 
redirected to the original link but with Not authorized message.

It is only after that user reloads the page containing the link and clicks 
on it again that she/he can access the page.  

Is there a workaround to this behavior? I want to be redirected directly to 
the protected page after login.

-rif

-- 





Re: [web2py] user_signature question

2012-11-22 Thread rif
In my words: validates that the user that saw the link is the user that 
executes the intended action.

More here: 
http://web2py.com/books/default/chapter/29/04?search=requires_signature#Digitally-signed-urls

joi, 22 noiembrie 2012, 14:13:19 UTC+2, viniciusban a scris:
>
> BTW, what does @auth.requires_signature() really means? 
>
> Wouldn't it be @auth.requires_login()? 
>
>
>
> On Thu, Nov 22, 2012 at 6:19 AM, rif > 
> wrote: 
> > If you create a link with user_signature=True and a controller with 
> > @auth.requires_signature() and a user clicks on it while not yet logged 
> in 
> > he/she will be presented with the login page and after that redirected 
> to 
> > the original link but with Not authorized message. 
> > 
> > It is only after that user reloads the page containing the link and 
> clicks 
> > on it again that she/he can access the page. 
> > 
> > Is there a workaround to this behavior? I want to be redirected directly 
> to 
> > the protected page after login. 
> > 
> > -rif 
> > 
> > -- 
> > 
> > 
> > 
>

-- 





[web2py] missing anything....

2012-11-27 Thread rif
Do you have any insights on this: 
https://groups.google.com/forum/m/?fromgroups#!topic/web2py/cPvuY4mnzs0

-- 





[web2py] Re: Redis cache and session

2012-11-29 Thread rif
Yes, the support for redis depend on 
python-redis<https://github.com/andymccurdy/redis-py>package for python.

-rif

joi, 29 noiembrie 2012, 02:06:00 UTC+2, Ralo Tannahill a scris:
>
> I have tried to make some tests using redis to store cache and sessions 
> but there is no module "redis".
> I am using Version 2.2.1 (2012-10-21 16:57:04) stable, on CENTOS 6 and 
> python 2.6.
>
> In gluon.contrib I have redis_cache.py and redis_session.py (both have the 
> same "import redis"), but ther is no module named "redis"
> From python shell, typing the import statements from the online book:
> >>> from gluon.contrib.redis import RedisCache
> Traceback (most recent call last):
>   File "", line 1, in 
> ImportError: No module named redis
>
> >>> from gluon.contrib.redis_session import RedisSession
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "gluon/contrib/redis_session.py", line 5, in 
> import redis
> ImportError: No module named redis
>
> I have browsed the contents of gluon/contrib in Github and see the same 
> files.
> The support of redis depends on an external module? Should I install a 
> redis-client for python as a "redis" module?
>
> Thanks in advance, kind regards
>
>

-- 





[web2py] Re: Tips & tricks : showing / pre-viewing an image before uploading and/or resizing and/or submit :)

2012-12-03 Thread rif
Unfortunately it doesn't seem to work in internet explorer (except 10).

Hopefully it will be usable in the next few years.

-rif

luni, 3 decembrie 2012, 06:20:12 UTC+2, Don_X a scris:
>
> Hello Web2py users :
>
> I had so much trouble with  previewing an image before upload or submit, I 
> have tested so many javascripts out there and various solutions that have 
> worked mostly with PHP projects,
> I have tried so many scripts taken from all over the place, none of 
> them actually did the job the way i wanted it done in web2py .. some were 
> either too complex ... or to heavy or not adapted to python out of the box 
> !!
>
>  I have to share this with folks having the same issue !
>
> I have found a nice and simple way to preview an image  before actually 
> uploading it in the database ( before submitting a form  ... or updating a 
> form )
>
> the source that made this possible can be found here : 
> http://html5demos.com/file-api-simple
>
> pretty straight forward ! check it out !
>
> PS. take note that the "pic holder" id tag would be where you want that 
> image to be shown before submitting the form and in
>  the DOM, you will need to know exactly which input field relates to the 
> image file you want to upload
>
> and it worked very nicely !
>
> thank you
>
> Don
>

-- 





Re: [web2py] web2py 2.3.1?

2012-12-03 Thread rif
I've been using trunk for the last three weeks and I didn't notice any problems.

-rif

-- 





[web2py] Re: book: why web2py

2011-12-11 Thread rif
I can do that:. Is the following environment relevant?

- ubuntu 11.10 on a kvm virtual instance (mod_wsgi 3.3 - latest)
- web2py with the default setup from scripts/setup-web2py-ubuntu.sh
- ab -n1000 -c20 http://localhost/ and ab -n1000 -c20 http://localhost:8000/

I also have to report two public website made with web2py: 
http://avocadosoft.ro/ and http://firmoasa.appspot.com/, is this a good 
place to report them or should I do it somewhere else?


[web2py] Rocket vs mod_wsgi

2011-12-11 Thread rif
Environment

machine: libvirt kvm instance: *512Mb 1cpu* on a acer aspire 5100 laptop
os: ubuntu 11.10, mod_wsgi3.3
web2py: 1.99.3
apache config: default resulted from scripts/setup-web2py-ubuntu.sh
Rocket:  v1.2.4  python web2py.py -Na test -i 0.0.0.0

Commands:
- run from the host system
ab -n1000 -c20 http://192.168.122.187/welcome/default/index/
ab -n1000 -c20 http://192.168.122.187:8000/welcome/default/index/

Results:

ab -n1000 -c20 http://192.168.122.187/welcome/default/index
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.122.187 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:Apache/2.2.20
Server Hostname:192.168.122.187
Server Port:80

Document Path:  /welcome/default/index
Document Length:11432 bytes

Concurrency Level:  20
Time taken for tests:   60.128 seconds
Complete requests:  1000
Failed requests:0
Write errors:   0
Total transferred:  11859889 bytes
HTML transferred:   11432000 bytes
*Requests per second:16.63 [#/sec] (mean)*
Time per request:   1202.552 [ms] (mean)
Time per request:   60.128 [ms] (mean, across all concurrent requests)
Transfer rate:  192.62 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:01   1.2  0  10
Processing:   608 1195 199.3   11801923
Waiting:  608 1166 199.0   11481892
Total:610 1196 199.3   11801923

Percentage of the requests served within a certain time (ms)
  50%   1180
  66%   1276
  75%   1324
  80%   1356
  90%   1460
  95%   1557
  98%   1652
  99%   1723
 100%   1923 (longest request)



ab -n1000 -c20 http://192.168.122.187:8000/welcome/default/index
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.122.187 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:Rocket
Server Hostname:192.168.122.187
Server Port:8000

Document Path:  /welcome/default/index
Document Length:11432 bytes

Concurrency Level:  20
Time taken for tests:   56.926 seconds
Complete requests:  1000
Failed requests:0
Write errors:   0
Total transferred:  11857000 bytes
HTML transferred:   11432000 bytes
*Requests per second:17.57 [#/sec] (mean)*
Time per request:   1138.520 [ms] (mean)
Time per request:   56.926 [ms] (mean, across all concurrent requests)
Transfer rate:  203.41 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:01   1.0  0  10
Processing:   380 1129 2093.4   1001   34988
Waiting:  363 1121 2093.7991   34987
Total:383 1130 2093.5   1002   34991

Percentage of the requests served within a certain time (ms)
  50%   1002
  66%   1067
  75%   1099
  80%   1115
  90%   1224
  95%   1333
  98%   1640
  99%   1888
 100%  34991 (longest request)

Conclusion:
Requests per seckond
mod_wsgi: 16.63 [#/sec]
rocket: 17.57 [#/sec]

Rocket is about 5% faster in this environment.

Waiting for your comments!


[web2py] Re: Rocket vs mod_wsgi

2011-12-11 Thread rif
In the same environment I tested nginx configuration:

nginx: 1.0.10
uwsgi: 0.9.8.1

ab -n1000 -c20 http://192.168.122.187/welcome/default/index
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.122.187 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:nginx/1.0.10
Server Hostname:192.168.122.187
Server Port:80

Document Path:  /welcome/default/index
Document Length:11432 bytes

Concurrency Level:  20
Time taken for tests:   58.306 seconds
Complete requests:  1000
Failed requests:0
Write errors:   0
Total transferred:  11819000 bytes
HTML transferred:   11432000 bytes
*Requests per second:17.15 [#/sec] (mean)*
Time per request:   1166.116 [ms] (mean)
Time per request:   58.306 [ms] (mean, across all concurrent requests)
Transfer rate:  197.96 [Kbytes/sec] received

Connection Times (ms)
  min  mean[+/-sd] median   max
Connect:01   1.3  0  12
Processing:   218 1155 180.3   11042045
Waiting:  217 1154 180.3   11042045
Total:225 1156 180.0   11052046

Percentage of the requests served within a certain time (ms)
  50%   1105
  66%   1124
  75%   1152
  80%   1177
  90%   1247
  95%   1507
  98%   2009
  99%   2022
 100%   2046 (longest request)

Conclusion:
Just a bit slower than Rocket.

Nginx + wsgi is my current server configuration


[web2py] Re: Rocket vs mod_wsgi

2011-12-11 Thread rif
And now the weirdest thing:

Enabling two CPUs on the virtual machine gave me the following weird 
results:

nginx: 31.92 [#/sec]
apache: 10.63 [#/sec]
rocket: 10.36 [#/sec]

So 1000 request with a concurrency of 20 on 2 CPUs actually slows down 
apache and rocket. I thought that apache and rocket hit the memory limit so 
I raised the memory to 1024 but the results remained the same.

Is this even possible? I can understand that the performance could stay the 
same with 2CPUs (the servers are not using the second one) but to actually 
drop the performance is not very intuitive.

I guess the default configuration of apache and rocket should be improved 
since most of the servers have more than 1 CPU. Or maybe I just my 
environment.


[web2py] Re: Rocket vs mod_wsgi

2011-12-11 Thread rif
This comparison was intended to help writing the why web2py paragraph from 
the book (https://groups.google.com/d/topic/web2py/29jdfjejwZo/discussion )

[web2py] Re: Rocket vs mod_wsgi

2011-12-11 Thread rif
Compiled uwsgi 0.9.9.3 (the 0.9.8.1 did not now about pythonpath)
uwsgi --pythonpath /opt/web-apps/web2py --module wsgihandler --http :80 -s 
/tmp/we2py.sock >uwsgi.log 2>&1

1 CPU: 17.83 [#/sec] (better than rocket)
2 CPUs: 17.98 [#/sec]

uwsgi --pythonpath /opt/web-apps/web2py --module wsgihandler --http :80 -s 
/tmp/we2py.sock -M -p2 >uwsgi.log 2>&1

2 CPUs: 31.30 [#/sec]

I guess with the -p 2 enabled it was not as fast as nginx for static 
content.

Anyhow, is this a recommended setup? Doesn't it show the same behavior as 
gunicorn ( "Without this (nginx) buffering Gunicorn will be easily 
susceptible to denial-of-service attacks." )


[web2py] Two gae questions

2012-03-06 Thread rif
1. What is the status of mysql database for gae?
2. Is there any better solution than this (
http://www.web2pyslices.com/main/slices/take_slice/63) to write blobs to 
blobstore?

Thank you,
-rif


[web2py] Re: Two gae questions

2012-03-07 Thread rif
Thank you for your answers.

-rif

miercuri, 7 martie 2012, 06:06:32 UTC+2, howesc a scris:
>
> 1. i think they just promoted it to be generally available in the last 
> couple of weeks.
> 2. there is also the files API.  check out the google docs for writing 
> directly to a blob.  for end-user uploads that slice is still pretty 
> accurate.  i may have some minor enhancements to error checking since then, 
> but nothing has changed in the functionality that i use.
>
> cfh
>
> On Tuesday, March 6, 2012 1:19:40 AM UTC-8, rif wrote:
>>
>> 1. What is the status of mysql database for gae?
>> 2. Is there any better solution than this (
>> http://www.web2pyslices.com/main/slices/take_slice/63) to write blobs to 
>> blobstore?
>>
>> Thank you,
>> -rif
>>
>

[web2py] Re: Using Blobstore API

2012-03-07 Thread rif
I am working on the same thing but for sounds. I used the experimental file 
writing to blobstore liker this:

def blobstore_upload(form):
from google.appengine.api import files
from google.appengine.ext import blobstore
if request.env.web2py_runtime_gae and form.vars.file:
# Create the file
file_name = 
files.blobstore.create(mime_type='application/octet-stream')

# Open the file and write to it
with files.open(file_name, 'a') as f:
f.write(form.vars.file.file.read())

# Finalize the file. Do this before attempting to read it.
files.finalize(file_name)

# Get the file's blob key
form.vars.blob_key = files.blobstore.get_blob_key(file_name)
form.vars.file = None

@auth.requires_login()
def upload():
return dict(form=crud.update(db.sounds, a0, 
onvalidation=blobstore_upload, message=T('Upload complete!')))

def download_blob():
from google.appengine.ext import blobstore
sound = db.sounds(a0)
if not sound:
raise HTTP(404)
blob_info = blobstore.BlobInfo.get(sound.blob_key)
return response.stream(blob_info.open())

Now I am hitting the 10Mb limit so I need to experiment some more with 
create_upload_url.

-rif

miercuri, 7 martie 2012, 11:36:40 UTC+2, Sushant Taneja a scris:
>
> Hi,
>
> I am trying to use the Google Blobstore API for uploading images. I also 
> checked the link: http://www.web2pyslices.com/main/slices/take_slice/63 for 
> the help but couldn't understand much.
>
> In my application's (uploadPic) default controller I have the code as 
> follows:
>
> from google.appengine.ext import blobstore
>
> def index():
> """
> This provides the upload_url to the upload form
> """
> 
> upload_url=blobstore.create_upload_url(URL('uploadPic','default','pic'))
> return dict(upload_url=upload_url)
>
> def pic():
> """
> This method stores the bolb key in a table and is used for serving the 
> BLOB images
> """
> response.write(request)
>
> In the view index.html, I have a simple form
>
> 
> 
>  enctype='multipart/form-data'>
> 
> 
> 
> 
> 
>
> As per my understanding, when the upload is successful, GAE automatically 
> redirects to the URL provided in the create_upload_url function with the 
> request containing the blob_key.
>
> But when I execute the above, all I get in the page is None. The log is 
> showing the following:
>
> INFO 2012-03-07 09:30:31,188 dev_appserver.py:2865] "GET 
> /uploadPic/default/index HTTP/1.1" 200 -
> INFO 2012-03-07 09:30:37,558 dev_appserver.py:687] Internal 
> redirection to /uploadPic/default/pic
> INFO 2012-03-07 09:30:37,681 gaehandler.py:69]  Request: 
> 104.29ms/100.00ms (real time/cpu time)
> INFO 2012-03-07 09:30:37,686 recording.py:372] Saved; key: 
> __appstats__:037500, part: 20 bytes, full: 1234 bytes, overhead: 0.000 + 
> 0.004; link: http://localhost:8080/_ah/stats/details?time=1331112637576
> INFO 2012-03-07 09:30:37,695 dev_appserver_blobstore.py:447] Upload 
> handler returned 200
> INFO 2012-03-07 09:30:37,723 dev_appserver.py:2865] "POST 
> /_ah/upload/ag9kZXZ-aW1hZ2V1cGxvYWRyGwsSFV9fQmxvYlVwbG9hZFNlc3Npb25fXxggDA 
> HTTP/1.1" 200 -
>
> Can someone please help me understand it ? 
>
> Thanks,
> Sushant
>
>
>

[web2py] Older facebook clone application issue

2012-04-02 Thread rif
The facebook clone application contains some code that is not supported on 
appengine:

   tokens = form.vars.name.split()

query = reduce(lambda a,b:a&b, 
[User.first_name.contains(k)|User.last_name.contains(k) for k in tokens])
people = db(query).select(orderby=alphabetical)


Is there any recommended workarount to this kind of search on gae?

Moreover http://web2py.appspot.com/friends/default/home will issue a crash 
ticket after login. Maybe it should be checked and fixed if the application 
is still online on web2py appspot.

-rif


[web2py] Re: what other tools do you use with web2py

2011-09-11 Thread rif
I use SASS provided by compass  and it really 
makes CSS more pleasant. I never used CoffeeScript as I stay on jQuery 
syntax 95% of javascript code.

[web2py] Re: preparing for 1.99.1

2011-09-13 Thread rif
Excellent redis cache feature. If we store session in cache will it auto 
expire and be removed?

Please add at least a small description in the release note about new syntax 
features (new syntax rows[i]('tablename.fieldname'),  new query syntax 
field.contains(list,all=True or False)).

I have been working wit php (kohana) lately and as I discovered it I 
realized how advanced web2py, thank you for the super tool.

BTW, does anyone know something more advanced for php?

Radu


Re: [web2py] Re: github & hg repo

2011-11-24 Thread rif
I really tried to switch from hg to git (several times) but did not 
find sufficient reasons to stick with it.

[web2py] book: why web2py

2011-12-10 Thread rif
One of the reasons to use web2py mentioned in the book is the following:

web2py has a small footprint and is very fast. It uses the Rocket WSGI web 
server developed By Timothy Farrell. It is 30% faster than Apache with 
mod_proxy.

I don't really understand the second sentence. Should it say Apache with 
mod_wsgi? 




[web2py] Mac OSX server startup files

2011-02-02 Thread rif
I made web2py autostart on a mac osx server conforming to 
tutorial
.

Install web2py in /Applications folder.
The StartupParameters.plist must be placed in the /Library/StartupItems/ (if 
you don't have one already).
Then create a directory named web2py in the same location 
(/Library/StartupItems/) and place the web2py shell file in it.
Make web2py file executable like this: chmod 
+x /Library/StartupItems/web2py/web2py

You can use the following command now:

sudo /Library/StartupItems/web2py/web2py start
sudo /Library/StartupItems/web2py/web2py restart
sudo /Library/StartupItems/web2py/web2py stop

The autostart feature is not tested as I created them on a production server 
and I cannot restart it.

StartupParameters.plist:

Description web2py 
Provides  web2py  
Requires  Network  
OrderPreference Late  

web2py:
#!/bin/sh . /etc/rc.common StartService( ) { ConsoleMessage "Starting 
web2py" /Applications/web2py.app/Contents/MacOS/web2py -a "" -i 
0.0.0.0 -p 8000 -d /var/run/web2py.pid & } StopService( ) { ConsoleMessage 
"Stopping web2py" kill `cat /var/run/web2py.pid` } RestartService( ) { 
ConsoleMessage "Restarting web2py" StopService StartService } RunService 
"$1"


Re: [web2py] jQuery 1.5 released

2011-02-02 Thread rif
Google is still on 1.4.4 (including your link).

Re: [web2py] web2py and GoogleAppEngineLauncher

2011-02-12 Thread rif
Shoud these steps work?

- download google app engine
- download web2py
- run ./dev_appserver.py ../web2py/
- go to http://localhost:8080

Should it display the welcome app?
I am on a fedora system with python 2.7 and it doesn't (it gives me an long 
stacktrace). Is it because of python version?


[web2py] Recomanded way questions

2011-03-11 Thread rif
db.define_table('client',
Field('name'),
format='%(name)s'
)

db.define_table('project',
Field('client', db.client),
Field('name'),
format='%(name)s'
)

db.define_table('entry',
Field('client', db.client),
Field('project', db.project),
Field('name'),
format='%(name)s'
)



1. With the above models how can I make the project field in the entry table 
be optional (not required in entry form)?
2. Is there a recommended way to display only the projects for the selected 
client in the entry form?

Thank you,
rif


[web2py] Re: Recomanded way questions

2011-03-11 Thread rif
Thank you DenesL,

I did't know about IS_EMPTY_OR validator and it is what I was looking for.

The answer to my second question is only working for the first time the page 
is shown. It will not allow to change the client.
I guess the only way to have dynamic combo's is via ajax (when user selects 
a client get all projects via ajax and populate the project combo). At least 
this is the only way I could solve my second question.

Thanks again,
rif


[web2py] strange lost password behavior

2011-03-21 Thread rif
Hi guys,

Is the default lost password working for you?

In my deploy I always get an Invalid email validation warning.


Re: [web2py] strange lost password behavior

2011-03-21 Thread rif
1.94.5 the latest.




Re: [web2py] strange lost password behavior

2011-03-21 Thread rif


ok, the validation was because the email was not registered, with a valid email 
I get this:

Traceback (most recent call last):
  File "/Users/alex/web2py/gluon/restricted.py", line 188, in restricted
exec ccode in environment
  File "/Users/alex/web2py/applications/mcsa/controllers/default.py", line 160, 
in 
  File "/Users/alex/web2py/gluon/globals.py", line 124, in 
self._caller = lambda f: f()
  File "/Users/alex/web2py/applications/mcsa/controllers/default.py", line 139, 
in user
return dict(form=auth())
  File "/Users/alex/web2py/gluon/tools.py", line 1048, in __call__
return self.request_reset_password()
  File "/Users/alex/web2py/gluon/tools.py", line 2035, in request_reset_password
dict(key=reset_password_key)):
  File "/Users/alex/web2py/gluon/tools.py", line 582, in send
logger.warn('Mail.send failure:%s' % e)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py",
 line 1033, in warning
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py",
 line 1129, in _log
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py",
 line 1139, in handle
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py",
 line 1176, in callHandlers
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py",
 line 662, in handle
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py",
 line 770, in emit
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py",
 line 713, in handleError
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/traceback.py",
 line 124, in print_exception
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/traceback.py",
 line 13, in _print
IOError: [Errno 5] Input/output error

It is running on a mac server Python 2.6.1



[web2py] plugin_wiki unsolved merge

2011-04-29 Thread rif
It seems that the downloadable version of plugin_wiki is packaged with an 
unsolved merge in the models folder.

There are three files plugin_wiki.py  plugin_wiki.py.bak 
 plugin_wiki.py.orig

Also the star rating plugin is not functioning well because of this.

BTW where is the plugin_wiki repo?



[web2py] Re: The multi-tenant feature and validators ...

2011-06-23 Thread rif
I used this feature like this:

db._common_fields.append(Field('request_tenant',default=auth.user_id,writable=False,readable=False))

so every user would have it's own data.

It seeams that IS_IN_DB is not aware of the request_tenant and also if you 
mark a filed as unique it will be unique across accounts. So it will say 
some data is not unique even if I have not entered it before but someone 
else did. 


[web2py] alternate join syntax

2011-08-03 Thread rif
Hi guys,

Can anyone provide some examples of the new syntax for join introduced 
in 1.96.1?

- new alterante syntax for inner joins: db(...).select(join=...)

Thank you


[web2py] W3C Validator errors

2011-08-11 Thread rif
If we validate the welcome app with http://validator.w3.org we only have two 
errors:


   1. 
   2. *Line 12, Column 66*: Bad value X-UA-Compatible for attribute 
   http-equiv on element meta.
   
   *
   
   
✉
   3. [image: Error] *Line 48, Column 60*: Bad value copyright for attribute 
   name on element meta: Keyword copyright is not registered.
   
*
   
   
Isn't it better to wrap  the chrome frame forcing wit IE check?



Any proposals for copyright meta?


Re: [web2py] Slick new CSS framework from Twitter

2011-08-20 Thread rif
I prefer compass (sass) and blueprint :)

[web2py] status of web2py on openshift

2013-11-05 Thread rif
I try to deploy on openshift with Version 
2.7.4-stable+timestamp.2013.10.14.15.16.29 and I could not get application 
to run on the server.

What I did:

1. Created an opesnhift python 2.7 application
2. Cloned the resulted repo with git
3. Used web2py's Deploy to openshift button
4. Used resulted directory as root, left WSGI reference name to web2py and 
selected my app
5. Pushed the repo 
Checked on the server but got same opeshift message
(renamed app.py.disabled to app.py) still nothing

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


Re: [web2py] Re: web2py app like adminer

2014-01-02 Thread rif
https://github.com/rif/web2admin it's something like a django admin. Maybe 
it can help.

-rif

joi, 2 ianuarie 2014, 03:54:43 UTC+2, samuel bonill a scris:
>
> when it's ready  i'll let you know
>
>
> 2014/1/1 Massimo Di Pierro >
>
>> I look forward to see more of this!
>>
>> Massimo
>>
>>
>> On Wednesday, 1 January 2014 17:58:04 UTC-6, samuel bonill wrote:
>>>
>>> <https://lh5.googleusercontent.com/-lD32MGzGwpo/UsSqa-h92QI/AT0/lQ8votCwDsM/s1600/01-login.png><https://lh6.googleusercontent.com/-jysxEPHM-Ug/UsSq99820QI/AUQ/02p6x95FhvU/s1600/092-csv.png>
>>>
>>> Hi all,
>>>
>>> I am developing a modern admin to web2py
>>>
>>> supports permissions 
>>> supports csv files
>>> pagination
>>> resposponsive desing
>>>
>>> this week will be released under the GPL3 license
>>>
>>> a quick look :
>>>
>>>
>>>
>>>
>>>
>>> <https://lh5.googleusercontent.com/-_GFKOEuDPeE/UsSql4Zt-bI/AT8/10Tkp6v2gtg/s1600/093-eliminar.png>
>>> <https://lh3.googleusercontent.com/-3MdD6PZHYVk/UsSqTKA-WtI/ATs/-gdWczesQ8w/s1600/09-crear.png><https://lh6.googleusercontent.com/-0tbJi6Rn1Qw/UsSp6UAEUZI/ATk/MoAMop-TmTQ/s1600/05-lista.png><https://lh4.googleusercontent.com/-YXdkhyoIuBs/UsSqyghF3rI/AUI/k13r-27VDwE/s1600/08-ditar.png>
>>>
>>>  -- 
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/EYKqGYry6Eg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

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


Re: Error with virtual field (was: Re: [web2py] [ANN] Started development on web2admin)

2014-01-10 Thread rif
I am checking it right now, be back soon.

-rif

vineri, 10 ianuarie 2014, 01:28:37 UTC+2, Manuele a scris:
>
> Il 10/09/12 15:49, rif ha scritto: 
> > I started the development of a new django-like admin interface. 
> > 
> > You can find it here: https://github.com/rif/web2admin 
> > 
> > It is very basic but still usable because it uses SQLFORM.smartgrid. 
> > 
> > I am announcing it early because I need your feedback and feature 
> > requests so that I can find out if grid will be able to support all 
> > the desired features. 
> > 
> > For quick start you can create a w2a_root group and add your user to 
> > that group. 
> > 
> > -rif 
> > -- 
> >   
> >   
> >   
> Dear rif, 
> many compliments for the project! 
> I found a problem with virtual fields... but I don't know if it's 
> related to your plugin or directly to web2py. 
> I added a very simple virtual field like this one: 
>
> db.testtable.testfield = Field.Virtual(lambda row: 'foo') 
>
> and I obtain this error: 
>
> Traceback (most recent call last): 
>   File "/home/manuele/portali/web2py.git/gluon/restricted.py", line 217, 
> in restricted 
> exec ccode in environment 
>   File 
> "/home/manuele/portali/web2py.git/applications/paytorviewer/controllers/plugin_web2admin.py",
>  
>
> line 116, in  
>   File "/home/manuele/portali/web2py.git/gluon/globals.py", line 372, in 
>  
> self._caller = lambda f: f() 
>   File "/home/manuele/portali/web2py.git/gluon/tools.py", line 3239, in f 
> return action(*a, **b) 
>   File 
> "/home/manuele/portali/web2py.git/applications/paytorviewer/controllers/plugin_web2admin.py",
>  
>
> line 34, in view_table 
> showbuttontext = plugins.web2admin.showbuttontext, 
>   File "/home/manuele/portali/web2py.git/gluon/sqlhtml.py", line 2770, 
> in smartgrid 
> user_signature=user_signature, **kwargs) 
>   File "/home/manuele/portali/web2py.git/gluon/sqlhtml.py", line 2452, 
> in grid 
> value = row[str(field)] 
>   File "/home/manuele/portali/web2py.git/gluon/dal.py", line 7362, in 
> __getitem__ 
> raise ae 
> AttributeError: 'Row' object has no attribute 'unknown' 
>
> any idea? 
>
> Thank you 
>
> Manuele 
>

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


Re: Error with virtual field (was: Re: [web2py] [ANN] Started development on web2admin)

2014-01-10 Thread rif
Unfortunately it seems to be a web2py grid/smartgrid bug. I opened a ticket 
here: http://code.google.com/p/web2py/issues/detail?id=1851

Meanwhile please note that defining an old style virtual field does not 
break the smartgrid:
class MyVirtualFields(object):
def testfield(self):
return 'foo'
db.testtable.virtualfields.append(MyVirtualFields())

I'll make a few updates to web2py with this occasion :)

Thanks,
-rif

vineri, 10 ianuarie 2014, 01:28:37 UTC+2, Manuele a scris:
>
> Il 10/09/12 15:49, rif ha scritto: 
> > I started the development of a new django-like admin interface. 
> > 
> > You can find it here: https://github.com/rif/web2admin 
> > 
> > It is very basic but still usable because it uses SQLFORM.smartgrid. 
> > 
> > I am announcing it early because I need your feedback and feature 
> > requests so that I can find out if grid will be able to support all 
> > the desired features. 
> > 
> > For quick start you can create a w2a_root group and add your user to 
> > that group. 
> > 
> > -rif 
> > -- 
> >   
> >   
> >   
> Dear rif, 
> many compliments for the project! 
> I found a problem with virtual fields... but I don't know if it's 
> related to your plugin or directly to web2py. 
> I added a very simple virtual field like this one: 
>
> db.testtable.testfield = Field.Virtual(lambda row: 'foo') 
>
> and I obtain this error: 
>
> Traceback (most recent call last): 
>   File "/home/manuele/portali/web2py.git/gluon/restricted.py", line 217, 
> in restricted 
> exec ccode in environment 
>   File 
> "/home/manuele/portali/web2py.git/applications/paytorviewer/controllers/plugin_web2admin.py",
>  
>
> line 116, in  
>   File "/home/manuele/portali/web2py.git/gluon/globals.py", line 372, in 
>  
> self._caller = lambda f: f() 
>   File "/home/manuele/portali/web2py.git/gluon/tools.py", line 3239, in f 
> return action(*a, **b) 
>   File 
> "/home/manuele/portali/web2py.git/applications/paytorviewer/controllers/plugin_web2admin.py",
>  
>
> line 34, in view_table 
> showbuttontext = plugins.web2admin.showbuttontext, 
>   File "/home/manuele/portali/web2py.git/gluon/sqlhtml.py", line 2770, 
> in smartgrid 
> user_signature=user_signature, **kwargs) 
>   File "/home/manuele/portali/web2py.git/gluon/sqlhtml.py", line 2452, 
> in grid 
> value = row[str(field)] 
>   File "/home/manuele/portali/web2py.git/gluon/dal.py", line 7362, in 
> __getitem__ 
> raise ae 
> AttributeError: 'Row' object has no attribute 'unknown' 
>
> any idea? 
>
> Thank you 
>
> Manuele 
>

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


Re: Error with virtual field (was: Re: [web2py] [ANN] Started development on web2admin)

2014-01-10 Thread rif
I meant a few updates to web2admin :)

vineri, 10 ianuarie 2014, 13:46:24 UTC+2, rif a scris:
>
> Unfortunately it seems to be a web2py grid/smartgrid bug. I opened a 
> ticket here: http://code.google.com/p/web2py/issues/detail?id=1851
>
> Meanwhile please note that defining an old style virtual field does not 
> break the smartgrid:
> class MyVirtualFields(object):
> def testfield(self):
> return 'foo'
> db.testtable.virtualfields.append(MyVirtualFields())
>
> I'll make a few updates to web2py with this occasion :)
>
> Thanks,
> -rif
>
> vineri, 10 ianuarie 2014, 01:28:37 UTC+2, Manuele a scris:
>>
>> Il 10/09/12 15:49, rif ha scritto: 
>> > I started the development of a new django-like admin interface. 
>> > 
>> > You can find it here: https://github.com/rif/web2admin 
>> > 
>> > It is very basic but still usable because it uses SQLFORM.smartgrid. 
>> > 
>> > I am announcing it early because I need your feedback and feature 
>> > requests so that I can find out if grid will be able to support all 
>> > the desired features. 
>> > 
>> > For quick start you can create a w2a_root group and add your user to 
>> > that group. 
>> > 
>> > -rif 
>> > -- 
>> >   
>> >   
>> >   
>> Dear rif, 
>> many compliments for the project! 
>> I found a problem with virtual fields... but I don't know if it's 
>> related to your plugin or directly to web2py. 
>> I added a very simple virtual field like this one: 
>>
>> db.testtable.testfield = Field.Virtual(lambda row: 'foo') 
>>
>> and I obtain this error: 
>>
>> Traceback (most recent call last): 
>>   File "/home/manuele/portali/web2py.git/gluon/restricted.py", line 217, 
>> in restricted 
>> exec ccode in environment 
>>   File 
>> "/home/manuele/portali/web2py.git/applications/paytorviewer/controllers/plugin_web2admin.py",
>>  
>>
>> line 116, in  
>>   File "/home/manuele/portali/web2py.git/gluon/globals.py", line 372, in 
>>  
>> self._caller = lambda f: f() 
>>   File "/home/manuele/portali/web2py.git/gluon/tools.py", line 3239, in f 
>> return action(*a, **b) 
>>   File 
>> "/home/manuele/portali/web2py.git/applications/paytorviewer/controllers/plugin_web2admin.py",
>>  
>>
>> line 34, in view_table 
>> showbuttontext = plugins.web2admin.showbuttontext, 
>>   File "/home/manuele/portali/web2py.git/gluon/sqlhtml.py", line 2770, 
>> in smartgrid 
>> user_signature=user_signature, **kwargs) 
>>   File "/home/manuele/portali/web2py.git/gluon/sqlhtml.py", line 2452, 
>> in grid 
>> value = row[str(field)] 
>>   File "/home/manuele/portali/web2py.git/gluon/dal.py", line 7362, in 
>> __getitem__ 
>> raise ae 
>> AttributeError: 'Row' object has no attribute 'unknown' 
>>
>> any idea? 
>>
>> Thank you 
>>
>> Manuele 
>>
>

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


[web2py] Re: !! NEW ADMIN !!

2014-01-10 Thread rif
It sure looks like it, the more options the better :)

Anyhow if there are any features in A-Plus missing in web2admin please let 
me know, I'll try to keep up.

-rif

vineri, 10 ianuarie 2014, 11:26:48 UTC+2, Alan Etkin a scris:
>
> El lunes, 6 de enero de 2014 18:19:54 UTC-3, samuel bonill escribió:
>>
>> Admin Plus(A-Plus) is a web2py plugin that provides an easy-to-use 
>> interface for managing your data
>>
>
> Wait, isn't this a similar project than this another?
>
> https://groups.google.com/d/msg/web2py/9ajKQChEmHQ/lNzHUqTKaa8J
>
>

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


[web2py] Re: !! NEW ADMIN !!

2014-01-10 Thread rif
You can clone the repo

git clone https://github.com/pyner/admin_plus.git

And you will have the w2p file available in the cloned directory.

vineri, 10 ianuarie 2014, 14:13:06 UTC+2, Remco Boerma a scris:
>
> Github complains about the file being to big? Can i download it somewhere 
> else? 
>
>
> https://github.com/pyner/admin_plus/blob/master/web2py.plugin.admin_plus.w2p
>
>
>

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


[web2py] Re: Error with virtual field

2014-01-12 Thread rif
Manuele: Massimo suggested adding the virtualfield name parameter like this:

db.testtable.testfield = Field.Virtual('testfield', lambda row: 'foo')

It works this way.

In my ticket (http://code.google.com/p/web2py/issues/detail?id=1851) I have 
taken the example directly from the book so I made a pull request to add it 
in the book example as well. 

However it does not make too mutch sense as the name of the field is 
already specified in the db.testtable.testfield part.

-rif

vineri, 10 ianuarie 2014, 17:00:52 UTC+2, Manuele a scris:
>
> Il 10/01/14 12:47, rif ha scritto: 
> > I meant a few updates to web2admin :) 
> thank you very mutch rif for your interest!! 
> :) I'll use old style viertual fields for the moment 
>
> M. 
>

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


[web2py] Re: emacs and web2py

2014-02-06 Thread rif
M-x package-list-packages right now.

Thanks a lot!

marți, 4 februarie 2014, 23:22:14 UTC+2, François-Xavier Bois a scris:
>
> Hi,
> I would like to announce that web-mode.el, an emacs major mode for editing 
> web templates, is now compatible with web2py templates.
> web-mode.el is available on http://web-mode.org
> Cheers
>
> fxbois
>

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


[web2py] recovering from crash

2014-02-10 Thread rif
Hi guys,

If I lost the content of datatbases directory can I restore a web2py 
application having only the pg_dump of the application datatbase?

-rif

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


  1   2   >