[web2py] Re: web2py permissions

2015-06-12 Thread Lewis
eb2py, as addressed by the documentation, is COMPLETELY inadequate when a server directory is pretty much open to the world. So, this should be documented. I am afraid I am quite unqualified to contribute to such documentation. Thanks, Lewis On Wednesday, January 5, 2011 at 5:01:15 AM

[web2py] Re: using anyserver.py in production

2015-06-09 Thread Lewis
Someday, I'll try ansible. Spelling correction to the rescue. On Sunday, June 7, 2015 at 7:51:06 PM UTC-7, Lewis wrote: > > Thanks for all this. > > So, the world seems to back UWSGI as the preferrred solution. I'll get > over it. I see that you are saying tha

[web2py] Re: using anyserver.py in production

2015-06-07 Thread Lewis
Thanks for all this. So, the world seems to back UWSGI as the preferrred solution. I'll get over it. I see that you are saying that once when one does need performance tuning with multiple workers, uwsgi is both more performant and more tunable. I think having a fabric deploy script will sol

[web2py] Re: using anyserver.py in production

2015-06-04 Thread Lewis
What about gunicorn as a wsgi server to simply stand between nginx and web2py? Here is what I am going to do: 1. script (Bash) my config so that it is repeatable. This will be similar to the existing scripts supplied with web2py, but with small changes. test it in a new deployment on a clean

[web2py] Re: using anyserver.py in production

2015-06-03 Thread Lewis
Those 19 lines had been in place from before 2013 (probably 2011!), which is why I missed the change. That site is not really "production" except for the fact that it faces the public internet. Probably has no visitors except me; I just want to learn how to configure and manage something tha

[web2py] Re: using anyserver.py in production

2015-06-03 Thread Lewis
to do the https routing with ssl (as it works for uwsgi). On Wednesday, June 3, 2015 at 10:06:00 AM UTC-7, Lewis wrote: > > This worked: python anyserver.py -s cherrypy -i 0.0.0.0 -p 80 > logfile & > > I get the reverse proxy thing. Currently, I have uwsgi behind nginx > w

[web2py] Re: using anyserver.py in production

2015-06-03 Thread Lewis
This worked: python anyserver.py -s cherrypy -i 0.0.0.0 -p 80 > logfile & I get the reverse proxy thing. Currently, I have uwsgi behind nginx which works. However, uwsgi's settings are twiddly; seem to change between versions; the documentation, while extensive, is challenging; and I don't n

[web2py] using anyserver.py in production

2015-06-02 Thread Lewis
I am afraid that the documentation for anyserver.py is a bit scant for my meager skills. My site runs on linode vm. Doc says just run python anyserver.py -s cherrypy -i 127.0.0.1. So, on my server I would cd to the directory containing web2py. I assume I would replace 127.0.0.1 (which is loca

[web2py] Re: my site is broken

2015-06-02 Thread Lewis
emperor mode as the site has only a single app used for test purposes. My config matches suggestions made by Bruce Wade several years ago on this forum. (Thanks to Bruce.) On Saturday, May 30, 2015 at 12:01:48 PM UTC-7, Lewis wrote: > > For 3+ years, everything worked. Linode + nginx +

[web2py] Re: my site is broken

2015-05-30 Thread Lewis
The logs really aren't telling me anything. I don't even see entries that correspond to the times I've tried to access the site. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issu

[web2py] my site is broken

2015-05-30 Thread Lewis
For 3+ years, everything worked. Linode + nginx + uwsgi + web2py. Took weeks of effort to config because of the poor articulation between the layers and the profusion of slightly incompatible approaches to config (open source + Linux = sysadmin hell). Today, I upgraded ubuntu from 12.04 to 1

[web2py] Creating a custom authentication method: (global name 'user' is not def

2014-06-06 Thread William Lewis
Hi I am trying to create and add a custom authentication method and incorporate it into web2py. Here is my authentication method: import win32security import pywintypes def auth_local(username, password): try: token = win32security.LogonUser(Username=username,

[web2py] Re: web2py 2.8.1 is OUT

2013-11-27 Thread Lewis
Auto upgrade worked perfectly. -- 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] Re: Can't get to admin UI on Rocket, local machine

2013-11-16 Thread Lewis
> > > OK, web2py is back in business. At this point all of the problems are > with one app that I copied from my web deployment (for some reason I lost > the local version that synced properly with git when I transitioned from > windows to mac). > So, I just need to fix this one app and rebas

[web2py] Re: Can't get to admin UI on Rocket, local machine

2013-11-16 Thread Lewis
> > Further progress. The old windows solution also works on os x. When in > doubt, reboot. We have no idea why but it is the only way... > So, now the pyjokes app works. All of its data is present so we can assume simple file copy works with the sqlite db's. I also changed routes.py to p

[web2py] Re: Can't get to admin UI on Rocket, local machine

2013-11-16 Thread Lewis
I created another instance of web2py, installing from sources. I copied over my 2 applications. I updated the 3 2.7.4 files (actually a second or third time). I copied over my router.py. Now, the admin UI works in its entirety. One step forward. But, my own applications don't run (welcome does r

[web2py] Re: Can't get to admin UI on Rocket, local machine

2013-11-16 Thread Lewis
I changed the group to 'wheel' to see if that would work. It did not. That is a very dangerous group, apparently, the group equivalent of root. Since it didn't work, I'll change back to _www. I am also going to try to give full privileges to user, another bad thing to do, but it may help see

[web2py] Can't get to admin UI on Rocket, local machine

2013-11-16 Thread Lewis
ython just to be sure--I still can't around this. Could there be an issue with what user or group is associated with Safari when running against localhost? 'me' has full privileges. -www has full privileges. Is there a different group I should be using for local browsing? Tha

[web2py] Re: upgraded to 2.7.4 no admin ui

2013-11-04 Thread Lewis
-8, Lewis wrote: > > Upgraded to 2.7.4 (from 2.5.3 I think...) two different ways: > > 1) used the upgrade in place feature (yes, experimental but it has worked > several times before--thank you for that!). The apps ran but I could not > get into admin. I could do some of

[web2py] Re: upgraded to 2.7.4 no admin ui

2013-11-03 Thread Lewis
Found the reference to the 2.61 changes. I copied appadmin from welcome to my two applications, likewise web2py.js (into static/js). I copied wsgihandler.py from the handlers directory. This did not fix anything. And really didn't do anything as I started from a fresh install from sources.

[web2py] upgraded to 2.7.4 no admin ui

2013-11-03 Thread Lewis
configuring uwsgi with ini, xml, or other files) could be part of a SMALL list of parameters. Happy to provide any samples of config files if you can point me to where they are. - Lewis -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] I usually only post when something goes wrong

2013-03-11 Thread Lewis
Except this time, nothing did. Upgraded to 2.4.4 perfectly. Would have done manually, but I could tell from admin that it was fixed so I tried it. Voila. Now, plenty of time to work on my self-inflicted bugs. -- --- You received this message because you are subscribed to the Google Groups

[web2py] Re: can't install v 2.3

2013-01-17 Thread Lewis
013 8:43:12 AM UTC-8, Niphlod wrote: > > That's why now the script installs uwsgi from pip and relies on the > easier-than-a-drink-to-maintain emperor mode of uwsgi. > > Il giorno mercoledì 16 gennaio 2013 03:00:40 UTC+1, Lewis ha scritto: >> >> Back in business. &

[web2py] 2.3.2 feels faster

2013-01-15 Thread Lewis
I have no way to quantify it (except I note that db stats now appear in hundredths of milliseconds!) but the new release certainly feels faster. There is so much in between our browsers and web2py and the data so that the truth must be that web latency and database swamp what web2py itself doe

[web2py] Re: can't install v 2.3

2013-01-15 Thread Lewis
Back in business. There was detritus from previous installs interfering with new installs. So, the culprit is not uwsgi: unjustly accused. Apologies. File based config is inherently fragile. Uninstalling with apt-get --purge remove uwsgi, etc. was the only way to really start fresh. I think

[web2py] Re: can't install v 2.3

2013-01-15 Thread Lewis
I have completely replaced my config with the slice from Bruno Rocha for ubuntu 12.04 (I upgraded everything). It still won't work because import gluon.main fails. There is clearly a path problem but I am clueless. Everything is in the same place before I upgraded to web2py 2.2.3 and now it

[web2py] Re: can't install v 2.3

2013-01-15 Thread Lewis
27;s the gluon one holding all > the modules of web2py. > > Triple check and get back with your findings > > Il giorno martedì 15 gennaio 2013 13:15:37 UTC+1, Lewis ha scritto: >> >> I tried to run the auto upgrade to the latest version. Worked on >> Windows/Rock

[web2py] can't install v 2.3

2013-01-15 Thread Lewis
I tried to run the auto upgrade to the latest version. Worked on Windows/Rocket several times. Would not work on my linode vps because of various permissions problems. Not a big deal. Uploaded and unzipped the zip file in /var/web2py. Set permissions so that www-data is the group for all f

[web2py] Re: web2py book now free in PDF

2012-12-19 Thread Lewis
Nice! --

[web2py] Re: Not simple to use multiple controller files

2012-12-15 Thread Lewis
roller. Then {{=auth.navbar()}} will work. > > On Friday, 14 December 2012 18:28:51 UTC-6, Lewis wrote: >> >> It seemed a good idea to break up a large controller file into two. Now >> I have default.py and full.py. >> User() is in full.py. So, now my views are broken b

Re: [web2py] response.view being ignored

2012-12-15 Thread Lewis
I put response.view at the top of the offending action and it worked. Previously, I always put response.view = right before the return statement to make clear what view would be used with the returned dict. In this action, there was a redirect prior to the appearance of response.view= and th

[web2py] many things break with multiple controllers

2012-12-15 Thread Lewis
Spending hours debugging new errors after splitting a big controller into two files. It seems like web2py is not robust with multiple controllers in a single applications. Suddenly, Python thinks that I can't use the format method on a string. In a form to edit categories, a user can press a s

[web2py] html comments in view not being ignored in {{if ... }} block

2012-12-15 Thread Lewis
I have this in a template: {{if response.menu:}} {{='auth' in globals() and auth.navbar(action='user',separators=(' ',' | ',''))}} {{is_mobile=request.user_agent().is_mobile}} {{=MENU(response.menu, _class='mobile-menu' i

[web2py] response.view being ignored

2012-12-15 Thread Lewis
In one action, I generate the following link for the user to edit an item: A('edit', _href=URL('edit_joke', vars=dict(id=joke.joke.id, backto=self.request.controller + '/' + self.request.function,

[web2py] Re: Making minor changes to auth.navbar()

2012-12-14 Thread Lewis
I solved this. On Friday, December 14, 2012 3:37:45 PM UTC-8, Lewis wrote: > > I understand that code and put it in my controller. > > But, where do I put the reference to it in the view (the base view that is > extended): > > By default it says: {{='auth'

Re: [web2py] Not simple to use multiple controller files

2012-12-14 Thread Lewis
Solved in two different ways. 1. Must have done something dumb, but it works to put a custom auth.bar in a model, menu.py is a good one. This worked: def user_bar(): if auth.is_logged_in(): logout = A('Logout', _href = URL('full', 'user', args='logout')) profile = A('Profile

Re: [web2py] Not simple to use multiple controller files

2012-12-14 Thread Lewis
b2py works so I don't want that, but I do want a drop in replacement for auth.navbar(). On Friday, December 14, 2012 5:16:43 PM UTC-8, Lewis wrote: > > Sure, if I called it already. To do so, might make most sense to put in a > model. > > But, I was hoping that the view wo

Re: [web2py] Not simple to use multiple controller files

2012-12-14 Thread Lewis
Sure, if I called it already. To do so, might make most sense to put in a model. But, I was hoping that the view would call it. There is another path through the app with very simplified pages that uses its own auth and I expect most users to follow that path. so, only folks editing content

[web2py] Not simple to use multiple controller files

2012-12-14 Thread Lewis
It seemed a good idea to break up a large controller file into two. Now I have default.py and full.py. User() is in full.py. So, now my views are broken because auth won't work to create the auth links in the navbar. The default views reference auth as: {{='auth' in globals() and auth.navbar

[web2py] Re: Making minor changes to auth.navbar()

2012-12-14 Thread Lewis
I understand that code and put it in my controller. But, where do I put the reference to it in the view (the base view that is extended): By default it says: {{='auth' in globals() and auth.navbar(separators=(' ',' | ',''))}} I assume that user.bar must replace auth.navbar(...). But, I don't

[web2py] Re: which is preferred?

2012-12-08 Thread Lewis
Ah, there is a functional difference but when I reference the anticipated content of the rows object I would raise an exception anyway. I check rows before using it. I guess #1 is a bit clearer. Thank you. On Saturday, December 8, 2012 12:20:36 PM UTC-8, Lewis wrote: > > Which syn

[web2py] Re: web3py?

2012-12-08 Thread Lewis
That sounds great! Keep all that is great about Web2py--especially templates and helpers!--and silence the blathering, unhelpful critics. On Tuesday, November 27, 2012 8:28:31 AM UTC-8, Massimo Di Pierro wrote: > > Hello user, > > The purpose of that thread is to discuss where web2py should got

[web2py] Re: is this a reasonable way to do this?

2012-12-08 Thread Lewis
Actually, I already had the check to prevent deletion of "not sure"... On Saturday, December 8, 2012 12:29:48 PM UTC-8, Lewis wrote: > > In my app, when users enter an item they may choose one or more categories > for the item by checking one or more checkboxes. When t

[web2py] is this a reasonable way to do this?

2012-12-08 Thread Lewis
In my app, when users enter an item they may choose one or more categories for the item by checking one or more checkboxes. When the form processes I cycle through the value of the checkboxes. If none have been checked, I want to put a default category for the item in the database named "not

[web2py] which is preferred?

2012-12-08 Thread Lewis
Which syntax is preferred, and if so, why? syntax 1: rows[0]['auth_user.first_name'] syntax 2: rows.first().auth_user.first_name 1 seems closer to common Python syntax and is likely more interpretable to any Python programmer. 2 seems a bit more readable but relies on knowing the DAL methods

[web2py] Re: DAL list:integer and postgresql integer array type

2012-06-04 Thread Lewis
Done. Thanks.

[web2py] DAL list:integer and postgresql integer array type

2012-06-01 Thread Lewis
ites, which will simply be the numeric key of the favorite item. A favorites table would have three fields: id (as key), user (refer to auth.user.id), favorites (a list or array of integers). Thanks for any suggestions/comments. - Lewis

Re: [web2py] Re: nginx uwsgi error 502 bad gate way

2012-05-19 Thread Lewis
Thanks to Bruce Wade who suggested going all command line. In an init file with an args variable it is no problem to have a very long list of args. Roberto: I used pip to install v 1.2.3. Would it have included xml support by default? I had previously downloaded the package for xml but pe

Re: [web2py] Re: nginx uwsgi error 502 bad gate way

2012-05-18 Thread Lewis
;t reproduce it ever working at all. So, I have wasted 20 hours attempting to debug config files that are inherently unusable. On Friday, May 18, 2012 12:18:39 PM UTC-7, Lewis wrote: > > Success! --but it's not clear why!?! > > I ran uwsgi with the following commmand line (note

Re: [web2py] Re: nginx uwsgi error 502 bad gate way

2012-05-18 Thread Lewis
Success! --but it's not clear why!?! I ran uwsgi with the following commmand line (note that I switched to unix sock in my location directive in nginx to match...): uwsgi -s /tmp/web2py.sock --module wsgihandler --pythonpath /var/web2py --daemonize /var/log/uwsgi.log This means that there is

Re: [web2py] Re: nginx uwsgi error 502 bad gate way

2012-05-18 Thread Lewis
127.0.0.1:9001; > include uwsgi_params; > uwsgi_param UWSGI_SCHEME $scheme; > } > } > > Hopefully this helps a bit more. > > -- > Regards, > Bruce > > On Fri, May 18, 2012 at 4:37 AM, Roberto De Ioris wrote: > >>

[web2py] Re: about uwsgi, nginx and such

2012-05-18 Thread Lewis
Guys, let me say thanks first. Everything I have was working fine under apache2 and mod_wsgi. I even had parallel access to php and static files. I wanted to switch to nginx to make ssl config easier. could there be any holdover somewhere from the apache/mod_wsgi config? Because everything o

[web2py] Re: nginx uwsgi error 502 bad gate way

2012-05-18 Thread Lewis
Ran that command line. Doesn't work. Instead of command line arg for processes, I put it in xml. does it matter? On Wednesday, May 16, 2012 4:06:12 PM UTC-7, Lewis wrote: > > Guys, I have followed the cookbook, the posts here, and a posting at > stackoverflow. > > I am g

Re: [web2py] nginx uwsgi error 502 bad gate way

2012-05-18 Thread Lewis
uwsgi-conf.xml. This seems to be what you are recommending. It is in place via the init script. On Friday, May 18, 2012 3:29:15 AM UTC-7, Roberto De Ioris wrote: > > > Il giorno 18/mag/2012, alle ore 12:05, Lewis ha scritto: > > > > > > > > > That'

Re: [web2py] nginx uwsgi error 502 bad gate way

2012-05-18 Thread Lewis
Saw the slice from Bruce. I was already there. I have spent some 14 hours on this. I have read the docs on many of the uwsgi options. I have looked more carefully at the nginx docs. I now get some diagnostics that tell me much more about what is going on. Along the way I have learned to ha

[web2py] nginx uwsgi error 502 bad gate way

2012-05-16 Thread Lewis
Guys, I have followed the cookbook, the posts here, and a posting at stackoverflow. I am getting error 502 bad gateway. My stuff looks like everyone else's but there are deeper layers of indirection in uwsgi itself and nginx. I have several uwsgi sym links in /etc/init.dIt is not clear wh

[web2py] Re: web2py uWSGI cherokee -- I give up

2012-05-16 Thread Lewis
Thanks. I am going with nginx. Already had apache up and running for many months. The slices are way out of date (and the site has bad visuals, is hard to navigate and search despite being a volunteer effort by a community member). The cookbook is better but contains obvious errors (symbolic l

[web2py] Re: https for login

2012-05-16 Thread Lewis
Well, thats easy! Does anyone do it with RedirectMatch? Should I really switch to nginx? Thanks, (I hate config.)

[web2py] https for login

2012-05-16 Thread Lewis
> [Wed May 16 08:12:58 2012] [warn] mod_wsgi: Runtime using Python/2.7.2+. > [Wed May 16 08:12:58 2012] [notice] Apache/2.2.20 (Ubuntu) > PHP/5.3.6-13ubuntu3.3 with Suhosin-Patch mod_ssl/2.2.20 OpenSSL/1.0.0e > mod_wsgi/3.3 Python/2.7.2+ configured -- resuming normal operations > [Wed M

[web2py] Re: web2py uWSGI cherokee -- I give up

2012-05-15 Thread Lewis
Thanks. The versions I got were in the apt-get repositories for that version of Ubuntu. I hadn't realized Cherokee had been abandoned. I am not in love with anything. I can go back to Apache. It is certainly well-documented and well-supported. Is Nginx the cat's meow? My site is not at al

[web2py] web2py uWSGI cherokee -- I give up

2012-05-15 Thread Lewis
I thought Apache was hard. Cherokee seems impossible to configure. A web ui doesn't help much if it doesn't work. I have tried to follow the application cookbook carefully. I have failed in some fundamental way. I have to say that of the dozens of webpages I have looked, there are many inc

[web2py] How to avoid 30 signature calcs

2012-04-19 Thread Lewis
I have a form built as a table that displays many rows to allow users to edit or delete the row. Originally, I used the classic hidden input plus a submit button to pass the id of the row to the edit code via post_vars. Now, the form is becoming more complicated to enable some other functional

[web2py] Re: Row objects always throw me

2012-04-16 Thread Lewis
Solved! Thanks again for your help. yes, I had the db's defined in the model. But, they *weren't* quite identical. AND, I wanted to get the id from the "old" table because I will be using it later after I've munged the rest of the record--to update the original record in the original table.

[web2py] Re: Row objects always throw me

2012-04-16 Thread Lewis
ot; is not yet defined in this session So, having spent over 5 hours on this, I'm stuck. These truly are rare problems but really counter-productive when something just seems broken somewhere in the stack. No forward progress; no apparent solutions. On Monday, April 16, 2012 7:21:49 PM UTC-7

[web2py] Re: Row objects always throw me

2012-04-16 Thread Lewis
to recover from this? On Monday, April 16, 2012 5:58:00 PM UTC-7, Lewis wrote: > > Thanks. Certainly the documentation. I'll give some thought to whether > there is some other behavior. > > Now I have a deeper problem: > > currval of sequence "pending_id_seq&q

[web2py] Re: Row objects always throw me

2012-04-16 Thread Lewis
Thanks. Certainly the documentation. I'll give some thought to whether there is some other behavior. Now I have a deeper problem: currval of sequence "pending_id_seq" is not yet defined in this session This refers to the id field. I'll change the model and go out to pgadmin and manually

[web2py] Row objects always throw me

2012-04-16 Thread Lewis
I think I am trying to do something very simple, but I don't understand row objects (why can't they be a normal Python type instead of a web2py class?). I have gotten this error no matter what I try: insert() takes exactly 1 argument (2 given) All I want to do is retrieve a row from one table

[web2py] Re: stuck on trivial problem

2012-03-26 Thread Lewis
Sure enough. So, I am thinking "out loud" here--what would be the advantage of a function (or class) in the controller over a class in a module? 1. Would I be able to get rid of the class and all of its attributes because every variable in the single controller file is visible to all functions?

[web2py] Re: stuck on trivial problem

2012-03-26 Thread Lewis
Fair enough point about modules but... I have 3 controllers that pretty much displayed the same data. The differences are in initial filter status, whether edit controls are displayed, and privileges for different user groups. As I worked, I was making the same changes 3 times to the shared code

[web2py] Re: 1.99.6 can't save, communications error

2012-03-04 Thread Lewis
user in sudousers, are the rest of the permissions appropriate? Thanks! On Mar 4, 10:42 am, Marin Pranjić wrote: > Did you check permissions? > > > > > > > > On Sun, Mar 4, 2012 at 7:37 PM, Lewis wrote: > > Anyone else?  Tried 3 different browsers and two

[web2py] 1.99.6 can't save, communications error

2012-03-04 Thread Lewis
Anyone else? Tried 3 different browsers and two machines. Tried restarting apache and web2py. Still can't save. Not fatal, but it is nice to use the web editor for little changes. Thanks. BTW: I am posting less not because I am working less, but because I understand web2py better and everyth

[web2py] Re: stuck on trivial problem

2012-02-21 Thread Lewis
Feb 21, 9:40 pm, Lewis wrote: > This is the classic noob problem.  Defining a class and getting > arguments mis-match when first instantiating an instance of the > class.  But, I can't see where the problem is. > > Traceback (most recent call last): >   File "/va

[web2py] stuck on trivial problem

2012-02-21 Thread Lewis
This is the classic noob problem. Defining a class and getting arguments mis-match when first instantiating an instance of the class. But, I can't see where the problem is. Traceback (most recent call last): File "/var/web2py/gluon/restricted.py", line 204, in restricted exec ccode in envi

[web2py] Re: Dedicated IDE

2012-02-13 Thread Lewis
Happily using Komodo Edit 6. If web2py is in the pythonpath, you get autocomplete for it as well as the rest of python. I find it handier than using any of the dedicated python ide's because you also must work on html views and css files. It has autocomplete, syntax checking, and brace matching

[web2py] Can this be improved?

2012-02-12 Thread Lewis
In the controller below, I display a list of jokes for visitors to the site. They can choose to sort by author or category. They can also filter the list to a single category and/or a single author. The view includes a form with select/option drop downs for each choice. Then, I'll change the qu

[web2py] Re: maybe minor bug or just documentation

2012-02-11 Thread Lewis
Thanks. I'll try those. Is there any general guidance on when an "argument" that is set with an assignment statement can be a list? ('always' would be an interesting answer...) On Feb 10, 11:24 am, Lewis wrote: > The model follows. Focus on the category.name fie

[web2py] Re: routes.py doesn't work

2012-02-11 Thread Lewis
athan Lundell wrote: > On Feb 11, 2012, at 12:47 PM, Lewis wrote: > > > This doesn't work either: > > > routers = dict( > >    BASE = dict( > >        default_application = 'try', > >    ), > > ) > > > I placed the above

[web2py] Re: routes.py doesn't work

2012-02-11 Thread Lewis
sagreeable. Lots of time wasted on minor syntax discrepancies that could just be made clearer by ALWAYS On Feb 11, 12:47 pm, Lewis wrote: > This doesn't work either: > > routers = dict( >     BASE = dict( >         default_application = 'try', >     ), > ) >

[web2py] Re: routes.py doesn't work

2012-02-11 Thread Lewis
eb2py? On Feb 11, 12:34 pm, Lewis wrote: > I have followed what both the book and sample files say can be done in > routes.py: > > default_application = 'try' > default_controller = 'default' > default_function = 'index' > > This simply doesn

[web2py] routes.py doesn't work

2012-02-11 Thread Lewis
I have followed what both the book and sample files say can be done in routes.py: default_application = 'try' default_controller = 'default' default_function = 'index' This simply doesn't work. Entering www.mydomain.com as the target url in the browser routes to the welcome app not www.mydomain

[web2py] Re: maybe minor bug or just documentation

2012-02-10 Thread Lewis
IS_NOT_IN_DB instead of unique=True? Which is preferred so that postgresql enforces the constraints? Thanks, Lewis jodb.define_table('joke', Field('joketext', 'text',length=2048, requires = IS_NOT_EMPTY()), Field('created_on', 'datetime', default=re

[web2py] Re: markdown

2012-02-09 Thread Lewis
ext. Curious why this is so but got what I wanted: just use Python. On Feb 9, 10:22 am, Lewis wrote: > Markdown display using the imported WIKI function shifts text down by > about 1/2em (one half of a line).  This is very annoying in a table > which no longer lines up vertically.  T

[web2py] Re: maybe minor bug or just documentation

2012-02-09 Thread Lewis
Then why did web2py fail with a run time error? Or why wasn't the run time error trapped? Maybe because I had requires on the same table for a different constraint? It doesn't look good when visitors to your site see the web2py error ticket page. Adding the explicit constraint prevented that.

[web2py] markdown

2012-02-09 Thread Lewis
Markdown display using the imported WIKI function shifts text down by about 1/2em (one half of a line). This is very annoying in a table which no longer lines up vertically. The markdown rendered text column shows up below the other columns across a row. This just looks bad. Is there any reason

[web2py] maybe minor bug or just documentation

2012-02-08 Thread Lewis
I set a field in a table definition to "unique = True". I then tested this and deliberately entered a duplicate value. The result was an error ticket: 76.22.75.122.2012-02-08.23-48-55.c324e160-1b8e-4db0-9345-5422e59467c2 duplicate key value violates unique constraint "category_name_key" DETAIL

[web2py] Re: Just lost all my data

2012-02-08 Thread Lewis
Anthony > > > > > > > > On Wednesday, February 8, 2012 1:03:25 AM UTC-5, Lewis wrote: > > > Correction:  only the auth tables were dropped and recreated and the > > one table that had a foreign key to auth.  So, it is linked to the > > change to auth.  It

[web2py] Re: 2 Questions regarding auth

2012-02-08 Thread Lewis
OK, thanks. Tricky. My exposure to classes didn't get as far as the __call__ method. That explains how it works. On Feb 8, 7:17 am, Anthony wrote: > > Where would I add these? > > Add the links wherever you want them in your user interface. > > > I am really mystified how the auth() class call

[web2py] Re: 2 Questions regarding auth

2012-02-07 Thread Lewis
request.args[0]. These kinds of syntax inconsistencies are sort of bad. (Another example occurs with the rows object but that is off-topic. For now I just want to get this auth stuff working.) On Jan 31, 10:16 pm, Anthony wrote: > On Wednesday, February 1, 2012 12:23:54 AM UTC-5, Lewis wrote: > &g

[web2py] Re: Just lost all my data

2012-02-07 Thread Lewis
what I thought would happen) the auth tables had to be rebuilt from scratch. I still have somewhat cold tingles... On Feb 7, 9:59 pm, Lewis wrote: > I switched auth to using the proper key: > > originally:  auth = Auth(jodb) > > changed to:  auth = Auth(jodb, hmac_key=Auth.ge

[web2py] Just lost all my data

2012-02-07 Thread Lewis
I switched auth to using the proper key: originally: auth = Auth(jodb) changed to: auth = Auth(jodb, hmac_key=Auth.get_or_create_key()) The original worked fine. But, it seemed that using the hmac_key was preferred. So I changed it. Now, all the data in all tables is gone. The auth tables

[web2py] Re: 2 Questions regarding auth

2012-01-31 Thread Lewis
Thanks. So, would I expand the default form to include buttons to access the other methods? Not sure how to expose those... Guess I am ok on hashing but should probably look at using the key.

[web2py] 2 Questions regarding auth

2012-01-31 Thread Lewis
is used when I have specified (mis-specified, as the case may be) auth as I have? Thanks. Trying to use the manual and source code reference as much as possible but sometimes asking is easier. - Lewis