[web2py:20978] Login to Admin App

2009-05-02 Thread blackthorne
Hi I have an app that works fine, has authentication and multiple users. I wanted to be able to have an user in the same application that could log in directly to the admin application with the database administration, the web IDE and all that nice stuff you know. My intention is not to require

[web2py:20979] Re: Login to Admin App

2009-05-02 Thread Fran
On May 2, 10:06 am, blackthorne wrote: > I wanted to be able to have an user in the same application that could > log in directly to the admin application with the database > administration, the web IDE and all that nice stuff you know. My > intention is not to require a SSH tunnel for this. > Ju

[web2py:20980] Re: repositories for web2py trunk

2009-05-02 Thread Douglas Soares de Andrade
Em Sexta-feira 01 Maio 2009, às 23:36:45, Yarko Tymciurak escreveu: > On Fri, May 1, 2009 at 6:11 PM, Douglas Soares de Andrade < > > dsandr...@gmail.com> wrote: > > Em Sexta-feira 01 Maio 2009, às 19:32:37, Wes James escreveu: > > > There is a person on #web2py that can't do: > > > > > > svn co h

[web2py:20981] Re: how to get help on web2py

2009-05-02 Thread DenesL
+1 On May 1, 5:56 pm, rev wrote: > Is it really worth to reinvent the wheel? > Why write a wiki from scratch when there are so many wiki's readily > available out there (several open source apps, or free Confluence as > you're an open source project)? > True, it's a nice showcase for web2py, but

[web2py:20982] Rows disappearing after update

2009-05-02 Thread Brian
Hello everyone, I'm developing a simple database app locally with SQLite. Everything works great. When I push to the server, it's using Postgres and when I do this: ... def update(): recordId = request.vars.id updatedField = request.vars.updatedField updatedData = request.

[web2py:20983] And I am confused again... Again...

2009-05-02 Thread Jason Brower
I suppose your used to it by now. :D This works... except for the validators... they aren't stoping me from entering more than one student_name from datetime import datetime, date, time now = datetime.utcnow() today = date.today() db = SQLDB('sqlite://database.db') db.define_table('student',

[web2py:20984] Re: And I am confused again... Again...

2009-05-02 Thread DenesL
You are redefining the requires for student_name: On May 2, 10:21 am, Jason Brower wrote: > db.student.student_name.requires = IS_NOT_IN_DB(db, > "student.student_name") ... > db.student.student_name.requires = IS_NOT_EMPTY() --~--~-~--~~~---~--~~ You received th

[web2py:20985] Re: Rows disappearing after update

2009-05-02 Thread DenesL
Any create, drop, insert, truncate, delete, or update operation has to be commited: db.commit() On May 2, 8:23 am, Brian wrote: > Hello everyone, > I'm developing a simple database app locally with SQLite. Everything > works great. When I push to the server, it's using Postgres and when I > do

[web2py:20986] Re: Rows disappearing after update

2009-05-02 Thread DenesL
Oops, more answers follow: On May 2, 8:23 am, Brian wrote: > 2) What's the difference between an update and an update_record? update works on a set of records: db(db.person.id>3).update(name='Ken') update_record is for a single record: rows=db(db.person.id>2).select() row=rows[0]

[web2py:20987] Re: Lightbox / Requests?

2009-05-02 Thread Michael
Jason, Interesting position coming from the mobile end. This poses an interesting idea - I assume with browser detection we can work around this, to goto an actual form page? While I have your attention - How does Ajax perform - if at all, on mobile browsers? On May 1, 2:45 pm, Jason Br

[web2py:20988] Re: Lightbox / Requests?

2009-05-02 Thread Jason Brower
They can, but I live in Finland and all our phones are better then your phones. :P Depends A LOT on the phone. To bring up different pages depending on the phone we use pywurfl a very nice too that has a large database of phones and what they can support. (You can even add your own phone support

[web2py:20989] Re: And I am confused again... Again...

2009-05-02 Thread Jason Brower
And that dunce light points at Encompass. Thanks! Jason On Sat, 2009-05-02 at 09:13 -0700, DenesL wrote: > You are redefining the requires for student_name: > > On May 2, 10:21 am, Jason Brower wrote: > > db.student.student_name.requires = IS_NOT_IN_DB(db, > > "student.student_name") > ... > >

[web2py:20990] Re: how to get help on web2py

2009-05-02 Thread dlypka
Hopefully enough developers will join the effort to keep up with the scatter. I think the wiki is a crucial showcase and worth the effort in that it is beneficial to have complete control over such a tool so that it can be differentiated from the rest of the market. For example, the way it handle

[web2py:20991] Validation in Custom Form using crud

2009-05-02 Thread Gary
The following MVC is used to create/update/read a single table. The validation for not empty works with the {{=form}} but not the custom HTML. Both versions are displayed in the same form and the data is changed and validated via either submit button, but the error message is only displayed in t

[web2py:20992] Re: Login to Admin App

2009-05-02 Thread Francisco Gama
are you sure it's that? I tried but got a very weird behavior. Instead, I started having too authenticate to access everything and I had a lot of Errors with GQLDB. Could you recheck If that is supposed to do what I want? Thank you On 2 Maio, 10:24, Fran wrote: > On May 2, 10:06 am, blackthorn

[web2py:20993] Re: Rows disappearing after update

2009-05-02 Thread Brian
Thanks for the response. I added a commit() after my update_record but I'm still having the same issue. Using the DB admin, I edited a record on there and the same thing happens: modify a record and it doesn't show up on a "db.part.id>0" in the admin interface. I can view and modify it if I go t

[web2py:20994] Re: Rows disappearing after update

2009-05-02 Thread Brian
I can switch to SQLite and it works perfect with or without the db.commit(). On May 2, 1:06 pm, Brian wrote: > Thanks for the response. > > I added a commit() after my update_record but I'm still having the > same issue. > > Using the DB admin, I edited a record on there and the same thing > hap

[web2py:20995] Re: how to get help on web2py

2009-05-02 Thread Joe Barnhart
The wiki does not seem to have any momentum of its own. If we want to continue relying on three or four people (or one ;-) to create all of the documentation for web2py, no action is needed. If, on the other hand, we want to harness more work from advanced and occasional users of web2py, this ne

[web2py:20996] Re: BUG:

2009-05-02 Thread Oscar
I just found another issue with SVN version, When I try to import a packaged app, then I restore it in my new instalation, the view layer is broken. Any page can't be displayed, (no errors, just a white page), I did the app again from scratch for get the views working again. Regards, Oscar. O

[web2py:20997] Re: how to get help on web2py

2009-05-02 Thread waTR
All you have to do is put together a wiki like web book. The wiki web2py currently set-up is close, just needs some small modifications. Once you have the wiki set-up for a book style knowledge repository, you can create a table of contents (PAGES list), and slowly fill-in those pages over time. I

[web2py:20999] Re: Validation in Custom Form using crud

2009-05-02 Thread dlypka
Look like there are some typos: typo #1 (perhaps?): tag... typo #2: typo #3: {{elif session.action == "create":}} I also suggest that you simply do a View Source in the browser and carefully read over the generated markup to look for problems. On May 2, 1:37 pm, Gary w

[web2py:20998] Re: import doctest

2009-05-02 Thread Álvaro Justen [Turicas]
On Fri, May 1, 2009 at 12:48 PM, mdipierro wrote: > > You can remove it I know. :-) What I'm saying is: import doctest IS NOT needed in compileapp.py. When it is really used (if __name__ == '__main__' and TEST_CODE) it is imported. So, we can remove "import doctest" from the start of compileapp.

[web2py:21000] Re: And I am confused again... Again...

2009-05-02 Thread Yarko Tymciurak
Also, note, that you are trying to combine two FORM validators. Since the first requirement belongs on the DAL / on db checking, so the database can raise an error, then your second requirement is _clearly_ (correct?) a form validator: you want the form to not be accepted if it is submitted witho

[web2py:21001] Re: Login to Admin App

2009-05-02 Thread Yarko Tymciurak
See this: http://groups.google.com/group/web2py/browse_thread/thread/c0b7214387e1e31f/c56de337d7225fe3?lnk=gst&q=admin+GAE#c56de337d7225fe3 "*admin* is not supposed to run on *GAE* because *GAE* does not allow you to write on filesystem. You can make it work with minor tweaks but it would be use

[web2py:21002] Re: how to get help on web2py

2009-05-02 Thread Yarko Tymciurak
talk is cheap... ...there is no shortage of opinions or advice on what "others should do", or (worse) what "others should stop doing" (as I read this all)... Who will tell what is missing to make the showcase? Who will make a functional comparison with (pick your favorite python wiki - but keep

[web2py:21003] Re: auth.settings.block_registration logic not present

2009-05-02 Thread mdipierro
This is all new stuff I am still working on. I have a patch from you Fran and I will review is asap. Massimo On May 1, 4:55 pm, Fran wrote: > On May 1, 10:32 pm, Fran wrote: > > > tools.py r721 line 724 > > elif self.settings.block_registration: > >     session.flash = self.messages.registrati

[web2py:21004] Re: html helpers

2009-05-02 Thread mdipierro
I am guessing you want Massimo On May 1, 6:24 pm, murray3 wrote: > If I have a page with > {{=A(comment.title.upper(),_href=URL > (r=request,f='edit_comment',args=[comment.id]))}}       > if I want to put  edit_comment in an iframe and change the above code > so it refreshes the iframe and p

[web2py:21005] Re: Rows disappearing after update

2009-05-02 Thread mdipierro
Brian. I am confused. didn't you say the problem was with SQLite? What does "swicthed to SQLite and it worked" means? May I guess you are running Leopard? I know SQLite that ships with Leopard has some issues. If my assumption is correct, can you try the mac binary instead? massimo On May 2, 1

[web2py:21006] Re: BUG:

2009-05-02 Thread mdipierro
I am investing the previous issue. I changed the structure of admin in trunk and it is possible I forgot to add some of the new files before commit. The issue you refer to below is due to a corrupted tar file. It is not a web2py bug. It probably got corrupted because of a partial download Massim

[web2py:21007] Re: import doctest

2009-05-02 Thread mdipierro
I will remove the imports from trunk. On May 2, 4:14 pm, Álvaro Justen [Turicas] wrote: > On Fri, May 1, 2009 at 12:48 PM, mdipierro wrote: > > > You can remove it > > I know. :-) > What I'm saying is: import doctest IS NOT needed in compileapp.py. > When it is really used (if __name__ == '__ma

[web2py:21008] Re: how to get help on web2py

2009-05-02 Thread mdipierro
I think it would be "politically" bad for me to host a non-web2py- based wiki. If anybody wants to create an alternate wiki and host it. As soon as it is decent I do not mind linking it. Massimo On May 2, 4:44 pm, Yarko Tymciurak wrote: > talk is cheap... > > ...there is no shortage of opinions

[web2py:21009] Re: html helpers

2009-05-02 Thread murray3
Thanks Massimo, I already have the iframe code working as per your suggestion on a page. What I would like to do is refresh the iframe when I click on a link on the main page the iframe is embedded within. Also the link should pass the args to the iframe so that the correct db rows are shown. T

[web2py:21010] Re: html helpers

2009-05-02 Thread mdipierro
I suggest you use jQuery. This should work click me to refresh iframe On May 2, 5:14 pm, murray3 wrote: > Thanks Massimo, > I already have the iframe code working as per your suggestion on a > page. > > What I would like to do is refresh the iframe when I click on a link > on the main page th

[web2py:21011] Re: html helpers

2009-05-02 Thread dlypka
I think there is an array of frames in the DOM and you have to window.open with a target to the desired array element. I think you have to use window.open() or else set .location - I have done this before but do not recall exactly. On May 2, 6:14 pm, murray3 wrote: > Thanks Massimo, > I already

[web2py:21012] More migration/DAL issues

2009-05-02 Thread TheDude
OperationalError: (1054, "Unknown column 'feed.to_player' in 'on clause'") mysql> show fields from feed; +--+--+--+-+-++ | Field| Type | Null | Key | Default | Extra | +--+--+--+-+-+--

[web2py:21013] Re: how to get help on web2py

2009-05-02 Thread waTR
*cricket makes a noise somewhere in the background* > On May 2, 4:44 pm, Yarko Tymciurak wrote: > > > talk is cheap... > > > ...there is no shortage of opinions or advice on what "others should do", or > > (worse) what "others should stop doing"  (as I read this all)... > > > Who will tell w

[web2py:21014] Re: Validation in Custom Form using crud

2009-05-02 Thread Gary
Thank you for your reply. There was a typo #3, but the 'for' in #1 is a valid label option. Actually, I copied the basic and statements from the {{=form}}, but I eliminated the information in #2 when was playing with the various options to see how they effected the display. I guess I introdu

[web2py:21015] Re: Login to Admin App

2009-05-02 Thread Francisco Gama
I see, but I am not trying to use GAE. The error is triggered with GQLDB but I'm with SQLite db. I really wish if someone could set me this working... On 2 Maio, 22:32, Yarko Tymciurak wrote: > See this: > > http://groups.google.com/group/web2py/browse_thread/thread/c0b7214387... > > "*admin*

[web2py:21016] Re: how to get help on web2py

2009-05-02 Thread DenesL
On May 2, 5:09 pm, mdipierro wrote: > I think it would be "politically" bad for me to host a non-web2py- > based wiki. The lack of organized up-to-date documentation is even worse politically speaking. > If anybody wants to create an alternate wiki and host it. As soon as > it is decent I do no

[web2py:21017] Re: And I am confused again... Again...

2009-05-02 Thread DenesL
On May 2, 4:25 pm, Yarko Tymciurak wrote: > Since you probably don't want student name dropdown boxes in the form, then > this will work: > >   db.student.student_name.requires = [ > IS_NOT_IN_DB(db,"student.student_name") ] Dropdown boxes are only created for values required to be in a definit

[web2py:21018] Re: More migration/DAL issues

2009-05-02 Thread mdipierro
This is a database error, not a web2py. I suggest you print print db((db.feed.account_id.belongs(thelist))& (db.accounts.id==db.feed.account_id))._select (db.feed.ALL,db.accounts.name, accounts2.id, accounts2.name, left=accounts2.on(rows), orderby=~db.feed.id, limitby=(0, 10)) and try to execute

[web2py:21019] Re: Validation in Custom Form using crud

2009-05-02 Thread mdipierro
Because of the typos. Can you post the code again and re-state the problem? Massimo On May 2, 6:37 pm, Gary wrote: > Thank you for your reply.   There was a typo #3, but the 'for' in #1 > is a valid label option.  Actually, I copied the basic and > statements from the {{=form}}, but I elimina

[web2py:21020] Re: Login to Admin App

2009-05-02 Thread mdipierro
If you are not on GAE you can do from gluon.fileutils import get_sessionyry: yourapp_session=get_session(request, "Yourapp") Then you can check whether yourapp.auth is None or not. Massimo On May 2, 7:10 pm, Francisco Gama wrote: > I see, but I am not trying to use GAE. The error is triggere

[web2py:21021] Re: Validation in Custom Form using crud

2009-05-02 Thread John Heenan
Hi Gary You have got an interesting approach. However I think it is more complicated than necessary for what you want to achieve. Since your goal appears to be to customise crud layouts then why not just stick to that instead of also bypassing crud in the testdata controller action? You cannot g

[web2py:21022] Re: Validation in Custom Form using crud

2009-05-02 Thread dlypka
I suggest just doing a File .. View Source in your browser and study it carefully and look for a difference between the Auto Crud code and the hand crafted code areas of the generated Source as far as the validation is concerned. On May 2, 7:37 pm, Gary wrote: > Thank you for your reply.   There

[web2py:21023] Re: Validation in Custom Form using crud

2009-05-02 Thread John Heenan
The correct form action for customised crud templates is not simply as I stated in my previous post The correct action for a create form for example can be found by taking away '_create' from form.formname. For example You can look at examples or the source code to get the appropriate action n

[web2py:21024] Re: How to get help (verson 1.01) on web2py

2009-05-02 Thread Iceberg
In case you did not know yet, I would suggest an item zero: 0. web2py's built-in document center at http://localhost:8000/examples/default/docs And these are my favorite sections (The more important, the earlier it appears): Interactive Examples Database Abstraction Layer Examples Interact

[web2py:21025] Re: And I am confused again... Again...

2009-05-02 Thread Jason Brower
Wow, thanks Yarko. On Sat, 2009-05-02 at 16:25 -0500, Yarko Tymciurak wrote: > Also, note, that you are trying to combine two FORM validators. > > Since the first requirement belongs on the DAL / on db checking, so > the database can raise an error, then your second requirement is > _clearly_ (c

[web2py:21026] Re: Rows disappearing after update

2009-05-02 Thread Brian
Sorry Massimo if I was unclear. When I develop locally, I'm using SQLite. When I push my code to my remote server, it's using postgres (I'm using try: postgres & except: sqlite). So locally(sqlite), my code works great. I can update records and everything is smooth. When I push my code to the se

[web2py:21027] Re: BUG:

2009-05-02 Thread mdipierro
I think it is fixed. I had forgotten to add some new admin files to SVN. Massimo On May 2, 5:03 pm, mdipierro wrote: > I am investing the previous issue. I changed the structure of admin in > trunk and it is possible I forgot to add some of the new files before > commit. > > The issue you refer

[web2py:21028] Re: Rows disappearing after update

2009-05-02 Thread mdipierro
I am very puzzled by this. I have never seen it before. Can you send me the model, the controller that does update and the controller that does select? Can you get the postgresql database to log all SQL requests and send me the log? Can you also try adding a db.commit() after the update to see

[web2py:21029] Re: Bug in template system

2009-05-02 Thread Álvaro Justen [Turicas]
It is not a bug. I tried to debug code and more code and then Massimo solved the "problem": it is not a web2py's bug. With our browsers get login URL twice: one for form itself and other for the image! Yes, image! With src="" browsers think img URL is actual URL. So, the login URL is reloaded an

[web2py:21030] Re: Bug in template system

2009-05-02 Thread mdipierro
Thank Alvaro for spending time on this, reminding about the problem, and posting this clear summary about the issue. The way browser behave is very odd indeed. Massimo On May 3, 12:39 am, Álvaro Justen [Turicas] wrote: > It is not a bug. > I tried to debug code and more code and then Massimo s