[web2py] Re: admin interface

2017-01-02 Thread 'Annet' via web2py-users
Hi,

Thanks for your reply.

I went for the short circuit option:

if request.application == 'admin':
redirect('https://ldc.leonexus.nl')


What would the routes.py solution look like? I have a parametric routes.py 
which amongst others
contains the following lines of code:

routers = dict(
  BASE  = dict(
  domains = {
  'leonexus.nl' : 'init',
  'www.leonexus.nl' : 'init',
  'admin.leonexus.nl' : 'admin',
  'cms.leonexus.nl' : 'cms',
  'my.leonexus.nl' : 'my',
  }
  ),
)


Kind regards,

Annet

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


[web2py] Re: admin interface

2016-12-05 Thread Niphlod
this is far clearer. 

If you want a single web2py instance to behave like that, you NEED to use 
routes.py, enabling/disabling routes to the admin app inspecting the 
hostname it's called in.

OR, you can just short-circuit admin adding a model file (name it 
alphabetically so it gets executed before all others) preventing access 
from any hostname doesn't match the one you want.



On Monday, December 5, 2016 at 7:57:22 AM UTC+1, Annet wrote:
>
> Hi Anthony,
>
> Thanks for your reply.
>
> I apologize for not being clear enough,
>
> I have one installation of web2py and 4 applications each being referenced 
> by their own domain.
>
> dbadmin by admin.mydomain.com
> init by www.mydomain,com
> etc.
>
> I only want acces the web2py interface via admin.mydomain.com not via the 
> other domains.
> However, at the moment I can acces the web2py webinterface via:
>
> https://admin.mydomain.com.nl/admin?send=%2Fadmin%2Fdefault%2Fsite
>
> https://www..mydomain.com.nl/admin?send=%2Fadmin%2Fdefault%2Fsite
>
> https://cms.mydomain.com.nl/admin?send=%2Fadmin%2Fdefault%2Fsite
>
> I want the admin interface disabled for all domain accept 
> admin.mydomain.com
>
>
> Kind regards,
>
> Annet
>
>
> On Friday, 2 December 2016 17:25:09 UTC+1, Anthony wrote:
>>
>> On Friday, December 2, 2016 at 9:29:00 AM UTC-5, Annet wrote:
>>>
>>> Hi,
>>>
>>> Thanks for your reply. You mean an empty .py file named DISABLED
>>>
>>
>> That will completely disable the app, not prevent it from showing up in 
>> admin.
>>  
>>
>>>
>>> What does ATM stand for?
>>>
>>
>> "at the moment," probably.
>>
>> Anthony
>>
>

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


[web2py] Re: admin interface

2016-12-04 Thread 'Annet' via web2py-users
Hi Anthony,

Thanks for your reply.

I apologize for not being clear enough,

I have one installation of web2py and 4 applications each being referenced 
by their own domain.

dbadmin by admin.mydomain.com
init by www.mydomain,com
etc.

I only want acces the web2py interface via admin.mydomain.com not via the 
other domains.
However, at the moment I can acces the web2py webinterface via:

https://admin.mydomain.com.nl/admin?send=%2Fadmin%2Fdefault%2Fsite

https://www..mydomain.com.nl/admin?send=%2Fadmin%2Fdefault%2Fsite

https://cms.mydomain.com.nl/admin?send=%2Fadmin%2Fdefault%2Fsite

I want the admin interface disabled for all domain accept admin.mydomain.com


Kind regards,

Annet


On Friday, 2 December 2016 17:25:09 UTC+1, Anthony wrote:
>
> On Friday, December 2, 2016 at 9:29:00 AM UTC-5, Annet wrote:
>>
>> Hi,
>>
>> Thanks for your reply. You mean an empty .py file named DISABLED
>>
>
> That will completely disable the app, not prevent it from showing up in 
> admin.
>  
>
>>
>> What does ATM stand for?
>>
>
> "at the moment," probably.
>
> Anthony
>

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


[web2py] Re: admin interface

2016-12-02 Thread Anthony
On Friday, December 2, 2016 at 9:29:00 AM UTC-5, Annet wrote:
>
> Hi,
>
> Thanks for your reply. You mean an empty .py file named DISABLED
>

That will completely disable the app, not prevent it from showing up in 
admin.
 

>
> What does ATM stand for?
>

"at the moment," probably.

Anthony

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


[web2py] Re: admin interface

2016-12-02 Thread Anthony
On Friday, December 2, 2016 at 5:38:56 AM UTC-5, Annet wrote:
>
> I have an application with limited functionality in which I want to access
> web2py's admin interface.
>
> I have 3 application in the same web2py installation in which I want to
> disable the admin interface.
>

So, when you log into the admin app, you want to be able to see only one 
application but have the other three hidden/inaccessible? Why? Anyone who 
has access to the admin app would also be able to reveal/access the other 
apps anyway.

Anyway, one option might be MULTI_USER_MODE, as described here: 
https://groups.google.com/d/msg/web2py/yY_CEMtDMKc/AQUxjjH60PIJ. You could 
set up a user and give them ownership of only that one app -- but the main 
administrator of admin would still have access to all apps.

Anthony

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


[web2py] Re: admin interface

2016-12-02 Thread 'Annet' via web2py-users
Hi,

Thanks for your reply. You mean an empty .py file named DISABLED

What does ATM stand for?


Kind regards,

Annet

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


[web2py] Re: admin interface

2016-12-02 Thread Niphlod
you open /admin ?!

why is that an issue ? 

BTW: for disabling ATM you can just put a "DISABLED" file in the root 
folder of the app.

On Friday, December 2, 2016 at 11:38:56 AM UTC+1, Annet wrote:
>
> I have an application with limited functionality in which I want to access
> web2py's admin interface.
>
> I have 3 application in the same web2py installation in which I want to
> disable the admin interface.
>
> Is this possible and how would I do this.
>
>
> Kind regards,
>
> Annet
>

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


[web2py] Re: admin interface wrong on 2.8.2

2013-12-03 Thread shapovalovdenis
hmmm,

Had the same problem with admin (looked like no js and css), I've replaced 
^/([^/]+)/static/?(.*)

 
with 

 AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) \

in two places in my vhosts configuration section, now all I get is tickets, 
that I cannot see. Any ideas?

On Tuesday, December 3, 2013 5:39:58 AM UTC+2, Massimo Di Pierro wrote:

 In your apache config files you need to replace

 ^/([^/]+)/static/?(.*)

 with

 ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*)

 in two places.

 On Monday, 2 December 2013 21:10:10 UTC-6, lucas wrote:

 hey everyone,

 got web2py 2.8.2 working on apache and centos.  fixed under

 https://groups.google.com/forum/#!topic/web2py/DexgEESPk38

 however, i mentioned that admin interface is all messed up.  my admin 
 interface is not right though.  the cool interface for admin is missing 
 like the pull-downs and stuff.  i just get straight html text without the 
 java scripting side of it.  am i missing another js file that i should 
 copy?  it does work with the python web2py.py interface, but not with 
 apache.  so what would be the difference in that?

 thanx again, lucas



-- 
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: admin interface wrong on 2.8.2

2013-12-03 Thread shapovalovdenis
the thing is that tickets are generated only in google chrome, in FF admin 
iface works just fine. 
type 'exceptions.AttributeError' 'dict' object has no attribute 
'is_mobile'



On Tuesday, December 3, 2013 10:05:36 PM UTC+2, shapova...@gmail.com wrote:

 hmmm,

 Had the same problem with admin (looked like no js and css), I've replaced 
 ^/([^/]+)/static/?(.*)

  
 with 

  AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) \

 in two places in my vhosts configuration section, now all I get is 
 tickets, that I cannot see. Any ideas?

 On Tuesday, December 3, 2013 5:39:58 AM UTC+2, Massimo Di Pierro wrote:

 In your apache config files you need to replace

 ^/([^/]+)/static/?(.*)

 with

 ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*)

 in two places.

 On Monday, 2 December 2013 21:10:10 UTC-6, lucas wrote:

 hey everyone,

 got web2py 2.8.2 working on apache and centos.  fixed under

 https://groups.google.com/forum/#!topic/web2py/DexgEESPk38

 however, i mentioned that admin interface is all messed up.  my admin 
 interface is not right though.  the cool interface for admin is missing 
 like the pull-downs and stuff.  i just get straight html text without the 
 java scripting side of it.  am i missing another js file that i should 
 copy?  it does work with the python web2py.py interface, but not with 
 apache.  so what would be the difference in that?

 thanx again, lucas



-- 
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: admin interface wrong on 2.8.2

2013-12-02 Thread Massimo Di Pierro
In your apache config files you need to replace

^/([^/]+)/static/?(.*)

with

^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*)

in two places.

On Monday, 2 December 2013 21:10:10 UTC-6, lucas wrote:

 hey everyone,

 got web2py 2.8.2 working on apache and centos.  fixed under

 https://groups.google.com/forum/#!topic/web2py/DexgEESPk38

 however, i mentioned that admin interface is all messed up.  my admin 
 interface is not right though.  the cool interface for admin is missing 
 like the pull-downs and stuff.  i just get straight html text without the 
 java scripting side of it.  am i missing another js file that i should 
 copy?  it does work with the python web2py.py interface, but not with 
 apache.  so what would be the difference in that?

 thanx again, lucas


-- 
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: admin interface wrong on 2.8.2

2013-12-02 Thread Dave S
On Monday, December 2, 2013 7:10:10 PM UTC-8, lucas wrote:

 hey everyone,

 got web2py 2.8.2 working on apache and centos.  fixed under

 https://groups.google.com/forum/#!topic/web2py/DexgEESPk38

 however, i mentioned that admin interface is all messed up.  my admin 
 interface is not right though.  the cool interface for admin is missing 
 like the pull-downs and stuff.  


Which pull-downs -- from the navbar?  Or is it the left-column files 
stuff when you are editing a controller or view?

 

 i just get straight html text without the java scripting side of it.  am i 
 missing another js file that i should copy?  it does work with the python 
 web2py.py interface, but not with apache.  so what would be the difference 
 in that?


What version were you running the last time you saw it working?  If you 
were coming from a version older than 2.6.1, then you need to copy some .js 
from the welcome app (the supplied sample application).  If you were coming 
from a newer version and you are not using the co-packaged Rocket 
webserver, then you may need to check that the static files versioning is 
working in your setup.

(I had it simple; I'm running W2P+Rocket, and just had to clear sessions. 
 But I was at 2.7.2, and had already shuffled .js files around coming from 
2.5.1.)

/dps



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


[web2py] Re: admin interface wrong on 2.8.2

2013-12-02 Thread Dave S


On Monday, December 2, 2013 7:46:46 PM UTC-8, Dave S wrote:

 On Monday, December 2, 2013 7:10:10 PM UTC-8, lucas wrote:

 hey everyone,

 got web2py 2.8.2 working on apache and centos.  fixed under

 https://groups.google.com/forum/#!topic/web2py/DexgEESPk38

 however, i mentioned that admin interface is all messed up.  my admin 
 interface is not right though.  the cool interface for admin is missing 
 like the pull-downs and stuff.  


 Which pull-downs -- from the navbar?  Or is it the left-column files 
 stuff when you are editing a controller or view?

  

 i just get straight html text without the java scripting side of it.  am 
 i missing another js file that i should copy?  it does work with the 
 python web2py.py interface, but not with apache.  so what would be the 
 difference in that?


 What version were you running the last time you saw it working?  If you 
 were coming from a version older than 2.6.1, then you need to copy some .js 
 from the welcome app (the supplied sample application).  


I see from the other thread you came from 2.4 ... make sure you've read the 
2.6.1 release notes:

https://groups.google.com/d/msg/web2py/dUX6XAID7Ks/GSu_0LjLCBwJ

/dps

 

 If you were coming from a newer version and you are not using the 
 co-packaged Rocket webserver, then you may need to check that the static 
 files versioning is working in your setup.

 (I had it simple; I'm running W2P+Rocket, and just had to clear sessions. 
  But I was at 2.7.2, and had already shuffled .js files around coming from 
 2.5.1.)



-- 
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: admin interface + GAE

2012-11-24 Thread dlypka
Yes, not a bug but these are issues which come up when messing with the 
admin interface on GAE.
NOTE that the issues occur when running locally using the GAE SDK as well.

So I assume the correct approach is to run it once as a normal web2py app 
i.e. python web2py.py to get those special files
to write out.  Then subsequent dev_appserver.py runs should work...

On Monday, November 19, 2012 11:15:58 PM UTC-6, dlypka wrote:

 I had to work around this problem in tools.py in my web2py 1.9x code.
 Maybe this issue is still in 2.x

 @staticmethod

 def get_or_create_key(filename=None):

 request = current.request

 if not filename:

 filename = os.path.join(request.folder,'private','auth.key')

 if os.path.exists(filename):

 key = open(filename,'r').read().strip()

 else:

 key = web2py_uuid()

 *#* open(filename,'w').write(key) *# dlypka workaround - this crashes on 
 GAE, not allowing to write to a file!!*

 return key

 --

 Also a similar issue here: in In admin\controllers\default.py

 #Get crontab

 cronfolder = apath('%s/cron' % app, r=request)

 if not os.path.exists(cronfolder): os.mkdir(cronfolder)

 crontab = apath('%s/cron/crontab' % app, r=request)

 #if not os.path.exists(crontab): # dlypka patch for GAE - safe_write() 
 fails on gae

 #safe_write(crontab, '#crontab')


 On Monday, November 19, 2012 9:22:36 PM UTC-6, Massimo Di Pierro wrote:

 Please open a ticken about this. I will be able to look at it later 
 tomorrow.

 On Monday, 19 November 2012 10:57:27 UTC-6, Sebastian Cambeo wrote:

 might it be, that users.create_login_url(request.env.path_info) in 
 check_credentials needs some kind of file access?

 Anyhow this request appears to trigger the error



-- 





[web2py] Re: admin interface + GAE

2012-11-21 Thread Massimo Di Pierro
This is not a bug!

1) First of all, for new apps, do not use get_or_create_key any more. The 
new web2py had better security using salted password. You do not need a key.

2) If you must use a key (because you have a legacy app or because you want 
to use hmac) the key must be saved on a file. You should save it on the 
host (by running the app locally once) and then deploy on GAE. 

Massimo


On Tuesday, 20 November 2012 03:28:23 UTC-6, Sebastian Cambeo wrote:

 http://code.google.com/p/web2py/issues/detail?id=1177


-- 





[web2py] Re: admin interface + GAE

2012-11-21 Thread Sebastian Cambeo
I don't know if we understand us correctly. I don't use get_or_create_key 
anywhere and I am not referring to dlypka posts (I think our problems are 
not related).

However my problem remains existing: If you deploy web2py trunk/stable with 
no other changes than altering the app.yaml in order to use the admin 
interface it fails due to forbidden calls in check_credentials.

Sebastian

-- 





[web2py] Re: admin interface + GAE

2012-11-21 Thread Massimo Di Pierro
You are right. This is a different problem. Please open a ticket about it, 
if not done already and I will check later today or tomorrow.

On Wednesday, 21 November 2012 11:08:55 UTC-6, Sebastian Cambeo wrote:

 I don't know if we understand us correctly. I don't use get_or_create_key 
 anywhere and I am not referring to dlypka posts (I think our problems are 
 not related).

 However my problem remains existing: If you deploy web2py trunk/stable 
 with no other changes than altering the app.yaml in order to use the admin 
 interface it fails due to forbidden calls in check_credentials.

 Sebastian


-- 





[web2py] Re: admin interface + GAE

2012-11-20 Thread Sebastian Cambeo
http://code.google.com/p/web2py/issues/detail?id=1177

-- 





[web2py] Re: admin interface + GAE

2012-11-19 Thread Sebastian Cambeo
What comes as a surprise to me is that the admin interface is working in 
the GAE SDK emulation...

The error log:

In FILE: 
/base/data/home/apps/s~cambeoserver/1.363277968286640588/applications/admin/models/access.py

Traceback (most recent call last):
  File 
/base/data/home/apps/s~cambeoserver/1.363277968286640588/gluon/restricted.py, 
line 212, in restricted
exec ccode in environment
  File 
/base/data/home/apps/s~cambeoserver/1.363277968286640588/applications/admin/models/access.py,
 line 37, in module
if gluon.fileutils.check_credentials(request):
  File 
/base/data/home/apps/s~cambeoserver/1.363277968286640588/gluon/fileutils.py, 
line 345, in check_credentials
% users.create_login_url(request.env.path_info)
  File 
/base/python27_runtime/python27_lib/versions/1/google/appengine/api/users.py, 
line 256, in create_login_url
raise NotAllowedError
NotAllowedError

-- 





[web2py] Re: admin interface + GAE

2012-11-19 Thread Massimo Di Pierro
Strange. this is a gae error.

On Monday, 19 November 2012 03:16:46 UTC-6, Sebastian Cambeo wrote:

 What comes as a surprise to me is that the admin interface is working in 
 the GAE SDK emulation...

 The error log:

 In FILE: 
 /base/data/home/apps/s~cambeoserver/1.363277968286640588/applications/admin/models/access.py

 Traceback (most recent call last):
   File 
 /base/data/home/apps/s~cambeoserver/1.363277968286640588/gluon/restricted.py,
  line 212, in restricted
 exec ccode in environment
   File 
 /base/data/home/apps/s~cambeoserver/1.363277968286640588/applications/admin/models/access.py,
  line 37, in module
 if gluon.fileutils.check_credentials(request):
   File 
 /base/data/home/apps/s~cambeoserver/1.363277968286640588/gluon/fileutils.py,
  line 345, in check_credentials
 % users.create_login_url(request.env.path_info)
   File 
 /base/python27_runtime/python27_lib/versions/1/google/appengine/api/users.py,
  line 256, in create_login_url
 raise NotAllowedError
 NotAllowedError



-- 





[web2py] Re: admin interface + GAE

2012-11-19 Thread Sebastian Cambeo
might it be, that users.create_login_url(request.env.path_info) in 
check_credentials needs some kind of file access?

Anyhow this request appears to trigger the error

-- 





[web2py] Re: admin interface + GAE

2012-11-19 Thread dlypka
I had to work around this problem in tools.py in my web2py 1.9x code.
Maybe this issue is still in 2.x

@staticmethod

def get_or_create_key(filename=None):

request = current.request

if not filename:

filename = os.path.join(request.folder,'private','auth.key')

if os.path.exists(filename):

key = open(filename,'r').read().strip()

else:

key = web2py_uuid()

*#* open(filename,'w').write(key) *# dlypka workaround - this crashes on 
GAE, not allowing to write to a file!!*

return key

--

Also a similar issue here: in In admin\controllers\default.py

#Get crontab

cronfolder = apath('%s/cron' % app, r=request)

if not os.path.exists(cronfolder): os.mkdir(cronfolder)

crontab = apath('%s/cron/crontab' % app, r=request)

#if not os.path.exists(crontab): # dlypka patch for GAE - safe_write() 
fails on gae

#safe_write(crontab, '#crontab')


On Monday, November 19, 2012 9:22:36 PM UTC-6, Massimo Di Pierro wrote:

 Please open a ticken about this. I will be able to look at it later 
 tomorrow.

 On Monday, 19 November 2012 10:57:27 UTC-6, Sebastian Cambeo wrote:

 might it be, that users.create_login_url(request.env.path_info) in 
 check_credentials needs some kind of file access?

 Anyhow this request appears to trigger the error



-- 





[web2py] Re: admin interface + GAE

2012-11-18 Thread Massimo Di Pierro
Can you show use a traceback from the GAE logs. Admin is readonly on GAE.

On Sunday, 18 November 2012 12:53:49 UTC-6, Sebastian Cambeo wrote:

 Is it possible to use the admin interface on GAE? I get internal errors 
 although I changed the app.yaml accordingly

 Thank You!

 Sebastian


-- 





[web2py] Re: admin interface crashes

2012-10-28 Thread Massimo Di Pierro
I think this is because the ticket was created with an older web2py 
version. We should catch this error but if you delete the old tickets it 
will work fine.

On Sunday, 28 October 2012 09:00:18 UTC-5, mweissen wrote:

 I have tried to have a look at the error list from the admin interface - 
 web2py 2.2.1 crashes:

 178.191.58.60.2012-10-28.14-51-08.ac74aa7e-42de-44a7-9b7b-2d05f807c6f4
 type 'exceptions.AttributeError' 'module' object has no attribute 
 'Row_unpickler' Version  web2py™ (2, 2, 1, datetime.datetime(2012, 10, 
 21, 16, 57, 4), 'stable')  Python Python 2.7.3: /usr/bin/python  Traceback 

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

 Traceback (most recent call last):
   File /users/www-data/web2py/gluon/restricted.py, line 212, in restricted


 exec ccode in environment
   File /users/www-data/web2py/applications/admin/controllers/default.py 
 https://secure2.infosms.org/admin/default/edit/admin/controllers/default.py,
  line 1775, in module


   File /users/www-data/web2py/gluon/globals.py, line 188, in lambda


 self._caller = lambda f: f()


   File /users/www-data/web2py/applications/admin/controllers/default.py 
 https://secure2.infosms.org/admin/default/edit/admin/controllers/default.py,
  line 1401, in errors


 error = pickle.load(fullpath_file)
   File /usr/lib/python2.7/pickle.py, line 1378, in load


 return Unpickler(file).load()
   File /usr/lib/python2.7/pickle.py, line 858, in load


 dispatch[key](self)
   File /usr/lib/python2.7/pickle.py, line 1090, in load_global


 klass = self.find_class(module, name)


   File /usr/lib/python2.7/pickle.py, line 1126, in find_class


 klass = getattr(mod, name)
 AttributeError: 'module' object has no attribute 'Row_unpickler'

   Error snapshot [image: help]  

 type 'exceptions.AttributeError'('module' object has no attribute 
 'Row_unpickler') 



-- 





[web2py] Re: Admin interface slow when static dir has a lot of files

2012-05-06 Thread Larry Weinberg
Is this being addressed?  I am finding the same problem.  Other than that, 
and a couple of other suggestions for having more links to speed up the 
admin interface workflow I am loving web2py!

[web2py] Re: Admin interface slow when static dir has a lot of files

2012-05-06 Thread Massimo Di Pierro
You should not let rocket serve static files. I would use a production 
quality server luke apache or ngnix.
Anyway, it is not a good idea to have too many files in the same folder. 
Just accessing the file system becomes a bottle neck.
One way to increase efficiency is to move the static files to the 
app-ending or github and link those.

On Sunday, 6 May 2012 10:33:00 UTC-5, Larry Weinberg wrote:

 Is this being addressed?  I am finding the same problem.  Other than that, 
 and a couple of other suggestions for having more links to speed up the 
 admin interface workflow I am loving web2py!



[web2py] Re: Admin interface slow when static dir has a lot of files

2012-05-06 Thread pbreit
I'd suggest putting the images outside the web2py directory or not using 
the web interface.

[web2py] Re: Admin interface

2012-03-06 Thread Bruce Wade
If anyone is interested (note there may be a better way) I customized my ad
to have the views collapse/expand like the static ones based on folders.

Replace the code in admin-views-default-design.html between:

!-- VIEWS --

and

!-- LANGUAGES --

!-- VIEWS --

h3 id=views onclick=collapse('views_inner'); class=component
  {{=T(Views)}}
  span class=tooltip{{=helpicon()}} span{{=T(The presentations
layer, views are also known as templates)}}/span/span
/h3
div id=views_inner class=component_contents
  div class=controls comptools
{{=button(LAYOUTS_APP, T(download layouts))}}
  /div
  {{if not views:}}pstrong{{=T(There are no
views)}}/strong/p{{pass}}
  ul
{{
path=[]
for file in views:
  items=file.split('/')
  file_path=items[:-1]
  filename=items[-1]
  while path!=file_path:
  if len(file_path)=len(path) and all([v==file_path[k] for k,v in
enumerate(path)]):
  path.append(file_path[len(path)])
}}
li class=folder
a
href=javascript:collapse('views__{{=file.replace('/','__').replace('.','__')}}');
class=file{{=path[-1]}}//a
ul id=views__{{=file.replace('/','__').replace('.','__')}}
style=display: none; class=sublist{{
  else:
  path = path[:-1]
  }}
/ul/li
{{
  pass
  pass
  if filename:
  }}li
  span class=filetools controls
{{=editfile('views',file)}} {{=deletefile([app,'views',file])}}
  /span
  span class=file
  {{=peekfile('views',file)}}
  /span
  span class=extras
  {{if extend.has_key(file):}}{{=T(extends)}}
b{{=extend[file]}}/b {{pass}}
  {{if include[file]:}}{{=T(includes)}} {{pass}}{{=XML(',
'.join([B(f).xml() for f in include[file]]))}}
  /span
/li{{
  pass
  pass
}}
{{pass}}
  /ul
  div class=controls formfield{{=file_create_form('%s/views/' %
app)}}/div
/div

On Tue, Mar 6, 2012 at 3:00 PM, Bruce Wade bruce.w...@gmail.com wrote:

 Hi,

 I would like to change the views listing in design so it acts like the
 static listing. Where everything that is in a folder becomes hidden and
 only shown when you click on the folder. IE: click on CSS shows all css
 files. In views click on default shows all html files related to default.

 Any pointers on where to look in order to change this?

 --
 --
 Regards,
 Bruce Wade
 http://ca.linkedin.com/in/brucelwade
 http://www.wadecybertech.com
 http://www.warplydesigned.com
 http://www.fitnessfriendsfinder.com




-- 
-- 
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.warplydesigned.com
http://www.fitnessfriendsfinder.com


Re: [web2py] Re: Admin interface

2012-03-06 Thread Bruno Rocha
I think it should be there by default! It is very better to have subfolders.

On Tue, Mar 6, 2012 at 8:26 PM, Bruce Wade bruce.w...@gmail.com wrote:

 If anyone is interested (note there may be a better way) I customized my
 ad to have the views collapse/expand like the static ones based on folders.

 Replace the code in admin-views-default-design.html between:

 !-- VIEWS --

 and

 !-- LANGUAGES --

 !-- VIEWS --

 h3 id=views onclick=collapse('views_inner'); class=component
   {{=T(Views)}}
   span class=tooltip{{=helpicon()}} span{{=T(The presentations
 layer, views are also known as templates)}}/span/span
 /h3
 div id=views_inner class=component_contents
   div class=controls comptools
 {{=button(LAYOUTS_APP, T(download layouts))}}
   /div
   {{if not views:}}pstrong{{=T(There are no
 views)}}/strong/p{{pass}}
   ul
 {{
 path=[]
 for file in views:
   items=file.split('/')
   file_path=items[:-1]
   filename=items[-1]
   while path!=file_path:
   if len(file_path)=len(path) and all([v==file_path[k] for k,v in
 enumerate(path)]):
   path.append(file_path[len(path)])
 }}
 li class=folder
 a
 href=javascript:collapse('views__{{=file.replace('/','__').replace('.','__')}}');
 class=file{{=path[-1]}}//a
 ul id=views__{{=file.replace('/','__').replace('.','__')}}
 style=display: none; class=sublist{{
   else:
   path = path[:-1]
   }}
 /ul/li
 {{
   pass
   pass
   if filename:
   }}li
   span class=filetools controls
  {{=editfile('views',file)}} {{=deletefile([app,'views',file])}}
   /span
   span class=file
   {{=peekfile('views',file)}}
   /span
   span class=extras
   {{if extend.has_key(file):}}{{=T(extends)}}
 b{{=extend[file]}}/b {{pass}}
   {{if include[file]:}}{{=T(includes)}} {{pass}}{{=XML(',
 '.join([B(f).xml() for f in include[file]]))}}
   /span
 /li{{
   pass
   pass
 }}
 {{pass}}
   /ul
   div class=controls formfield{{=file_create_form('%s/views/' %
 app)}}/div
 /div

 On Tue, Mar 6, 2012 at 3:00 PM, Bruce Wade bruce.w...@gmail.com wrote:

 Hi,

 I would like to change the views listing in design so it acts like the
 static listing. Where everything that is in a folder becomes hidden and
 only shown when you click on the folder. IE: click on CSS shows all css
 files. In views click on default shows all html files related to default.

 Any pointers on where to look in order to change this?

 --
 --
 Regards,
 Bruce Wade
 http://ca.linkedin.com/in/brucelwade
 http://www.wadecybertech.com
 http://www.warplydesigned.com
 http://www.fitnessfriendsfinder.com




 --
 --
 Regards,
 Bruce Wade
 http://ca.linkedin.com/in/brucelwade
 http://www.wadecybertech.com
 http://www.warplydesigned.com
 http://www.fitnessfriendsfinder.com




-- 

Bruno Rocha
[http://rochacbruno.com.br]