[web2py:17623] Re: SQLFORM.accepts(): onaccept,oncreate,onupdate

2009-03-07 Thread Iceberg

On Jan10, 11:53pm, mdipierro mdipie...@cs.depaul.edu wrote:
 @Robin,

 I propose I change and I already implemented in in trunk.

 def f(form):
  if form.vars.a!=form.vars.b:
 form.errors.a='must be same as b'
 form.errors.b='must be same as a'

 if form.accepts(,onvalidation=lambda form: f(form))

 Please give it a try.

 Massimo

I just follow my memory and google to find this old post, and then try
onvalidation(...) for my first time. It is great. I am writing here as
a remind that, it seems still undocumented in where it should be:
  http://mdp.cti.depaul.edu/examples/global/vars/SQLFORM
or:
  http://localhost:8000/examples/global/vars/SQLFORM
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17624] Re: DAL mssql DSN connection

2009-03-07 Thread mdipierro



On Mar 6, 8:20 pm, DenesL denes1...@yahoo.ca wrote:
 Using rev775 I get Invalid Query but the command

 SELECT count(*) FROM person WHERE person.id0;

 runs ok, the retrieved value is:
 [(50, )] if using fetchall() or
 (50, ) if using fetchone().
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17625] Re: DAL mssql DSN connection

2009-03-07 Thread mdipierro

Please  try 776.

Can you print the generated statement and see what is wrong with it?

Massimo

On Mar 6, 8:20 pm, DenesL denes1...@yahoo.ca wrote:
 Using rev775 I get Invalid Query but the command

 SELECT count(*) FROM person WHERE person.id0;

 runs ok, the retrieved value is:
 [(50, )] if using fetchall() or
 (50, ) if using fetchone().
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17626] Re: wing ide and web2py

2009-03-07 Thread Yarko Tymciurak
Hello Carlo -
In Wing, there is the Debug Probe you can use to change the current
environment.  I set breakpoints, and watch local variables in the Stack
Data tab;  if I want execute some code in the current context, or modify
some value before moving ahead, I use the debug probe, either where the
program is paused or stopped due to exception.

Use the Debug Probe in Wing - it is similar to the shell, but better -
since it has all the current local context (not just the application
modules), and you can continue execution with the effects of your actions in
this shell.

Regards,
Yarko

On Sat, Mar 7, 2009 at 11:19 AM, Carlo Bazzo syseng...@gmail.com wrote:

 Hi Yarko, sorry to bother you but I have seen in the web2py google group
 you are using Wing Ide with web2py.

 After some tries with Ulipad I decided to go back to my preferite Wing Ide
 and I was wondering if you could send me some advice about configuring for
 use with Web2py.

 One thing I liked in Ulipad was the web2py shell (with models) you can get
 integrated in the ide: can you get something similar with Wing Ide?

 thank you for any help

 carlo


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17627] Re: DAL mssql DSN connection

2009-03-07 Thread DenesL

This will have to wait until monday since I can not connect to the
servers.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17628] Re: db insert override default id

2009-03-07 Thread Joe Barnhart

Well, what if I wanted to restore a database with ids used in multi-
table links?  From what I read of the import csv it discards the id
field and inserts new records -- which will cause any linked records
from other tables to break.  Come to think of it, I'm not sure how you
restore a database at all unless the ids can be set explicitly.

At least this is one use case.

-- Joe B.

On Mar 5, 9:49 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 Why would anybody do such a thing? This can break the integrity of the
 database.

 Massimo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17629] Re: Using 'count' as a field

2009-03-07 Thread Joe Barnhart

Oops.  Found the problem.  I needed to pass count to the html view
where it was actually being used.  Once I did that it worked as
expected.

-- Joe B.

On Mar 6, 3:56 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 This two

 {{=row._extra[db.mytable.id.count()]}}
 {{=row._extra['COUNT(myvar.id)']}}

 should be equivalent. Please try again.

 Massimo

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17630] Re: db insert override default id

2009-03-07 Thread Yarko Tymciurak
here's another, simpler use case:
For PyCon2009 we have a financial aid table.  The F/A person took coupons
(discounts) which we generated offline, and with his own script, selected FA
applicants, and assigned the appropriate amounts to each individual in the
coupons.

He did this manually, off line.

I offered that we could probably UPDATE the database with his FA assignment
comments thru CSV - so he wouldn't have to enter twice (he was, I think,
working this in a spreadsheet locally - then generating automatic email,
passing the coupon ID on to the recipients).

What would be useful in this case:

USE id as an identifier of record to modify;  only modify fields loaded (eg.
in this case,  i would only want id and comment field to be uploaded,
and the comment field of each id to be modified).

I wonder if the appropriate way to go with this would be to make a
MYSQLTable class which inherits from SQLTable, and add a update_from_csv()
 function modeled after insert_from_csv(), but implementing an update
instead of an insert.  As it is, insert_from_csv() checks unique
constraints, and does update() instead of insert in such conditions... this
might complicate unique checks a bit...



 just thinking out loud



On Sat, Mar 7, 2009 at 1:31 PM, Joe Barnhart joe.barnh...@gmail.com wrote:


 Well, what if I wanted to restore a database with ids used in multi-
 table links?  From what I read of the import csv it discards the id
 field and inserts new records -- which will cause any linked records
 from other tables to break.  Come to think of it, I'm not sure how you
 restore a database at all unless the ids can be set explicitly.

 At least this is one use case.

 -- Joe B.

 On Mar 5, 9:49 pm, mdipierro mdipie...@cs.depaul.edu wrote:
  Why would anybody do such a thing? This can break the integrity of the
  database.
 
  Massimo

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17631] Re: new feature in trunk: services

2009-03-07 Thread Jim

OK, I'm a newbie.   I'd like to use something like this, especially
after wrestling this morning trying to get the RSS example from the
manual working.  Almost there but not quite.   And using that example
would mean adding code to every single function

/application/controller/function/[RSS]  gets you the default
RSS feed for this function

/application/controller/function/arg1/arg2/ [ RSS] More detailed
feed

/application/controller/function/arg1/arg2/?color=redobject=widgets
[RSS] Extremely detailed

/application/controller/   [RSS] very broad feed

/application/[RSS] incredibly broad - basically used by search
engines

Maybe that's possible with the way this is laid out.

Can you explain more about how that would work?


On Mar 6, 6:11 am, mdipierro mdipie...@cs.depaul.edu wrote:
 Has anybody tried this yet?

 Please try this and send me comments:

 from gluon.tools import Service

 service=Service(globals())
 @service.run
 @service.json
 @service.jsonrpc
 @service.xmlrpc
 @service.amfrpc
 def f(a,b):
     return a+b

 @service.rss
 def myfeed():
     return dict
 (title='title',link='link',description='description',created_on=request.now,
                 entries=[dict
 (title='title',link='link',description='description',created_on=request.now])

 def call():
     return service()

 USAGE:
    http:///app/default/call/run/f?a=3b=4
    http://./app/default//call/run/f/3/4
    http://./app/default//call/json/f/3/4
     etc etc
 etc ...
    http:///app/default//call/rss/myfeed
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17632] Re: db insert override default id

2009-03-07 Thread mdipierro

Actually if you restore multiple tables using

d={}
db.table1.import_from_csv_file(file1,d)
db.table2.import_from_csv_file(file3,d)
...

web2py WILL FIX all your references. The new id will not be the same
as the old ones but the references will reflect the new ids.
This is achieved by storing a map between the original id and the new
id in the d={} dictionary. Give it a try.

You can also import_to_csv_field and export_from_csv_file an entire db
(as opposed to an individual table) and the remapping of the ids is
the default behaviour.

Massimo

On Mar 7, 1:31 pm, Joe  Barnhart joe.barnh...@gmail.com wrote:
 Well, what if I wanted to restore a database with ids used in multi-
 table links?  From what I read of the import csv it discards the id
 field and inserts new records -- which will cause any linked records
 from other tables to break.  Come to think of it, I'm not sure how you
 restore a database at all unless the ids can be set explicitly.

 At least this is one use case.

 -- Joe B.

 On Mar 5, 9:49 pm, mdipierro mdipie...@cs.depaul.edu wrote:

  Why would anybody do such a thing? This can break the integrity of the
  database.
 
  Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17633] Pycon 2009 - Important

2009-03-07 Thread mdipierro

We have a booth at PyCon 2009. If you can me it let me know.

I am looking for volunteers to make shifts at the booth and answer
people's questions about web2py.

I may print t-shirts (depending on cost).

If you want to propose a design please email it to me asap.
If you have suggestions on how/where to print them cheep please let me
know.

If you are attending pycon and promise to wear the T-Shirt you get
one.

Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17634] Re: db insert override default id

2009-03-07 Thread Yarko Tymciurak
This is really great - it only leaves the use case I outlined - updating
rows from csv (or - in the case of UUID / name field of coupon, would this
work that way anyway?  Actually, I think so)

On Sat, Mar 7, 2009 at 3:15 PM, mdipierro mdipie...@cs.depaul.edu wrote:


 Actually if you restore multiple tables using

 d={}
 db.table1.import_from_csv_file(file1,d)
 db.table2.import_from_csv_file(file3,d)
 ...

 web2py WILL FIX all your references. The new id will not be the same
 as the old ones but the references will reflect the new ids.
 This is achieved by storing a map between the original id and the new
 id in the d={} dictionary. Give it a try.

 You can also import_to_csv_field and export_from_csv_file an entire db
 (as opposed to an individual table) and the remapping of the ids is
 the default behaviour.

 Massimo

 On Mar 7, 1:31 pm, Joe  Barnhart joe.barnh...@gmail.com wrote:
  Well, what if I wanted to restore a database with ids used in multi-
  table links?  From what I read of the import csv it discards the id
  field and inserts new records -- which will cause any linked records
  from other tables to break.  Come to think of it, I'm not sure how you
  restore a database at all unless the ids can be set explicitly.
 
  At least this is one use case.
 
  -- Joe B.
 
  On Mar 5, 9:49 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 
   Why would anybody do such a thing? This can break the integrity of the
   database.
  
   Massimo
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17635] Re: Pycon 2009 - Important

2009-03-07 Thread Yarko Tymciurak
Count me in (but I have pycon stuff to do too!)...
What about the shirt vendor Bruce used for PyCon?

Would a web2py patch that you can add to your pycon shirt be a better
alternative?



On Sat, Mar 7, 2009 at 3:29 PM, mdipierro mdipie...@cs.depaul.edu wrote:


 We have a booth at PyCon 2009. If you can me it let me know.

 I am looking for volunteers to make shifts at the booth and answer
 people's questions about web2py.

 I may print t-shirts (depending on cost).

 If you want to propose a design please email it to me asap.
 If you have suggestions on how/where to print them cheep please let me
 know.

 If you are attending pycon and promise to wear the T-Shirt you get
 one.

 Massimo
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17636] Re: db insert override default id

2009-03-07 Thread mdipierro

If the table has a field called uuid it is used and the record is
inserted or updated accordingly.

Massimo

On Mar 7, 6:31 pm, Yarko Tymciurak yark...@gmail.com wrote:
 This is really great - it only leaves the use case I outlined - updating
 rows from csv (or - in the case of UUID / name field of coupon, would this
 work that way anyway?  Actually, I think so)

 On Sat, Mar 7, 2009 at 3:15 PM, mdipierro mdipie...@cs.depaul.edu wrote:

  Actually if you restore multiple tables using

  d={}
  db.table1.import_from_csv_file(file1,d)
  db.table2.import_from_csv_file(file3,d)
  ...

  web2py WILL FIX all your references. The new id will not be the same
  as the old ones but the references will reflect the new ids.
  This is achieved by storing a map between the original id and the new
  id in the d={} dictionary. Give it a try.

  You can also import_to_csv_field and export_from_csv_file an entire db
  (as opposed to an individual table) and the remapping of the ids is
  the default behaviour.

  Massimo

  On Mar 7, 1:31 pm, Joe  Barnhart joe.barnh...@gmail.com wrote:
   Well, what if I wanted to restore a database with ids used in multi-
   table links?  From what I read of the import csv it discards the id
   field and inserts new records -- which will cause any linked records
   from other tables to break.  Come to think of it, I'm not sure how you
   restore a database at all unless the ids can be set explicitly.

   At least this is one use case.

   -- Joe B.

   On Mar 5, 9:49 pm, mdipierro mdipie...@cs.depaul.edu wrote:

Why would anybody do such a thing? This can break the integrity of the
database.
   
Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17637] Re: Pycon 2009 - Important

2009-03-07 Thread AchipA

On Mar 8, 1:35 am, Yarko Tymciurak yark...@gmail.com wrote:
 Would a web2py patch that you can add to your pycon shirt be a better
 alternative?

Only if it's backward compatible :D
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17638] Re: Pycon 2009 - Important

2009-03-07 Thread Yarko Tymciurak
LOL!  (good one!)

On Sat, Mar 7, 2009 at 7:56 PM, AchipA attila.cs...@gmail.com wrote:


 On Mar 8, 1:35 am, Yarko Tymciurak yark...@gmail.com wrote:
  Would a web2py patch that you can add to your pycon shirt be a better
  alternative?

 Only if it's backward compatible :D
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17639] Re: Pycon 2009 - Important

2009-03-07 Thread mdipierro

Thank you Yarko.
What is a t-shirt patch?

On Mar 7, 6:35 pm, Yarko Tymciurak yark...@gmail.com wrote:
 Count me in (but I have pycon stuff to do too!)...
 What about the shirt vendor Bruce used for PyCon?

 Would a web2py patch that you can add to your pycon shirt be a better
 alternative?

 On Sat, Mar 7, 2009 at 3:29 PM, mdipierro mdipie...@cs.depaul.edu wrote:

  We have a booth at PyCon 2009. If you can me it let me know.

  I am looking for volunteers to make shifts at the booth and answer
  people's questions about web2py.

  I may print t-shirts (depending on cost).

  If you want to propose a design please email it to me asap.
  If you have suggestions on how/where to print them cheep please let me
  know.

  If you are attending pycon and promise to wear the T-Shirt you get
  one.

  Massimo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17640] Re: Pycon 2009 - Important

2009-03-07 Thread Yarko Tymciurak
For example:  http://www.custom-patches4less.com/pricing.html


On Sat, Mar 7, 2009 at 9:47 PM, mdipierro mdipie...@cs.depaul.edu wrote:


 Thank you Yarko.
 What is a t-shirt patch?

 On Mar 7, 6:35 pm, Yarko Tymciurak yark...@gmail.com wrote:
  Count me in (but I have pycon stuff to do too!)...
  What about the shirt vendor Bruce used for PyCon?
 
  Would a web2py patch that you can add to your pycon shirt be a better
  alternative?
 
  On Sat, Mar 7, 2009 at 3:29 PM, mdipierro mdipie...@cs.depaul.edu
 wrote:
 
   We have a booth at PyCon 2009. If you can me it let me know.
 
   I am looking for volunteers to make shifts at the booth and answer
   people's questions about web2py.
 
   I may print t-shirts (depending on cost).
 
   If you want to propose a design please email it to me asap.
   If you have suggestions on how/where to print them cheep please let me
   know.
 
   If you are attending pycon and promise to wear the T-Shirt you get
   one.
 
   Massimo
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17641] my first web2py app (hosted at GAE)

2009-03-07 Thread Joseph Jude

All,
I am glad to say that my first app on web2py is hosted in GAE, thanks
to ease of programming in web2py. It is my attempt to learn new
concepts (cloud computing, SAAS etc) utilizing my experience (on
helpdesk, service desk). It is hosted at: http://y-a-t-s-y.appspot.com/.
I blogged about it at: http://www.jjude.com/2009/03/08/a-first-shot-at-web2py/.
The code is hosted at: http://code.google.com/p/y-a-t-s-y/source/browse/trunk.

This is my first web2py attempt. So if any of the experts here would
be willing to do a code review, primarily of default.py (http://
code.google.com/p/y-a-t-s-y/source/browse/trunk)  layout.html (http://
code.google.com/p/y-a-t-s-y/source/browse/trunk/applications/init/
views/layout.html), it will help me to improve my coding. Feel free to
comment on other code as well.

Having done this far, I do have few questions. Your answers are
appreciated:
1) Login page shows admin, request etc buttons. How can I hide
them? Should I have to create a view template? Where should it be in
the directories? Can it be under my application directory?

2) Better yet would be possibility to have login form on the first
page (index.html) along with other static contents. How can that be
done?

3) At logout, control goes back to login page. Can it be routed to
index.html?

I've other questions too. I will throw them as I progress along.

Hopefully I'll be able to contribute to the growth of web2py, even in
a smaller way.

Thanks folks,
Joseph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17642] What's the plan for supporting multi-level menus with response.menu?

2009-03-07 Thread weheh

I've read that this is possible with t2, but how about 1.57? I've
tried it with 1.57 and it doesn't seem to work. Any suggestions for
how to do nested multi-level menus with the current version?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17643] Re: Distribution with PIL

2009-03-07 Thread Jonathan B



On Mar 6, 9:45 pm, AchipA attila.cs...@gmail.com wrote:
 Another issue, somewhat linked to this is the version of web2py
 itself. Is there a way for the app to detect that the web2py version
 it is run on is older than it requires ?

From checking the Admin application code (web2py\web2py\applications
\admin\controllers\default.py):


WEB2PY_VERSION_URL = 'http://mdp.cti.depaul.edu/examples/default/
version'


myversion = request.env.web2py_version
version = urllib.urlopen(WEB2PY_VERSION_URL).read()

if version  myversion:
return A(T('A new version of web2py is available'),
 _href=WEB2PY_URL)
else:
return A(T('web2py is up to date'), _href=WEB2PY_URL)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17644] Re: my first web2py app (hosted at GAE)

2009-03-07 Thread Yarko Tymciurak
On Sat, Mar 7, 2009 at 11:16 PM, Joseph Jude ceph...@gmail.com wrote:


 All,
 I am glad to say that my first app on web2py is hosted in GAE, thanks
 to ease of programming in web2py. It is my attempt to learn new
 concepts (cloud computing, SAAS etc) utilizing my experience (on
 helpdesk, service desk). It is hosted at: http://y-a-t-s-y.appspot.com/.
 I blogged about it at:
 http://www.jjude.com/2009/03/08/a-first-shot-at-web2py/.
 The code is hosted at:
 http://code.google.com/p/y-a-t-s-y/source/browse/trunk.

 This is my first web2py attempt. So if any of the experts here would
 be willing to do a code review, primarily of default.py (http://
 code.google.com/p/y-a-t-s-y/source/browse/trunk)  layout.html (http://
 code.google.com/p/y-a-t-s-y/source/browse/trunk/applications/init/
 views/layout.html), it will help me to improve my coding. Feel free to
 comment on other code as well.

 Having done this far, I do have few questions. Your answers are
 appreciated:
 1) Login page shows admin, request etc buttons. How can I hide
 them? Should I have to create a view template? Where should it be in
 the directories? Can it be under my application directory?


This is in the view generic.html in your application.   See the =BEAUTIFY
 stuff...

In general, you want to create a view for your application - a generic is
ok;  one to match controller/function name will be called, e.g.   index from
default.py  will try to use a controller views/default/index.html, and so
on...

So, you probably want to create numerous view templates, and start with
making generic.html fit for your app.



 2) Better yet would be possibility to have login form on the first
 page (index.html) along with other static contents. How can that be
 done?


Start simple - put a link to login, or  just let authorization test if
access to something requires login, and allow it to happen then.

You can put a login on your index page conditionally (login / you are
logged in / logout)...



 3) At logout, control goes back to login page. Can it be routed to
 index.html?


I'll assume you're using the new auth tool;auth.logout(next='index')




 I've other questions too. I will throw them as I progress along.

 Hopefully I'll be able to contribute to the growth of web2py, even in
 a smaller way.

 Thanks folks,
 Joseph
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:17645] Re: Critical point in web2py

2009-03-07 Thread Jonathan B

Hi all,


On Mar 5, 7:23 pm, Yarko Tymciurak yark...@gmail.com wrote:
 one advantage to a web2py wiki:  we can dump (csv) contents in prep for
 sphinx integration / work.

Yes, that is an advantage, although I'm sure we could implement this
feature for any open source Wiki software without too much trouble.

I think the main advantage of using web2py would be hosting
requirements. We can run a web2py Wiki on a free GAE account, such as
http://web2py.appspot.com (where we currently have Reddish).

As an alternative, we could run an existing Wiki software off of
Massimo's university hosting, but I don't like the current setup. We
don't need HTTPS (except perhaps for login), and the expired self-
signed certificate is problematic. Can the HTTPS be removed?

We can easily put the manual's Sphinx/RST code into Bitbucket or
Launchpad, so free hosting is already available for that.


On Mar 5, 9:45 pm, Francisco Gama francisco@gmail.com wrote:

 I personally have a very bad experience with MoinMoin. It's visual UI
 is very weak

This is my main complaint regarding MoinMoin as well. When I tried it
some 8 years back, it was virtually unusable.


 honestly I believe it's not hard to make something with a better base
 design from scratch in very little time.

I must disagree here. It's surprisingly difficult to reinvent the
wheel. If we go ahead and try using a brand new web2py Wiki for real
work, we *will* have some problems--problems that we will avoid if we
use mature software.


 Being a WiKi engine a web application and being web2py a framework for
 web app development, it makes sense even for capabilities
 demonstration to show off what it can do.

I agree, but that doesn't mean we must use a web2py Wiki right away...
this can be the plan for Phase 2.


Sincerely,

--Jonathan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
web2py Web Framework group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---