Re: [web2py] Re: Problem with SQLFORM.grid

2011-09-06 Thread Johann Spies
On 5 September 2011 20:04, brushek  wrote:

> Can anybody help ? or grid and smartgrid shouldn't be used with custom
> fields ?
>
>
I have tried your model and controller and get the following error when I
try to use SQLFORM.smartgrid or -grid:

 File "/home/js/web2py/applications/isi_proef/controllers/default.py"
,
line 71, in dodajserwer
form = SQLFORM.smartgrid(db.serwery)
  File "/home/js/web2py/gluon/sqlhtml.py", line 1631, in smartgrid
user_signature=user_signature,**kwargs)
  File "/home/js/web2py/gluon/sqlhtml.py", line 1386, in grid
if field.type in ('string','text')])
TypeError: reduce() of empty sequence with no initial value


 The setup works with SQLTABLE so if I were you I would look at SOLIDTABLE
as an alternative to SQLFORM.grid in this case.

Regards
Johann
-- 
 May grace and peace be yours in abundance through the full knowledge of God
and of Jesus our Lord!  His divine power has given us everything we need for
life and godliness through the full knowledge of the one who called us by
his own glory and excellence.
2 Pet. 1:2b,3a


[web2py] Re: Published my collection of plugins

2011-09-06 Thread kenji4569
Hi António,

I implemented a file chooser for the elrte widget.
Please try it:
http://dev.s-cubism.com/plugin_elrte_widget

Since the file chooser is very primitive, you may need to customize
it.
But, the customization would be easy with the expressive power of
web2py (see the demo code).
(Notice: I applied a small patch for the original elrte.js to make the
file chooser available.)

Thanks again for your valuable feedback,
Kenji

On 9月4日, 午後8:01, António Ramos  wrote:
> Thank you.
> I realy need your plugin ASAP but with the option to attach multiple pdf or
> doc files.
>
> 2011/9/4 kenji4569 
>
>
>
>
>
>
>
> > >the elRTE WYSIWYG Widget does not allow to "import" a file other than an
> > >image.
> > >It would be nice to import for example a pdf or a doc file
> > Thanks for your proposal.
> > I think it would be easy to implement it, because the image chooser
> > can be customized to anything.
> > I'll try to do this.
>
> > Kenji
>
> > On 9月4日, 午後6:02, António Ramos  wrote:
> > > Hello
> > > the elRTE WYSIWYG Widget does not allow to "import" a file other than an
> > > image.
> > > It would be nice to import for example a pdf or a doc file
>
> > > Thank you
> > > António
>
> > > 2011/9/4 kenji4569 
>
> > > > >Maybe the actual datepicker could be of some help to figure out how to
> > > > make it moves...
> > > > Thanks, but I couldn't read the source of the datepicker since it's
> > > > compressed (I couldn't find the readable one in the host site).
> > > > Other solution might be using jquery.ui.draggable, but it's not so
> > > > light as to just make it draggable.
> > > > So, for now, I leave the anytime.js unmodified.
>
> > > > Kenji
>
> > > > On 9月1日, 午後10:53, Richard Vézina  wrote:
> > > > > Great!
>
> > > > > It nice that you take care of feedback... Don't worry about IE ;-)
>
> > > > > For moving, I think it a most have feature since the actual
> > datepicker
> > > > has
> > > > > it...
>
> > > > > What has to be done to make it available?
>
> > > > > Maybe the actual datepicker could be of some help to figure out how
> > to
> > > > make
> > > > > it moves...
>
> > > > > Thank Kenji
>
> > > > > Richard
>
> > > > > On Thu, Sep 1, 2011 at 6:35 AM, kenji4569 
> > wrote:
> > > > > > Hi Richard,
>
> > > > > > thank you for your feedback.
>
> > > > > > >It works great except that it seems to conflict with jQuery UI
> > tabs
> > > > and
> > > > > > dialog...
> > > > > > I fixed it (tested Chrome, FF, IE).
> > > > > > See:
> >http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui
> > > > > > (The anytime css should precede the jquery ui css)
>
> > > > > > >It no show up when my form are called with LOAD()
> > > > > > I also fixed it.
> > > > > > See:http://dev.s-cubism.com/plugin_anytime_widget/test/_/load
> > > > > > (I implemented a dynamic loader for js and css)
>
> > > > > > Note however, since IE(<=8?) could not put a dynamic css before
> > loaded
> > > > > > css,
> > > > > > the conflict for jquery-ui still occurs for IE(<=8?).
> > > > > > see:
>
> >http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui/load
>
> > > > > > >there is no way we can move it like the actual datepicker...
> > > > > > This might be difficult to implement.
>
> > > > > > Regards,
> > > > > > Kenji
>
> > > > > > On 9月1日, 午前4:25, Richard Vézina 
> > wrote:
> > > > > > > Hello,
>
> > > > > > > I just try anydate plugin... It works great except that it seems
> > to
> > > > > > conflict
> > > > > > > with jQuery UI tabs and dialog... It no show up when my form are
> > > > called
> > > > > > with
> > > > > > > LOAD(), so it also could it be conflicting with LOAD() of web2py.
> > > >  Also
> > > > > > > there is no way we can move it like the actual datepicker...
>
> > > > > > > Richard
>
> > > > > > > On Tue, Aug 30, 2011 at 9:47 PM, kenji4569 
> > > > wrote:
> > > > > > > > > I still see the same
> > > > > > > > > problem with 'Format', 'Font size' and 'Font' dropdown
> > > > selections.
> > > > > > > > Sorry, I addressed the issue, and I think it would be fixed.
> > > > > > > > The cause for this is null entry for the text area.
>
> > > > > > > > Kenji
>
> > > > > > > > On 8月31日, 午前12:14, tomt  wrote:
> > > > > > > > > Hi,
>
> > > > > > > > > I tried your update, and I can now successfully modify text
> > color
> > > > and
> > > > > > > > > background color with IE7 and IE8. Unfortunately I still see
> > the
> > > > same
> > > > > > > > > problem with 'Format', 'Font size' and 'Font' dropdown
> > > > selections.
> > > > > > > > > That is,
> > > > > > > > > the dropdown selection is erased before I can select an
> > option.
>
> > > > > > > > > - Tom
>
> > > > > > > > > On Aug 30, 4:05 am, kenji4569  wrote:
>
> > > > > > > > > > Hi, Tom.
>
> > > > > > > > > > Thank you for reporting the bug.
> > > > > > > > > > I just fixed it.
> > > > > > > > > > Please check:http://dev.s-cubism.com/plugin_elrte_widget
> > > > > > > > > > (you might need to clear the browser cache)
>
> > > > > > > > > > [modification detail]
> 

Re: [web2py] Re: how to avoid shell in the admin

2011-09-06 Thread António Ramos
You are the man... :)

2011/9/6 Anthony 

> On Monday, September 5, 2011 12:18:28 PM UTC-4, Ramos wrote:
>>
>> hello, i dont like the shell in the admin because in windows i cannot
>> repeat last command also the pythonwin is way more friendly...
>>
>> 1 - in windows how can i do the shame as the admin shell using pythonwin
>> or just command line python?
>>
>
> I'm not sure you can use PythonWin, but open a command window (cmd.exe),
> change directory to your \web2py folder, and enter:
>
> python web2py -S your_app -N -M
>
> You'll get the web2py environment (including the models for your app) in a
> Python shell. Note, -N tells it to turn off cron, and -M tells it to run the
> models from your app. See
> http://web2py.com/book/default/chapter/04#Command-Line-Options.
>
>
>
>> 2 - in windows in command line python how do i execute a function in a
>> controller?
>>
>
> When you run the web2py shell (as described above), you can tell it to run
> a particular controller and function:
>
> python web2py -S your_app/your_controller/your_function -N -M
>
> Note, you could also just do your_app/your_controller, and once you're in
> the shell, you can run any function within the controller.
>
> Here's a simple batch file you can adapt -- when you click it, it will
> prompt you for an app (which can include app/controller/function), and it
> will change to the web2py folder and start the shell for you:
>
> @echo off
> set /P app="Enter web2py app/controller/function to run in the shell
> (controller/function optional): "
> cd c:\path\to\web2py
> python web2py.py -S %app% -M -N
>
>
> If you want a nicer command window in Windows, in any command window, click
> the icon in the upper left, and select Defaults from the menu. There you can
> change the window size and position, colors, etc., and the changes will
> affect all command windows.
>
> Anthony
>
>


[web2py] T empty strings

2011-09-06 Thread guruyaya
Hi Massimo
For some strange reason the update language mechanism leave out some
empty strings. I'm not sure why this bug occurs, my guess is, it's one
of the crazy things I'm doing in this project.
I was wondering, why an empty string in the translation file, won't
return the default string? It doesn't seem reasonable that I'd like a
string to appear in one language, but not in another.
If you'll take the patch, I'll do this the work of writing it. I just
don't want to do a lot of work on the patch - to get it rejected.
Thanks
Yair


[web2py] Building a non-trivial SOAP service using web2py

2011-09-06 Thread David Mitchell
Hello all,

I'm looking at using web2py to build a SOAP service to work as a test
harness for an infrastructure upgrade we're planning.  Unfortunately, all
the web2py SOAP info I've found has been trivial services such as adding 2
numbers together - in my case, I need my SOAP server to be able to do
something more complicated.

The sort of complexity I need to build is something like
http://www.webservicex.com/stockquote.asmx?WSDL
When I query this service from suds, the code looks something like:
>>> import suds
>>> url = 'http://www.webservicex.com/stockquote.asmx?WSDL'
>>> client = suds.client.Client(url)
>>> print client

Suds ( https://fedorahosted.org/suds/ )  version: 0.4 GA  build:
R699-20100913

Service ( StockQuote ) tns="http://www.webserviceX.NET/";
   Prefixes (0)
   Ports (2):
  (StockQuoteSoap)
 Methods (1):
GetQuote(xs:string symbol, )
 Types (0):
  (StockQuoteSoap12)
 Methods (1):
GetQuote(xs:string symbol, )
 Types (0):


>>> client.service.GetQuote('IBM')
IBM166.989/2/20114:00pm0.00N/AN/AN/A200199.4B166.980.00%125.39
- 185.6312.31513.56International
Bus
>>>


I figure my web2py controller code to do this would look something like:

from gluon.tools import Service
service = Service(globals())

@service.soap('GetQuote', returns={SOMETHING_HERE}, args={'symbol':str})
def stock_quote(stock):
"Return stock quote info - everything is hardcoded..."
symbol = "IBM"
last = 166.98
date = '9/2/2011'
quote_time = '4:00pm'
change = 0.00
#...
return SOMETHING_HERE

def call():
return service()


I'm trying to work out what the 2 SOMETHING_HERE pieces should look like in
the above code.

Could someone please point me in the right direction?

Thanks in advance

Dave M.


Re: [web2py] Re: Problem with SQLFORM.grid

2011-09-06 Thread Bruno Rocha
On Tue, Sep 6, 2011 at 4:05 AM, Johann Spies  wrote:

>  if field.type in ('string','text')])
>
> TypeError: reduce() of empty sequence with no initial value
>
>
That is a bug I already reported [0]

grid does not works with tables without fields of type 'string' or 'text',
also it can't work with fields of type list:integer

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




--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]
[ Aprenda a programar: http://CursoDePython.com.br ]
[ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ]
[ Consultoria em desenvolvimento web: http://www.blouweb.com ]


[web2py] create server.crt and server.key certificates

2011-09-06 Thread Web2Py Freak
anyone can help me with these file , i dont know what to put in them


[web2py] deploying web2py on IIS

2011-09-06 Thread Web2Py Freak
how can i deploy web2py on IIS ??


Re: [web2py] create server.crt and server.key certificates

2011-09-06 Thread António Ramos
i followed this tutorial

http://www.xenocafe.com/tutorials/linux/centos/openssl/self_signed_certificates/index.php


2011/9/6 Web2Py Freak 

> anyone can help me with these file , i dont know what to put in them


[web2py] Css Error

2011-09-06 Thread PaoloPk
Ciao
è la prima volta che partecipo ad un gruppo, complimenti per il
web2py.

Volevo segnalare un errore:
quando si crea "New application wizard",  step1, voce Plugins,
non è possibile visualizzare i contenuti, con nessun browser.
Basta correggere la classe incriminata con float left

.ui-multiselect-checkboxes {
float: left;
overflow-y: scroll;
position: relative;
}

spero di esservi stato utile!

Paolo


Re: [web2py] Re: how to avoid shell in the admin

2011-09-06 Thread Anthony
Sorry, slight mistake -- it's:

python web2py.py -S your_app -N -M

(I left off the .py in my original reply.)

Also, this assumes you have your own installation of Python and you are 
running the web2py source code version rather than the Windows binary 
version. If you are running the Windows binary version, instead of the 
above, do:

web2py -S your_app -N -M

Instead of asking Python to run the web2py.py file, in this case, you're 
telling Windows to run the web2py.exe file.

Anthony

On Tuesday, September 6, 2011 5:02:44 AM UTC-4, Ramos wrote:
>
> You are the man... :)
>
> 2011/9/6 Anthony 
>
>> On Monday, September 5, 2011 12:18:28 PM UTC-4, Ramos wrote:
>>>
>>> hello, i dont like the shell in the admin because in windows i cannot 
>>> repeat last command also the pythonwin is way more friendly...
>>>
>>> 1 - in windows how can i do the shame as the admin shell using pythonwin 
>>> or just command line python?
>>>
>>
>> I'm not sure you can use PythonWin, but open a command window (cmd.exe), 
>> change directory to your \web2py folder, and enter:
>>
>> python web2py -S your_app -N -M
>>
>> You'll get the web2py environment (including the models for your app) in a 
>> Python shell. Note, -N tells it to turn off cron, and -M tells it to run the 
>> models from your app. See 
>> http://web2py.com/book/default/chapter/04#Command-Line-Options.
>>
>>  
>>
>>> 2 - in windows in command line python how do i execute a function in a 
>>> controller?
>>>
>>
>> When you run the web2py shell (as described above), you can tell it to run 
>> a particular controller and function:
>>
>> python web2py -S your_app/your_controller/your_function -N -M
>>
>> Note, you could also just do your_app/your_controller, and once you're in 
>> the shell, you can run any function within the controller.
>>
>> Here's a simple batch file you can adapt -- when you click it, it will 
>> prompt you for an app (which can include app/controller/function), and it 
>> will change to the web2py folder and start the shell for you:
>>
>> @echo off
>> set /P app="Enter web2py app/controller/function to run in the shell 
>> (controller/function optional): "
>> cd c:\path\to\web2py
>> python web2py.py -S %app% -M -N
>>
>>
>> If you want a nicer command window in Windows, in any command window, 
>> click the icon in the upper left, and select Defaults from the menu. There 
>> you can change the window size and position, colors, etc., and the changes 
>> will affect all command windows.
>>
>> Anthony
>>
>>
>

[web2py] Email client in Web2py ?

2011-09-06 Thread António Ramos
Hello, has anyone thought about creating an app in web2py that would be an
email client?


Thank you
António


[web2py] Re: button calling a action

2011-09-06 Thread Fabiano Faver
Thanks Noel and Anthony both have worked!

what it was worrying me is that I didn't want to just redirect the user, it 
will have to run some code and will redirect to specific pages based on user 
group and data on page. I guess i would put these codes in a page anyway and 
redirect, but perhaps it will take a second in this page and it must be 
transparently.
now I will insert the code at this function and continue tests.Thanks.

ps:Sorry if was not so clear.


[web2py] Re: uploading my web2py website

2011-09-06 Thread Ross Peoples
Shared hosting is the cheapest type of hosting for simple web sites and 
blogs. In order to get your app to run on a web server, the web server must 
first have web2py installed. When web2py is installed and running on a 
server, it acts like an application server (server that runs individual 
apps). Java developers would relate web2py's server to something like 
Tomcat, Glassfish, or JBoss. Once these servers are installed, you simply 
upload your app to them and they run. web2py works the same way.

Getting web2py running on a web server is the difficult part. Since you are 
new at deployments, you should look into FluxFlex, as it does web2py 
deployment for you and all you have to do is upload your app. Check out the 
video Massimo made: http://vimeo.com/28112026


[web2py] Re: request.args inconsistent behaviour and ignoring URI valid characters

2011-09-06 Thread Massimo Di Pierro
Exactly! This is an importent security feature.

On Sep 5, 9:39 pm, pbreit  wrote:
> It's hard to say exactly what is allowed but according to my reading 
> ofhttp://tools.ietf.org/html/rfc3986* is definitely not allowed and . and .. 
> may not be allowed in the path (since they have meaning in a file system).


[web2py] Re: deploying web2py on IIS

2011-09-06 Thread Massimo Di Pierro
Try this and please report errors.

Start web2py as usual on port 8000

python web2py -p 8000 -i 127.0.0.1 -a 'password'

Create:
C:\inetpub\wwwroot\web2py
C:\inetpub\wwwroot\web2py\bin
Download http://managedfusion.com/ and extract
C:\inetpub\wwwroot\web2py\Web.config

Create C:\inetpub\wwwroot\web2py\ManagedFusion.Rewriter.txt
and in it write:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.com$ [NC]
RewriteRule ^(.*)$ http://localhost:8000$1 [P,QSA,L]







On Sep 6, 5:03 am, Web2Py Freak  wrote:
> how can i deploy web2py on IIS ??


[web2py] Re: Css Error

2011-09-06 Thread Massimo Di Pierro
Grazie Paolo. Decisamente utile.

On Sep 6, 4:48 am, PaoloPk  wrote:
> Ciao
> è la prima volta che partecipo ad un gruppo, complimenti per il
> web2py.
>
> Volevo segnalare un errore:
> quando si crea "New application wizard",  step1, voce Plugins,
> non è possibile visualizzare i contenuti, con nessun browser.
> Basta correggere la classe incriminata con float left
>
> .ui-multiselect-checkboxes {
> float: left;
> overflow-y: scroll;
> position: relative;
>
> }
>
> spero di esservi stato utile!
>
> Paolo


[web2py] Re: Email client in Web2py ?

2011-09-06 Thread Massimo Di Pierro
If you are on linux you can create a ~/.forward file that contains

"|/home/youraccount/yourprogram.py"

(quotes required) and all received emails will be passed as stdin to /
home/youraccount/yourprogram.py.

That program can "from gluon import *" and you are in business!

Massimo



On Sep 6, 6:48 am, António Ramos  wrote:
> Hello, has anyone thought about creating an app in web2py that would be an
> email client?
>
> Thank you
> António


[web2py] Re: deploying web2py on IIS

2011-09-06 Thread Web2Py Freak
where dose my application files go ? or my packed project go


[web2py] Re: deploying web2py on IIS

2011-09-06 Thread Web2Py Freak
Massimo ,
 if you may please , can you explain thing a little more this is my
first time doing this . Thank you .


[web2py] Re: Published my collection of plugins

2011-09-06 Thread kenji4569
> web2py gives the file in the download
> directory for example
> 5e74c950-95b2-4843-b4c6-53bc8efca8fe lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63 
> .doc>
The former random string is a display file name, and just for demo.
The latter one is an actual file name generated by web2py.

Now, I remove the former, since it's confusing:
http://dev.s-cubism.com/plugin_elrte_widget

Changing the latter would require much work with deeper inspection
into the web2py upload mechanism.

Changing the look and feel such as replacing icons would be easier,
and you should see the file_upload_or_choose() function in the usage
code of the demo.

Note that I do not implement a ready-made image/file chooser, and you
have to implement it for your own application, starting from the usage
code, including setting up your db and defining your image and file
tables.

Regards,
Kenji


On 9月6日, 午後6:01, António Ramos  wrote:
> Hello Kenji,
> Thank you for your fast work
>
> One problem!
> The form is not very friendly.
>
> In the submit form i choose a pdf for example myfile.pdf but in the name
> field you write the name that web2py gives the file in the download
> directory for example
> 5e74c950-95b2-4843-b4c6-53bc8efca8fe lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63 
> .doc>
> This has no meaning to the user!
>
> Please see attached file for what i think it would be really helpfull.
>
> Thank you again
>
> António
>
> 2011/9/6 kenji4569 
>
>
>
>
>
>
>
> > Hi António,
>
> > I implemented a file chooser for the elrte widget.
> > Please try it:
> >http://dev.s-cubism.com/plugin_elrte_widget
>
> > Since the file chooser is very primitive, you may need to customize
> > it.
> > But, the customization would be easy with the expressive power of
> > web2py (see the demo code).
> > (Notice: I applied a small patch for the original elrte.js to make the
> > file chooser available.)
>
> > Thanks again for your valuable feedback,
> > Kenji
>
> > On 9月4日, 午後8:01, António Ramos  wrote:
> > > Thank you.
> > > I realy need your plugin ASAP but with the option to attach multiple pdf
> > or
> > > doc files.
>
> > > 2011/9/4 kenji4569 
>
> > > > >the elRTE WYSIWYG Widget does not allow to "import" a file other than
> > an
> > > > >image.
> > > > >It would be nice to import for example a pdf or a doc file
> > > > Thanks for your proposal.
> > > > I think it would be easy to implement it, because the image chooser
> > > > can be customized to anything.
> > > > I'll try to do this.
>
> > > > Kenji
>
> > > > On 9月4日, 午後6:02, António Ramos  wrote:
> > > > > Hello
> > > > > the elRTE WYSIWYG Widget does not allow to "import" a file other than
> > an
> > > > > image.
> > > > > It would be nice to import for example a pdf or a doc file
>
> > > > > Thank you
> > > > > António
>
> > > > > 2011/9/4 kenji4569 
>
> > > > > > >Maybe the actual datepicker could be of some help to figure out
> > how to
> > > > > > make it moves...
> > > > > > Thanks, but I couldn't read the source of the datepicker since it's
> > > > > > compressed (I couldn't find the readable one in the host site).
> > > > > > Other solution might be using jquery.ui.draggable, but it's not so
> > > > > > light as to just make it draggable.
> > > > > > So, for now, I leave the anytime.js unmodified.
>
> > > > > > Kenji
>
> > > > > > On 9月1日, 午後10:53, Richard Vézina 
> > wrote:
> > > > > > > Great!
>
> > > > > > > It nice that you take care of feedback... Don't worry about IE
> > ;-)
>
> > > > > > > For moving, I think it a most have feature since the actual
> > > > datepicker
> > > > > > has
> > > > > > > it...
>
> > > > > > > What has to be done to make it available?
>
> > > > > > > Maybe the actual datepicker could be of some help to figure out
> > how
> > > > to
> > > > > > make
> > > > > > > it moves...
>
> > > > > > > Thank Kenji
>
> > > > > > > Richard
>
> > > > > > > On Thu, Sep 1, 2011 at 6:35 AM, kenji4569 
> > > > wrote:
> > > > > > > > Hi Richard,
>
> > > > > > > > thank you for your feedback.
>
> > > > > > > > >It works great except that it seems to conflict with jQuery UI
> > > > tabs
> > > > > > and
> > > > > > > > dialog...
> > > > > > > > I fixed it (tested Chrome, FF, IE).
> > > > > > > > See:
> > > >http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui
> > > > > > > > (The anytime css should precede the jquery ui css)
>
> > > > > > > > >It no show up when my form are called with LOAD()
> > > > > > > > I also fixed it.
> > > > > > > > See:http://dev.s-cubism.com/plugin_anytime_widget/test/_/load
> > > > > > > > (I implemented a dynamic loader for js and css)
>
> > > > > > > > Note however, since IE(<=8?) could not put a dynamic css before
> > > > loaded
> > > > > > > > css,
> > > > > > > > the conflict for jquery-ui still occurs for IE(<=8?).
> > > > > > > > see:
>
> > > >http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui/load
>
> > > > > > > > >there is no way we can move it like the actual date

[web2py] Re: Web2py in a pure python data acquisition system

2011-09-06 Thread Willoughby
Very cool!  Thanks for sharing...

[web2py] Re: python isn´t in frozen sys.path

2011-09-06 Thread Anthony
If you want to use your own Python installation, then download the web2py 
source code version instead of the Windows binary version. The Windows 
binary version includes its own Python interpreter and standard library and 
won't work with your regular Python installation.

Anthony

On Tuesday, September 6, 2011 10:42:45 AM UTC-4, Ramos wrote:
>
> what is this?
>
> i resolve this issue everytime i restart web2py i go to the shell and
>
> import sys
> del sys.frozen
>
> now i have a need to run a controller function every 5 minutes or so and i 
> dont know how to work around this error
>
>
> thank you
> Antonio
>
>
>

[web2py] views

2011-09-06 Thread Web2Py Freak
i wanna ask you guys  , dose the html files in views should be working
like normal  html pages  .. and anyone can tell me how to publish my
projects ??


[web2py] Re: views

2011-09-06 Thread Anthony
On Tuesday, September 6, 2011 11:05:29 AM UTC-4, Web2Py Freak wrote:
>
> i wanna ask you guys  , dose the html files in views should be working 
> like normal  html pages


Not exactly. They are intended to be processed by the web2py framework, 
which transforms them into standard HTML to be displayed in a browser. Check 
out http://web2py.com/book/default/chapter/04#Dispatching 
and http://web2py.com/book/default/chapter/05.
 

>  .. and anyone can tell me how to publish my 
> projects ??


Do you mean hosting/deployment? Have you looked at 
http://web2py.com/book/default/chapter/11?

Anthony


[web2py] Re: views

2011-09-06 Thread Web2Py Freak
would you take a look at my project and tell me what have i done
wrong ??


Re: [web2py] Re: python isn´t in frozen sys.path

2011-09-06 Thread António Ramos
i´n not using my python instalation
I´m using web2py binaries for windows
the output you saw is from the web2py console,and  not the python command
line



2011/9/6 Anthony 

> If you want to use your own Python installation, then download the web2py
> source code version instead of the Windows binary version. The Windows
> binary version includes its own Python interpreter and standard library and
> won't work with your regular Python installation.
>
> Anthony
>
>
> On Tuesday, September 6, 2011 10:42:45 AM UTC-4, Ramos wrote:
>>
>> what is this?
>>
>> i resolve this issue everytime i restart web2py i go to the shell and
>>
>> import sys
>> del sys.frozen
>>
>> now i have a need to run a controller function every 5 minutes or so and i
>> dont know how to work around this error
>>
>>
>> thank you
>> Antonio
>>
>>
>>


[web2py] Re: views

2011-09-06 Thread Anthony
Sure.

On Tuesday, September 6, 2011 11:22:36 AM UTC-4, Web2Py Freak wrote:
>
> would you take a look at my project and tell me what have i done 
> wrong ?? 
>


Re: [web2py] Re: python isn´t in frozen sys.path

2011-09-06 Thread Anthony
On Tuesday, September 6, 2011 11:25:47 AM UTC-4, Ramos wrote:
>
> i´n not using my python instalation
> I´m using web2py binaries for windows
> the output you saw is from the web2py console,and  not the python command 
> line
>

But I think pythoncom.py is trying to import something that isn't included 
with web2py's binary distribution. If you've got your own Python 
installation, try using the web2py source version instead of the Windows 
binary version (it's just as easy to use -- just unzip, and run the 
web2py.py file instead of the web2py.exe file).

Anthony


Re: [web2py] Re: Published my collection of plugins

2011-09-06 Thread António Ramos
After i upload a file i get a icon in the text.
How do i lauch the file that i just embedded in the text?

Thank you



2011/9/6 kenji4569 

> > web2py gives the file in the download
> > directory for example
> >
> 5e74c950-95b2-4843-b4c6-53bc8efca8fe >
> lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63
> .doc>
> The former random string is a display file name, and just for demo.
> The latter one is an actual file name generated by web2py.
>
> Now, I remove the former, since it's confusing:
> http://dev.s-cubism.com/plugin_elrte_widget
>
> Changing the latter would require much work with deeper inspection
> into the web2py upload mechanism.
>
> Changing the look and feel such as replacing icons would be easier,
> and you should see the file_upload_or_choose() function in the usage
> code of the demo.
>
> Note that I do not implement a ready-made image/file chooser, and you
> have to implement it for your own application, starting from the usage
> code, including setting up your db and defining your image and file
> tables.
>
> Regards,
> Kenji
>
>
> On 9月6日, 午後6:01, António Ramos  wrote:
> > Hello Kenji,
> > Thank you for your fast work
> >
> > One problem!
> > The form is not very friendly.
> >
> > In the submit form i choose a pdf for example myfile.pdf but in the name
> > field you write the name that web2py gives the file in the download
> > directory for example
> >
> 5e74c950-95b2-4843-b4c6-53bc8efca8fe lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63
> .doc>
> > This has no meaning to the user!
> >
> > Please see attached file for what i think it would be really helpfull.
> >
> > Thank you again
> >
> > António
> >
> > 2011/9/6 kenji4569 
> >
> >
> >
> >
> >
> >
> >
> > > Hi António,
> >
> > > I implemented a file chooser for the elrte widget.
> > > Please try it:
> > >http://dev.s-cubism.com/plugin_elrte_widget
> >
> > > Since the file chooser is very primitive, you may need to customize
> > > it.
> > > But, the customization would be easy with the expressive power of
> > > web2py (see the demo code).
> > > (Notice: I applied a small patch for the original elrte.js to make the
> > > file chooser available.)
> >
> > > Thanks again for your valuable feedback,
> > > Kenji
> >
> > > On 9月4日, 午後8:01, António Ramos  wrote:
> > > > Thank you.
> > > > I realy need your plugin ASAP but with the option to attach multiple
> pdf
> > > or
> > > > doc files.
> >
> > > > 2011/9/4 kenji4569 
> >
> > > > > >the elRTE WYSIWYG Widget does not allow to "import" a file other
> than
> > > an
> > > > > >image.
> > > > > >It would be nice to import for example a pdf or a doc file
> > > > > Thanks for your proposal.
> > > > > I think it would be easy to implement it, because the image chooser
> > > > > can be customized to anything.
> > > > > I'll try to do this.
> >
> > > > > Kenji
> >
> > > > > On 9月4日, 午後6:02, António Ramos  wrote:
> > > > > > Hello
> > > > > > the elRTE WYSIWYG Widget does not allow to "import" a file other
> than
> > > an
> > > > > > image.
> > > > > > It would be nice to import for example a pdf or a doc file
> >
> > > > > > Thank you
> > > > > > António
> >
> > > > > > 2011/9/4 kenji4569 
> >
> > > > > > > >Maybe the actual datepicker could be of some help to figure
> out
> > > how to
> > > > > > > make it moves...
> > > > > > > Thanks, but I couldn't read the source of the datepicker since
> it's
> > > > > > > compressed (I couldn't find the readable one in the host site).
> > > > > > > Other solution might be using jquery.ui.draggable, but it's not
> so
> > > > > > > light as to just make it draggable.
> > > > > > > So, for now, I leave the anytime.js unmodified.
> >
> > > > > > > Kenji
> >
> > > > > > > On 9月1日, 午後10:53, Richard Vézina 
> > > wrote:
> > > > > > > > Great!
> >
> > > > > > > > It nice that you take care of feedback... Don't worry about
> IE
> > > ;-)
> >
> > > > > > > > For moving, I think it a most have feature since the actual
> > > > > datepicker
> > > > > > > has
> > > > > > > > it...
> >
> > > > > > > > What has to be done to make it available?
> >
> > > > > > > > Maybe the actual datepicker could be of some help to figure
> out
> > > how
> > > > > to
> > > > > > > make
> > > > > > > > it moves...
> >
> > > > > > > > Thank Kenji
> >
> > > > > > > > Richard
> >
> > > > > > > > On Thu, Sep 1, 2011 at 6:35 AM, kenji4569 <
> hos...@s-cubism.jp>
> > > > > wrote:
> > > > > > > > > Hi Richard,
> >
> > > > > > > > > thank you for your feedback.
> >
> > > > > > > > > >It works great except that it seems to conflict with
> jQuery UI
> > > > > tabs
> > > > > > > and
> > > > > > > > > dialog...
> > > > > > > > > I fixed it (tested Chrome, FF, IE).
> > > > > > > > > See:
> > > > >http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui
> > > > > > > > > (The anytime css should precede the jquery ui css)
> >
> > > > > > > > > >It no show up when my form are called with LOAD()
> > > > > > > > > I also fixed it.
> > > > > > > > > 

[web2py] Re: python isn´t in frozen sys.path

2011-09-06 Thread Matt Gorecki
I'm not sure about the error, but in that screenshot you are running
version 1.90.  Try doing a mercurial pull/update.  You should end up
with version 1.98.2.

Matt

On Sep 6, 9:54 am, António Ramos  wrote:
> ok, doing that i got another error
>
> sorry
>
> 2011/9/6 Anthony 
>
>
>
>
>
>
>
> > On Tuesday, September 6, 2011 11:25:47 AM UTC-4, Ramos wrote:
>
> >> i´n not using my python instalation
> >> I´m using web2py binaries for windows
> >> the output you saw is from the web2py console,and  not the python command
> >> line
>
> > But I think pythoncom.py is trying to import something that isn't included
> > with web2py's binary distribution. If you've got your own Python
> > installation, try using the web2py source version instead of the Windows
> > binary version (it's just as easy to use -- just unzip, and run the
> > web2py.py file instead of the web2py.exe file).
>
> > Anthony
>
>
>
>  error.jpg
> 72KViewDownload


[web2py] Re: views

2011-09-06 Thread Web2Py Freak
dear anthony,
what happened with you ??


Re: [web2py] Re: python isn´t in frozen sys.path

2011-09-06 Thread António Ramos
Working now!
updated to 1.98.2



2011/9/6 Matt Gorecki 

> I'm not sure about the error, but in that screenshot you are running
> version 1.90.  Try doing a mercurial pull/update.  You should end up
> with version 1.98.2.
>
> Matt
>
> On Sep 6, 9:54 am, António Ramos  wrote:
> > ok, doing that i got another error
> >
> > sorry
> >
> > 2011/9/6 Anthony 
> >
> >
> >
> >
> >
> >
> >
> > > On Tuesday, September 6, 2011 11:25:47 AM UTC-4, Ramos wrote:
> >
> > >> i´n not using my python instalation
> > >> I´m using web2py binaries for windows
> > >> the output you saw is from the web2py console,and  not the python
> command
> > >> line
> >
> > > But I think pythoncom.py is trying to import something that isn't
> included
> > > with web2py's binary distribution. If you've got your own Python
> > > installation, try using the web2py source version instead of the
> Windows
> > > binary version (it's just as easy to use -- just unzip, and run the
> > > web2py.py file instead of the web2py.exe file).
> >
> > > Anthony
> >
> >
> >
> >  error.jpg
> > 72KViewDownload


Re: [web2py] Re: Cannot operate on a closed database

2011-09-06 Thread appydev
Why not so with: request = current.request?

Is it safe to use the following?

# modules/myobjects.py
from gluon import *
request,session,response,T,cache =
current.request,current.session,current.response,current.T,current.cache

and then use some class method :

if form.accepts(request, session):

Or rather it is better to use directly:

if form.accepts(current.request, current.session):



Do not think of something analogous to this affirmation made for the db
object?

the problem is that the latter statement is done at top leve therefor

it is only executed once when the module is imported by the first http

request. The module is then cached in ram and that line is no longer

executed. Therefore db is not the current thread local database

object but it is a reference to the db object of the first http

request which by now may be closed. You cannot extract objects from

the thread local "current" when you import the module, you have to do

it inside functions called when a controller is executed.


I apologize for my English.



2011/6/26 Massimo Di Pierro 

> I found the cause it this problem. It is not a bug in web2py but
> something to be careful about in your programs.
>
> You have a models/meteo.py which imports modules/meteo.py.
>
> models/meteo.py does
>
>   current.database = db
>
> and modules/mete.py does
>
>   db = current.database
>
> the problem is that the latter statement is done at top leve therefor
> it is only executed once when the module is imported by the first http
> request. The module is then cached in ram and that line is no longer
> executed. Therefore db is not the current thread local database
> object but it is a reference to the db object of the first http
> request which by now may be closed. You cannot extract objects from
> the thread local "current" when you import the module, you have to do
> it inside functions called when a controller is executed.
>
> Hope this makes sense.
>
>
>
> On Jun 24, 10:31 am, Manuele Pesenti 
> wrote:
> > dear all,
> > I've added a unique field to some existing tables and w2p gave me an
> > error saing that he cannot add unique fields to a table so I deleted my
> > db and restarted as a new application but I obtained this:
> >
> > ProgrammingError: Cannot operate on a closed database.
> >
> > it's sufficient to comment out the property unique=True and no errors
> > occurs.
> >
> > Here under you can find the complete traceback.
> > Any suggestion??
> >
> > Thanks a lot
> >
> > Manuele
> >
> > Traceback (most recent call last):
> >File
> > "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/restricted.py", line
> > 192, in restricted
> >  exec ccode in environment
> >File
> >
> "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/applications/wind2pow2/contro
> llers/appadmin.py",
> > line 410, in 
> >File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/globals.py",
> > line 137, in 
> >  self._caller = lambda f: f()
> >File
> >
> "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/applications/wind2pow2/contro
> llers/appadmin.py",
> > line 126, in insert
> >  form = SQLFORM(db[table], ignore_rw=ignore_rw)
> >File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/sqlhtml.py",
> > line 817, in __init__
> >  inp = self.widgets.options.widget(field, default)
> >File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/sqlhtml.py",
> > line 206, in widget
> >  options = requires[0].options()
> >File
> > "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/validators.py", line
> > 438, in options
> >  self.build_set()
> >File
> > "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/validators.py", line
> > 426, in build_set
> >  records = self.dbset.select(*fields, **dd)
> >File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/dal.py",
> > line 5382, in select
> >  return self.db._adapter.select(self.query,fields,attributes)
> >File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/dal.py",
> > line 1159, in select
> >  rows = response(sql)
> >File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/dal.py",
> > line 1149, in response
> >  self.execute(sql)
> >File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/dal.py",
> > line 1234, in execute
> >  return self.log_execute(*a, **b)
> >File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/dal.py",
> > line 1229, in log_execute
> >  ret = self.cursor.execute(*a,**b)
> > ProgrammingError: Cannot operate on a closed database.
>


[web2py] Re: views

2011-09-06 Thread Anthony
On Tuesday, September 6, 2011 12:15:41 PM UTC-4, Web2Py Freak wrote:
>
> dear anthony, 
> what happened with you ??


What do you mean? 


[web2py] Re: python isn´t in frozen sys.path

2011-09-06 Thread Anthony
I think the problem was that back in version 1.90, you had to do 
auth=Auth(globals(),db) 
-- with the introduction of the new thread local 'current' object, 
auth=Auth(db) can be used instead, but trying that with an older version 
will result in this error.

Anthony

On Tuesday, September 6, 2011 12:02:35 PM UTC-4, Matt Gorecki wrote:
>
> I'm not sure about the error, but in that screenshot you are running 
> version 1.90.  Try doing a mercurial pull/update.  You should end up 
> with version 1.98.2. 
>
> Matt 
>
> On Sep 6, 9:54 am, António Ramos  wrote: 
> > ok, doing that i got another error 
> > 
> > sorry 
> > 
> > 2011/9/6 Anthony  
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > On Tuesday, September 6, 2011 11:25:47 AM UTC-4, Ramos wrote: 
> > 
> > >> i´n not using my python instalation 
> > >> I´m using web2py binaries for windows 
> > >> the output you saw is from the web2py console,and  not the python 
> command 
> > >> line 
> > 
> > > But I think pythoncom.py is trying to import something that isn't 
> included 
> > > with web2py's binary distribution. If you've got your own Python 
> > > installation, try using the web2py source version instead of the 
> Windows 
> > > binary version (it's just as easy to use -- just unzip, and run the 
> > > web2py.py file instead of the web2py.exe file). 
> > 
> > > Anthony 
> > 
> > 
> > 
> >  error.jpg 
> > 72KViewDownload



[web2py] short but useful facebook api info

2011-09-06 Thread Massimo Di Pierro
http://blog.carduner.net/2011/09/06/easy-facebook-scripting-in-python/


[web2py] Re: deploying web2py on IIS

2011-09-06 Thread Massimo Di Pierro
I am not a windows user s I am just reposting somebody else info.

I guess web2py goes in

C:\inetpub\wwwroot\web2py

and you start it from there

cd C:\inetpub\wwwroot\web2py
c:/python/python.exe web2py -p 8000 -i 127.0.0.1 -a 'password'

C:\inetpub\wwwroot\web2py\Web.config  is the only file you need to
extract from http://managedfusion.com/

On Sep 6, 9:03 am, Massimo Di Pierro 
wrote:
> Try this and please report errors.
>
> Start web2py as usual on port 8000
>
> python web2py -p 8000 -i 127.0.0.1 -a 'password'
>
> Create:
> C:\inetpub\wwwroot\web2py
> C:\inetpub\wwwroot\web2py\bin
> Downloadhttp://managedfusion.com/and extract
> C:\inetpub\wwwroot\web2py\Web.config
>
> Create C:\inetpub\wwwroot\web2py\ManagedFusion.Rewriter.txt
> and in it write:
>
> RewriteEngine On
> RewriteCond %{HTTP_HOST} ^yourdomain.com$ [NC]
> RewriteRule ^(.*)$http://localhost:8000$1[P,QSA,L]
>
> On Sep 6, 5:03 am, Web2Py Freak  wrote:
>
>
>
>
>
>
>
> > how can i deploy web2py on IIS ??


[web2py] Re: views

2011-09-06 Thread Massimo Di Pierro
This was a funny exchange!

On Sep 6, 11:47 am, Anthony  wrote:
> On Tuesday, September 6, 2011 12:15:41 PM UTC-4, Web2Py Freak wrote:
>
> > dear anthony,
> > what happened with you ??
>
> What do you mean?


[web2py] How to connect DB2 with Python pyodbc

2011-09-06 Thread Omi Chiba
I posted the step by step instruction in my blog.
http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-pyodbc.html


[web2py] Re: views

2011-09-06 Thread Web2Py Freak
hehe i know massimo  but u can imagine how lost i am now


[web2py] Using a lambda to set a default

2011-09-06 Thread Lennon
I'm try to use a lambda to set a default value based on a value in
another table.  Here is my model:

db.define_table('trip_instance', timestamp, sos_table,
Field('trip_type_id',  db.trip_type, label='Trip Type',
widget=trip_select_widget, requires = IS_IN_DB(db, 'trip_type.id', '%
(name)s'), represent=lambda id:db.trip_type(id)['name']),
Field('total_slots', 'integer', default=lambda r:
db.trip_type(r.trip_type_id)['total_slots']),

Locally this causes an error that says:

TypeError: () takes exactly 1 argument (0 given)

And on my server (Linode) there is no error but when I try and create
a new trip instance with sqlform the total slots field is pre-
populated with this:

 at 0x7f27684b7140>

My lambda looks almost identical to the one that works fine for
represent in the trip_type_id field except I'm using the table instead
of the field.  Is that what I'm doing wrong?



[web2py] When does web2py close database sessions

2011-09-06 Thread Andrew
Hi,
The book describes connection pooling and when new sessions are
created, but when are they closed ?
If I do not have connection pooling turned on, will the session close
after each request ?
I am trying to determine if I can make use of dynamically created
volatile tables in the database.  The key is that they only persist
and can be accessed within a database session.

I thought I would try setting my connection pool to 1 to only get a
single session, but will it stay open for later requests ?Note,
user concurrency is not an issue for this scenario.

Thanks


[web2py] windows xp and source web2py

2011-09-06 Thread Christopher Baron
Hi web2py users,


I'm running a web2py server on a windows xp machine.  Let's call it
the kiosk machine.  The kiosk machine has a static IP.  I am able to
ping the kiosk machine from other computers on the network.  However,
I'm unable to send an http request from a computer on the network to
the kiosk machine.  These are not administrative web pages.

Why is this?


I'm happy to provide more information if needed, thanks in advance.

Chris


[web2py] Re: CAS Auth redirect loop

2011-09-06 Thread Bruno Codeman
Any news about it?

On 31 ago, 18:08, Jay  wrote:
> The only comment I have is that there may be problem in the code at
> redirect. Raising an exception in redirect does not seem to work. I
> would look there.
> My $.02.
>
> Jay


[web2py] blog post on web2py + db2

2011-09-06 Thread Massimo Di Pierro
http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-pyodbc.html


[web2py] Re: windows xp and source web2py

2011-09-06 Thread Massimo Di Pierro
How are you starting web2py?

You should be using

python.exe web2py.py -i 0.0.0.0 -p 80

0.0.0.0 means accessible publicly (if no firewall) and -p 80 sets the
port.

On Sep 6, 2:15 pm, Christopher Baron  wrote:
> Hi web2py users,
>
> I'm running a web2py server on a windows xp machine.  Let's call it
> the kiosk machine.  The kiosk machine has a static IP.  I am able to
> ping the kiosk machine from other computers on the network.  However,
> I'm unable to send an http request from a computer on the network to
> the kiosk machine.  These are not administrative web pages.
>
> Why is this?
>
> I'm happy to provide more information if needed, thanks in advance.
>
> Chris


Re: [web2py] short but useful facebook api info

2011-09-06 Thread Bruno Rocha
On Tue, Sep 6, 2011 at 2:41 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> http://blog.carduner.net/2011/09/06/easy-facebook-scripting-in-python/



Awesome! Thanks for sharing it.

I added it classes in facebook.py, now I have a more complete facebok graph
API. How easy is to upload entire photo albums to facebook in one line of
code.

Great!

Thank you.


[web2py] Re: windows xp and source web2py

2011-09-06 Thread Christopher Baron
Ah, I see, thanks.

This allows remote machines to hit the server, but the request
receives a 200.

Let's say this machine is on a secure network.

If I wanted to hack web2py so that remote machines on the network
could access the application, could I simply uncomment line 17 from
applications/models/access.py ?

#raise HTTP(200, T('Admin is disabled because insecure channel'))


On Sep 6, 2:40 pm, Massimo Di Pierro 
wrote:
> How are you starting web2py?
>
> You should be using
>
> python.exe web2py.py -i 0.0.0.0 -p 80
>
> 0.0.0.0 means accessible publicly (if no firewall) and -p 80 sets the
> port.
>
> On Sep 6, 2:15 pm, Christopher Baron  wrote:
>
>
>
>
>
>
>
> > Hi web2py users,
>
> > I'm running a web2py server on a windows xp machine.  Let's call it
> > the kiosk machine.  The kiosk machine has a static IP.  I am able to
> > ping the kiosk machine from other computers on the network.  However,
> > I'm unable to send an http request from a computer on the network to
> > the kiosk machine.  These are not administrative web pages.
>
> > Why is this?
>
> > I'm happy to provide more information if needed, thanks in advance.
>
> > Chris


[web2py] Date Picker Widget

2011-09-06 Thread David

Wondering if anyone saw any new neat date picker widgets lately?

Also;

How hard would it be to replace the current date picker with jquery-ui 
datepicker?


Thanks.




[web2py] Re: views

2011-09-06 Thread pbreit
Freak, have you read the web2py book? There's a lot of information about views 
and how to deploy web2py. It's goin to be difficult to explain those topics 
here in google groups.


[web2py] Re: button calling a action

2011-09-06 Thread pbreit
That's how regular web2py form handling works.


Re: [web2py] blog post on web2py + db2

2011-09-06 Thread António Ramos
Great
i tested the example from the python shell and i connected to my company
AS400 with success.

FANTASTIC

Tomorrow i will kick the ass of the RPG guy.

:)



2011/9/6 Massimo Di Pierro 

>
> http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-pyodbc.html


Re: [web2py] blog post on web2py + db2

2011-09-06 Thread António Ramos
I tried the DAL Example and i could not connect to my AS400
does the DAL only works with db2 on windows or linux?

i have my db2 in a OS400 machine


Thank you

António

Em 6 de setembro de 2011 21:56, António Ramos escreveu:

> Great
> i tested the example from the python shell and i connected to my company
> AS400 with success.
>
> FANTASTIC
>
> Tomorrow i will kick the ass of the RPG guy.
>
> :)
>
>
>
> 2011/9/6 Massimo Di Pierro 
>
>>
>> http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-pyodbc.html
>
>
>


[web2py] Re: Date Picker Widget

2011-09-06 Thread ron_m
I didn't replace the one in web2py, I just use the jQueryUI one by including 
the necessary CSS and JS files and placing the files in static/js and 
static/css after downloading a custom build from jQueryUI

In the view where it is needed I add these lines before the extend 
'layout.html' line

{{response.files.append(URL('static','css/cupertino/jquery-ui-1.8.14.custom.css'))}}
{{response.files.append(URL('static','js/jquery-ui-1.8.14.custom.min.js'))}}



[web2py] Re: Date Picker Widget

2011-09-06 Thread Anthony
Have you seen this: http://dev.s-cubism.com/plugin_anytime_widget?


On Tuesday, September 6, 2011 4:40:49 PM UTC-4, David J wrote:
>
> Wondering if anyone saw any new neat date picker widgets lately?
>
> Also;
>
> How hard would it be to replace the current date picker with jquery-ui 
> datepicker?
>
> Thanks.
>
>
>

[web2py] Re: blog post on web2py + db2

2011-09-06 Thread Omi Chiba
No, you can connect to the OS400 machine (Actually, that's where I
tested)
Check your "System:" name ,"SQL default library:" name, user id and
password.

If your machine can start session with iSeries Access then you can
connect.

On Sep 6, 4:07 pm, António Ramos  wrote:
> I tried the DAL Example and i could not connect to my AS400
> does the DAL only works with db2 on windows or linux?
>
> i have my db2 in a OS400 machine
>
> Thank you
>
> António
>
> Em 6 de setembro de 2011 21:56, António Ramos escreveu:
>
>
>
>
>
>
>
> > Great
> > i tested the example from the python shell and i connected to my company
> > AS400 with success.
>
> > FANTASTIC
>
> > Tomorrow i will kick the ass of the RPG guy.
>
> > :)
>
> > 2011/9/6 Massimo Di Pierro 
>
> >>http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-p...


Re: [web2py] Re: Date Picker Widget

2011-09-06 Thread Bruno Rocha
>
>
> {{response.files.append(URL('static','css/cupertino/jquery-ui-1.8.14.custom.css'))}}
>
> {{response.files.append(URL('static','js/jquery-ui-1.8.14.custom.min.js'))}}
>



I included the files above and also changed web2py_ajax.js[0] a bit

As you can see in line 37 I kept the default calendar only when form is
enclosed in .w2pcalendar class, when form has .uicalendar css class It loads
jquery-ui calendar as you can see in lines 40-65


[0]https://gist.github.com/1199030


Re: [web2py] Re: blog post on web2py + db2

2011-09-06 Thread Jim Steil
Works for me.  I'm running from source using trunk from a week or so 
ago.  Did not work for me when running on windows running web2py.exe.  
Probably has to do with PyODBC not being available unless you have it in 
the modules directory.  Just a thought


-Jim

On 9/6/2011 4:32 PM, Omi Chiba wrote:

No, you can connect to the OS400 machine (Actually, that's where I
tested)
Check your "System:" name ,"SQL default library:" name, user id and
password.

If your machine can start session with iSeries Access then you can
connect.

On Sep 6, 4:07 pm, António Ramos  wrote:

I tried the DAL Example and i could not connect to my AS400
does the DAL only works with db2 on windows or linux?

i have my db2 in a OS400 machine

Thank you

António

Em 6 de setembro de 2011 21:56, António Ramosescreveu:








Great
i tested the example from the python shell and i connected to my company
AS400 with success.
FANTASTIC
Tomorrow i will kick the ass of the RPG guy.
:)
2011/9/6 Massimo Di Pierro

http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-p...


Re: [web2py] blog post on web2py + db2

2011-09-06 Thread António Ramos
Ok, seems to get someting now.

I have to change in AS400 the permissions to allow my username to create a
table


ProgrammingError: ('42000', '[42000] [IBM][Controlador ODBC do iSeries
Access][DB2 UDB]SQL0551 - Not authorized to object  in *N type *USRPRF.
(-551) (SQLExecDirectW)')

How about using auth with as400 users. Is it possible?

Thank you


Em 6 de setembro de 2011 22:07, António Ramos escreveu:

> I tried the DAL Example and i could not connect to my AS400
> does the DAL only works with db2 on windows or linux?
>
> i have my db2 in a OS400 machine
>
>
> Thank you
>
> António
>
> Em 6 de setembro de 2011 21:56, António Ramos escreveu:
>
> Great
>> i tested the example from the python shell and i connected to my company
>> AS400 with success.
>>
>> FANTASTIC
>>
>> Tomorrow i will kick the ass of the RPG guy.
>>
>> :)
>>
>>
>>
>> 2011/9/6 Massimo Di Pierro 
>>
>>>
>>> http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-pyodbc.html
>>
>>
>>
>


[web2py] Re: short but useful facebook api info

2011-09-06 Thread Massimo Di Pierro
Shall we include it contrib? if no dependencies

On Sep 6, 2:59 pm, Bruno Rocha  wrote:
> On Tue, Sep 6, 2011 at 2:41 PM, Massimo Di Pierro <
>
> massimo.dipie...@gmail.com> wrote:
> >http://blog.carduner.net/2011/09/06/easy-facebook-scripting-in-python/
>
> Awesome! Thanks for sharing it.
>
> I added it classes in facebook.py, now I have a more complete facebok graph
> API. How easy is to upload entire photo albums to facebook in one line of
> code.
>
> Great!
>
> Thank you.


[web2py] Re: button calling a action

2011-09-06 Thread Massimo Di Pierro
you can do {{=A('clickme',callback=URL())}}

and the URL is called via ajax. You can also pass a target="..." the
id of a DIV where to post the result and a delete='tr' which will
delete the tr including the link.

On Sep 6, 3:51 pm, pbreit  wrote:
> That's how regular web2py form handling works.


[web2py] Re: Date Picker Widget

2011-09-06 Thread Niphlod
I use jquery datetimepicker (from 
http://trentrichardson.com/examples/timepicker/)

Seems to work OK, but I use only ISO "style" data inputs  using
internationalizations is probably only a matter of time spent on the
initialization on timeFormat and dateFormat

excerpt from web2py_ajax.js 


try { jQuery("input.datetime").datetimepicker({
  timeFormat: 'hh:mm:ss',
  dateFormat : 'yy-mm-dd',
  showOtherMonths: true,
  selectOtherMonths: true
  });
  } catch(e) {};
  try { jQuery("input.date").datepicker({
  dateFormat : 'yy-mm-dd',
  showOtherMonths: true,
  selectOtherMonths: true
   });
   } catch(e) {};
   try { jQuery("input.time").timepicker({
  timeFormat: 'hh:mm:ss'
  });
   } catch(e) {};

.



Re: [web2py] Re: short but useful facebook api info

2011-09-06 Thread Bruno Rocha
There is no dependency, I just put fbconsole.py in my /modules and did
something like this:

import fbconsole
fbconsole.APP_ID = CLIENT_ID # comes from facebook auth, (Michelle's
code)
fbconsole.SERVER_PORT = 8000
fbconsole.REDIRECT_URI = 'http://localhost:%s/tutor' %
fbconsole.SERVER_PORT
fbconsole.ACCESS_TOKEN = session.token['access_token'] # I am already
using facebook for auth, no need to Auth again.
fbconsole.LOCAL_FILE = '%s_fb_access_token' % auth.user_id
fbconsole.AUTH_SCOPE =
['publish_stream,create_event,user_events,user_photos']
photo = fbconsole.graph_post("/me/photos", {"message":"My Photo",
"source":open("/home/rochacbruno/myphoto.png")})

I think it is a good idea to have it in contrib!


[web2py] contrib module for cache stored in redis

2011-09-06 Thread Niphlod
I think I have a first working draft for using redis as a backend for
cache like gluon.contrib.memcache 

I dind't get completely the internals of cache, though .

storing with 'predefined' keys works ok, and also the expire works out
of the box.

I removed the mutex lock found in other cache backends because I think
redis ensures atomic operations and avoids conflicts "out of the box".

According to https://github.com/andymccurdy/redis-py connections are
managed by the module itself , but that needs testing (I can see
connections created and dropped regularly, so it's not leaking
incrementally, but on overloaded systems I can't tell)

Caching values with fixed keys works, caching selects works, use as
decorator works 

I didn't quite get all the self.meta_storage use  can someone
explain to me ?


[web2py] 500 INTERNAL SERVER ERROR

2011-09-06 Thread patrick moon
I'm able to connect to mssql using python and in test mode.

but I'm getting the 500 internal server errroris there a way to
figure out what the problem is?

log looks pretty messy.  I'm was trying to get json back from mssql.
Was successful under mysql.  json format does not seem to be
anydifferent under either one.



Re: [web2py] 500 INTERNAL SERVER ERROR

2011-09-06 Thread Ivica Kralj
Yea, Inapplications admin page, on top right you will find error log button
in the menu (or link https://127.0.0.1:8000/admin/default/errors/APPNAME)

Also It might be useful to use Firebug, (i.i network, script)

Cheers
good luck


On 7 September 2011 01:08, patrick moon  wrote:

> I'm able to connect to mssql using python and in test mode.
>
> but I'm getting the 500 internal server errroris there a way to
> figure out what the problem is?
>
> log looks pretty messy.  I'm was trying to get json back from mssql.
> Was successful under mysql.  json format does not seem to be
> anydifferent under either one.
>
>


[web2py] Re: Published my collection of plugins

2011-09-06 Thread kenji4569
> After i upload a file i get a icon in the text.
> How do i lauch the file that i just embedded in the text?
The elrte editor prevents the icon link from clicking to download the
file.
So you have to first submit the editing html,
and save the html in db,
and then display the html in the view (as {{=XML(record.text)}}).
But currently, the demo do not demonstrate this (so you need to
implement this on your app).
In the meantime, you can check the html source from the editor by
clicking the "source" tab at the bottom of the editor.

Kenji


On 9月7日, 午前1:02, António Ramos  wrote:
> After i upload a file i get a icon in the text.
> How do i lauch the file that i just embedded in the text?
>
> Thank you
>
> 2011/9/6 kenji4569 
>
>
>
>
>
>
>
> > > web2py gives the file in the download
> > > directory for example
>
> > 5e74c950-95b2-4843-b4c6-53bc8efca8fe
> > lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63
> > .doc>
> > The former random string is a display file name, and just for demo.
> > The latter one is an actual file name generated by web2py.
>
> > Now, I remove the former, since it's confusing:
> >http://dev.s-cubism.com/plugin_elrte_widget
>
> > Changing the latter would require much work with deeper inspection
> > into the web2py upload mechanism.
>
> > Changing the look and feel such as replacing icons would be easier,
> > and you should see the file_upload_or_choose() function in the usage
> > code of the demo.
>
> > Note that I do not implement a ready-made image/file chooser, and you
> > have to implement it for your own application, starting from the usage
> > code, including setting up your db and defining your image and file
> > tables.
>
> > Regards,
> > Kenji
>
> > On 9月6日, 午後6:01, António Ramos  wrote:
> > > Hello Kenji,
> > > Thank you for your fast work
>
> > > One problem!
> > > The form is not very friendly.
>
> > > In the submit form i choose a pdf for example myfile.pdf but in the name
> > > field you write the name that web2py gives the file in the download
> > > directory for example
>
> > 5e74c950-95b2-4843-b4c6-53bc8efca8fe > lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63
> > .doc>
> > > This has no meaning to the user!
>
> > > Please see attached file for what i think it would be really helpfull.
>
> > > Thank you again
>
> > > António
>
> > > 2011/9/6 kenji4569 
>
> > > > Hi António,
>
> > > > I implemented a file chooser for the elrte widget.
> > > > Please try it:
> > > >http://dev.s-cubism.com/plugin_elrte_widget
>
> > > > Since the file chooser is very primitive, you may need to customize
> > > > it.
> > > > But, the customization would be easy with the expressive power of
> > > > web2py (see the demo code).
> > > > (Notice: I applied a small patch for the original elrte.js to make the
> > > > file chooser available.)
>
> > > > Thanks again for your valuable feedback,
> > > > Kenji
>
> > > > On 9月4日, 午後8:01, António Ramos  wrote:
> > > > > Thank you.
> > > > > I realy need your plugin ASAP but with the option to attach multiple
> > pdf
> > > > or
> > > > > doc files.
>
> > > > > 2011/9/4 kenji4569 
>
> > > > > > >the elRTE WYSIWYG Widget does not allow to "import" a file other
> > than
> > > > an
> > > > > > >image.
> > > > > > >It would be nice to import for example a pdf or a doc file
> > > > > > Thanks for your proposal.
> > > > > > I think it would be easy to implement it, because the image chooser
> > > > > > can be customized to anything.
> > > > > > I'll try to do this.
>
> > > > > > Kenji
>
> > > > > > On 9月4日, 午後6:02, António Ramos  wrote:
> > > > > > > Hello
> > > > > > > the elRTE WYSIWYG Widget does not allow to "import" a file other
> > than
> > > > an
> > > > > > > image.
> > > > > > > It would be nice to import for example a pdf or a doc file
>
> > > > > > > Thank you
> > > > > > > António
>
> > > > > > > 2011/9/4 kenji4569 
>
> > > > > > > > >Maybe the actual datepicker could be of some help to figure
> > out
> > > > how to
> > > > > > > > make it moves...
> > > > > > > > Thanks, but I couldn't read the source of the datepicker since
> > it's
> > > > > > > > compressed (I couldn't find the readable one in the host site).
> > > > > > > > Other solution might be using jquery.ui.draggable, but it's not
> > so
> > > > > > > > light as to just make it draggable.
> > > > > > > > So, for now, I leave the anytime.js unmodified.
>
> > > > > > > > Kenji
>
> > > > > > > > On 9月1日, 午後10:53, Richard Vézina 
> > > > wrote:
> > > > > > > > > Great!
>
> > > > > > > > > It nice that you take care of feedback... Don't worry about
> > IE
> > > > ;-)
>
> > > > > > > > > For moving, I think it a most have feature since the actual
> > > > > > datepicker
> > > > > > > > has
> > > > > > > > > it...
>
> > > > > > > > > What has to be done to make it available?
>
> > > > > > > > > Maybe the actual datepicker could be of some help to figure
> > out
> > > > how
> > > > > > to
> > > > > > > > make
> > > > > > > > > it moves...
>
> > >

[web2py] Re: blog post on web2py + db2

2011-09-06 Thread Omi Chiba
>How about using auth with as400 users. Is it possible?
I'm not sure about it since I'm still new for web2py but your problem
should be related to the permission just like your error says.

My library is like...

Object secured by authorization list  . . . . . . . . . . . .
*NONE
 
Object
UserGroup
Authority
*PUBLIC
*CHANGE
QSECOFR
*ALL

and my user has...
Special authority  . . . . . . . SPCAUT *ALLOBJ

Maybe create new library and connect with the most high authority user
might help.




On Sep 6, 4:49 pm, António Ramos  wrote:
> Ok, seems to get someting now.
>
> I have to change in AS400 the permissions to allow my username to create a
> table
>
> ProgrammingError: ('42000', '[42000] [IBM][Controlador ODBC do iSeries
> Access][DB2 UDB]SQL0551 - Not authorized to object  in *N type *USRPRF.
> (-551) (SQLExecDirectW)')
>
> How about using auth with as400 users. Is it possible?
>
> Thank you
>
> Em 6 de setembro de 2011 22:07, António Ramos escreveu:
>
>
>
>
>
>
>
> > I tried the DAL Example and i could not connect to my AS400
> > does the DAL only works with db2 on windows or linux?
>
> > i have my db2 in a OS400 machine
>
> > Thank you
>
> > António
>
> > Em 6 de setembro de 2011 21:56, António Ramos 
> > escreveu:
>
> > Great
> >> i tested the example from the python shell and i connected to my company
> >> AS400 with success.
>
> >> FANTASTIC
>
> >> Tomorrow i will kick the ass of the RPG guy.
>
> >> :)
>
> >> 2011/9/6 Massimo Di Pierro 
>
> >>>http://ochiba77.blogspot.com/2011/09/how-to-connect-db2-with-python-p...


[web2py] Re: short but useful facebook api info

2011-09-06 Thread Massimo Di Pierro
Please send me a patch. Make sure it includes is own license (MIT, BSD
or LGPL).

On Sep 6, 6:07 pm, Bruno Rocha  wrote:
> There is no dependency, I just put fbconsole.py in my /modules and did
> something like this:
>
>     import fbconsole
>     fbconsole.APP_ID = CLIENT_ID # comes from facebook auth, (Michelle's
> code)
>     fbconsole.SERVER_PORT = 8000
>     fbconsole.REDIRECT_URI = 'http://localhost:%s/tutor'%
> fbconsole.SERVER_PORT
>     fbconsole.ACCESS_TOKEN = session.token['access_token'] # I am already
> using facebook for auth, no need to Auth again.
>     fbconsole.LOCAL_FILE = '%s_fb_access_token' % auth.user_id
>     fbconsole.AUTH_SCOPE =
> ['publish_stream,create_event,user_events,user_photos']
>     photo = fbconsole.graph_post("/me/photos", {"message":"My Photo",
> "source":open("/home/rochacbruno/myphoto.png")})
>
> I think it is a good idea to have it in contrib!


[web2py] Re: contrib module for cache stored in redis

2011-09-06 Thread Massimo Di Pierro
meta_storage is a dict and a class variable (there is only one for all
apps). Given one app meta_storage[app] is the dictionary that stores
that cache for that app.

You do not need this if you use a third party cache system but make
sure the generated keys includes a prefix that avoids conflicts
between apps.

On Sep 6, 6:42 pm, Niphlod  wrote:
> I think I have a first working draft for using redis as a backend for
> cache like gluon.contrib.memcache 
>
> I dind't get completely the internals of cache, though .
>
> storing with 'predefined' keys works ok, and also the expire works out
> of the box.
>
> I removed the mutex lock found in other cache backends because I think
> redis ensures atomic operations and avoids conflicts "out of the box".
>
> According tohttps://github.com/andymccurdy/redis-pyconnections are
> managed by the module itself , but that needs testing (I can see
> connections created and dropped regularly, so it's not leaking
> incrementally, but on overloaded systems I can't tell)
>
> Caching values with fixed keys works, caching selects works, use as
> decorator works 
>
> I didn't quite get all the self.meta_storage use  can someone
> explain to me ?


[web2py] Re: deploying web2py on IIS

2011-09-06 Thread Brian M
Perhaps check out web2pyslices.com -- 
http://www.web2pyslices.com/slices/take_slice/128 "Install web2py  on 
Windows with IIS"

I haven't tried it (I just use the built-in rocket server or apache + 
mod_wsgi even on windows)

Good Luck

~Brian


[web2py] Bug: Text field length default limit to 512 characters ?

2011-09-06 Thread toan75
Hi.

I found in 1.98.2, text field type default length is 512 not 65536?
It's correct?

Toan.


[web2py] Iterate through form.vars

2011-09-06 Thread Noel Villamor
Code:
if form.accepts(request.vars, session):
arr = ['a','b','c']
for i in range(3):
arr[i] = form.vars.x

Desired:
In the for loop, I wanted to have
arr[0] = form.vars.x0
arr[1] = form.vars.x1
arr[2] = form.vars.x2

As you can see, I am not  yet a pythonista.

:)

Thanks!


[web2py] Re: Bug: Text field length default limit to 512 characters ?

2011-09-06 Thread Noel Villamor

Do an explicit length declaration in your model definition:

Field('txt','text', length=65536),

Look here:

http://www.web2py.com/book/default/chapter/06?search=Field+constructor


On Sep 7, 3:10 pm, toan75  wrote:
> Hi.
>
> I found in 1.98.2, text field type default length is 512 not 65536?
> It's correct?
>
> Toan.


[web2py] Re: deploying web2py on IIS

2011-09-06 Thread annet
Hi,

I have seen you struggle setting up a deployment environment and
deploying your web2py app for some time now, and wonder why you not
simply decide to deploy your app at e.g Webfaction. Apart from my Mac
OS X Leopard Server I do have a hosting account there at $ 9.50 a
month, and in order to be able to access web2py's admin interface I
also have a dedicated IP address at $ 5.00 a month. Webfaction has a
script to install web2py, apart form that there documentation and
support are pretty good. I found that being new to web2py, probably
dynamic web development, and setting up a deployment environment is an
unproductive combination. After you've become more familiar with the
former the latter will be a piece of cake.

By the way, in production you do not use SQLite (see the book), but
Postgresql, MySQL, etc.


Kind regards,

Annet


[web2py] Re: Date Picker Widget

2011-09-06 Thread annet
Hi David,

I didn't like the calendar that comes with web2py, not for its
functionality but for its appearance. Instead of replacing it I just
restyled it:

.calendar {
  cursor: default;
  background-color: #FF;
  color: #44;
  font-size: 11px;
  border: 1px solid #AA;
  border-radius: 6px;
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
  padding: 6px;
}
.calendar table {
  border-collapse: separate;
  border-spacing: 2px;
}
.calendar thead {}
.calendar thead tr, .calendar thead .headrow {
  background-color: #4169E1;
  color: #44;
}
.calendar thead .daynames {}
.calendar .button, .calendar thead .title {
  color: #FF;
  font-size: 12px;
  text-align: center;
  padding: 3px;
}
.calendar thead tr .hilite, .calendar thead tr .active, .calendar
thead .headrow .hilite, .calendar thead .headrow .active {
  background-color: #FF;
  color: #4169E1;
  padding: 3px;
}
.calendar thead .daynames .hilite, .calendar thead .daynames .active {
  background-color: #FF;
  color: #44;
}
.calendar thead .name {
  background-color: #FF;
  text-align: center;
  padding: 3px;
}
.calendar tbody {}
.calendar tbody td {
  text-align: right;
  border: 1px solid #AA;
}
.calendar tbody td.hilite {
  background-color: #77;
  color: #FF;
}
.calendar tbody td.active, .calendar tbody td.selected {
  font-weight: bold;
  background-color: #FF;
  color: #4169E1;
}
.calendar tbody td.today {
  font-weight: bold;
  background-color: #4169E1;
  color: #FF;
}
.calendar tbody .disabled {
  color: #77;
}
.calendar tbody .emptycell {
  visibility: hidden;
}
.calendar tbody .emptyrow {
  display: none;
}
.calendar tfoot .ttip {
  background-color: #77;
  color: #FF;
  text-align: center;
  border: 1px solid #33;
  padding: 1px;
}
.calendar tfoot .hilite {
  padding: 1px;
  background-color:
  #EE;
}
.calendar tfoot .active {
  padding: 2px 0px 0px 2px;
}
.calendar .combo {
  background-color: #FF;
  position: absolute;
  display: none;
  width: 4em;
  top: 0px;
  left: 0px;
  cursor: default;
  border: 1px solid #DD;
  padding: 1px;
  z-index: 100;
}
.calendar .combo .label, .calendar .combo .label-IEfix {
  text-align: center;
  padding: 1px;
}
.calendar .combo .label-IEfix {
  width: 4em;
}
.calendar .combo .active {
  background-color: #CC;
  color: #FF;
  padding: 0px;
}
.calendar .combo .hilite {
  background-color: #77;
  color: #FF;
}
.floatleft {
  float: left;
}
.CP_over {
  background-color: #FF
 }


Just another option ;-)


Kind regards,

Annet.


Re: [web2py] Re: Date Picker Widget

2011-09-06 Thread Bruno Rocha
Very nice style annet!

I think we should make teh headers gray and replace calendar.css in welcome
app

On Wed, Sep 7, 2011 at 3:23 AM, annet  wrote:

> Hi David,
>
> I didn't like the calendar that comes with web2py, not for its
> functionality but for its appearance. Instead of replacing it I just
> restyled it:
>
> .calendar {
>  cursor: default;
>  background-color: #FF;
>  color: #44;
>  font-size: 11px;
>  border: 1px solid #AA;
>  border-radius: 6px;
>  -webkit-border-radius: 6px;
>  -moz-border-radius: 6px;
>  padding: 6px;
> }
> .calendar table {
>  border-collapse: separate;
>  border-spacing: 2px;
> }
> .calendar thead {}
> .calendar thead tr, .calendar thead .headrow {
>  background-color: #4169E1;
>  color: #44;
> }
> .calendar thead .daynames {}
> .calendar .button, .calendar thead .title {
>  color: #FF;
>  font-size: 12px;
>  text-align: center;
>  padding: 3px;
> }
> .calendar thead tr .hilite, .calendar thead tr .active, .calendar
> thead .headrow .hilite, .calendar thead .headrow .active {
>  background-color: #FF;
>  color: #4169E1;
>  padding: 3px;
> }
> .calendar thead .daynames .hilite, .calendar thead .daynames .active {
>  background-color: #FF;
>  color: #44;
> }
> .calendar thead .name {
>  background-color: #FF;
>  text-align: center;
>  padding: 3px;
> }
> .calendar tbody {}
> .calendar tbody td {
>  text-align: right;
>  border: 1px solid #AA;
> }
> .calendar tbody td.hilite {
>  background-color: #77;
>  color: #FF;
> }
> .calendar tbody td.active, .calendar tbody td.selected {
>  font-weight: bold;
>  background-color: #FF;
>  color: #4169E1;
> }
> .calendar tbody td.today {
>  font-weight: bold;
>  background-color: #4169E1;
>  color: #FF;
> }
> .calendar tbody .disabled {
>  color: #77;
> }
> .calendar tbody .emptycell {
>  visibility: hidden;
> }
> .calendar tbody .emptyrow {
>  display: none;
> }
> .calendar tfoot .ttip {
>  background-color: #77;
>  color: #FF;
>  text-align: center;
>  border: 1px solid #33;
>  padding: 1px;
> }
> .calendar tfoot .hilite {
>  padding: 1px;
>  background-color:
>  #EE;
> }
> .calendar tfoot .active {
>  padding: 2px 0px 0px 2px;
> }
> .calendar .combo {
>  background-color: #FF;
>  position: absolute;
>  display: none;
>  width: 4em;
>  top: 0px;
>  left: 0px;
>  cursor: default;
>  border: 1px solid #DD;
>  padding: 1px;
>  z-index: 100;
> }
> .calendar .combo .label, .calendar .combo .label-IEfix {
>  text-align: center;
>  padding: 1px;
> }
> .calendar .combo .label-IEfix {
>  width: 4em;
> }
> .calendar .combo .active {
>  background-color: #CC;
>  color: #FF;
>  padding: 0px;
> }
> .calendar .combo .hilite {
>  background-color: #77;
>  color: #FF;
> }
> .floatleft {
>  float: left;
> }
> .CP_over {
>  background-color: #FF
>  }
>
>
> Just another option ;-)
>
>
> Kind regards,
>
> Annet.




-- 



--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]
[ Aprenda a programar: http://CursoDePython.com.br ]
[ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ]
[ Consultoria em desenvolvimento web: http://www.blouweb.com ]


Re: [web2py] Re: Date Picker Widget

2011-09-06 Thread Bruno Rocha
[image: Selection_034.png]

How it looks like, header in gray will fit welcome app.
<>