the code is created to store e table file then now i want to zip the
file after the file is created
On Dec 11, 1:19 pm, mdipierro <[EMAIL PROTECTED]> wrote:
> It depends what do you need to do with the file? Store it or
> return it? Perhps I do not understand the question.
>
> The open()
It depends what do you need to do with the file? Store it or
return it? Perhps I do not understand the question.
The open() before should be
open(os.path.join(request.folder,'private',table+'.csv'),'w').write(str
(db(db[table].id).select
because:
os.path.join is safer than str(os.sep).j
line-height on body and sf-menu? You have a strict eye, i don't see
much diff from earlier look today :)
-wj
On Wed, Dec 10, 2008 at 9:21 PM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> I fixed it. looks better now.
>
> On Dec 10, 6:02 pm, mdipierro <[EMAIL PROTECTED]> wrote:
>> @wes, header,
if form.accepts(request.vars,session):
for table in db.tables:
rows=db(db[table].id).select()
print rows
open(str(os.sep).join([os.getcwd(), 'applications',
request.application, 'databases',
table+'.csv']),'w').write(str(d
I fixed it. looks better now.
On Dec 10, 6:02 pm, mdipierro <[EMAIL PROTECTED]> wrote:
> @wes, header, page and footer. everything else is in page.
>
> @ceej. everywhere in particular lines in class "page" within same
> paragraph. I will take any suggestion that makes it look better.
>
> Massimo
I am confused. What is the model. is a table? should'n b and c be the
same table?
I think you mean
db.define_table('team',db.Field('name'))
db.define_table('match',db.Field('t1',db.team),db.Field('t2',db.team))
a=db.team.with_alias('a')
b=db.team.with_alias('b')
rows=db().select(db.match.ALL,a.na
billf, that works using db.executesql().
I wonder what is the DAL equivalent.
On Dec 10, 6:15 pm, billf <[EMAIL PROTECTED]> wrote:
> in sql:
>
> select * from matches a inner join teams b on a.team1_id=b.teams_id
> inner join teams c on a.team2_id=c.team_id
>
> so that a.? is match data, b.? is
That worked, thanks!
On Dec 9, 1:02 am, mdipierro <[EMAIL PROTECTED]> wrote:
> or using war SQL (not nice but possible)
>
> sort="table.id, table.otherfield, table.yetanotherfield DESC"
> records=db().select(db.table.ALL,orderby=sort)
>
> Notice in the second case there is no "db." becaus
Oops sent the last reply to the author. sorry about that.
I'm a little drugged up on cold medicine.
So I am running Ubuntu 8.10 Server which just like you suggested uses
ports.conf
however I cant seem to get my WSGI to fire on my web2py
the setup runs acceptably i think sine i get in to the folde
T3 is now here
https://launchpad.net/t3
as well as on http://mdp.cti.depaul.edu/examples/static/web2py.app.t3.tar
plugin_t2 will die so if you are using t2 perhaps you should replace
from applications.plugin_t2.modules.t2 import T2
with
from applications.t3.modules.t2 import T2
T
@wes, header, page and footer. everything else is in page.
@ceej. everywhere in particular lines in class "page" within same
paragraph. I will take any suggestion that makes it look better.
Massimo
On Dec 10, 5:57 pm, ceej <[EMAIL PROTECTED]> wrote:
> Massimo,
>
> What lines are you trying to g
Massimo,
What lines are you trying to give height to?
On Dec 10, 2:43 pm, mdipierro <[EMAIL PROTECTED]> wrote:
> I gave a new css to t3 (web2py.appspot.com/t3) but I do not know how
> to increase the line-hight.
> I tried putting line-height in various places in the styles page but
> it is ignor
But the header does not wrap the whole page. This would only affect
the header area.
-wj
On Wed, Dec 10, 2008 at 4:39 PM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> You do not need it, you can just add to header, page, footer
>
> width: 916px; margin-left: auto; margin-right: auto;
>
> Massimo
>
You do not need it, you can just add to header, page, footer
width: 916px; margin-left: auto; margin-right: auto;
Massimo
On Dec 10, 5:29 pm, "Wes James" <[EMAIL PROTECTED]> wrote:
> You've got something in the css that always causes a scroll left/right
> bar to appear (safari and ff)
>
> In to
pedro, show us the model else we cannot answer and will have to guess.
Massimo
On Dec 10, 5:15 pm, billf <[EMAIL PROTECTED]> wrote:
> in sql:
>
> select * from matches a inner join teams b on a.team1_id=b.teams_id
> inner join teams c on a.team2_id=c.team_id
>
> so that a.? is match data, b.? is
But I am not trying to seperate sections. I am tring to separate lines
within the same section. em and px makes no difference in my tests.
On Dec 10, 5:12 pm, "Wes James" <[EMAIL PROTECTED]> wrote:
> i went to manage/styles in the t3 here and put line-height:30px in
> the body and i could see a
response is the mechanism used by web2py. settings is the mechanism
used by T3. Internally they are copied from settings to response when
appropriate. T3 does a metter job at separating internal stuff from
internal stuff.
Massimo
On Dec 10, 4:27 pm, "Wes James" <[EMAIL PROTECTED]> wrote:
> this
You've got something in the css that always causes a scroll left/right
bar to appear (safari and ff)
In toying around (and similar to my scholarship app), I created:
.wrapper {width: 916px; margin-left: auto; margin-right: auto;}
and put it in the layout.html thus:
and this, wit
Here is an interesting article on using em instead of px:
http://mondaybynoon.com/2006/03/13/effective-style-with-em/
i.e. line-height:2em ( = 16*2) vs line-height:32px (i guess that's
what it means each em is 16px per previous article??)
-wj
On Wed, Dec 10, 2008 at 3:43 PM, mdipierro <[EMAIL
in sql:
select * from matches a inner join teams b on a.team1_id=b.teams_id
inner join teams c on a.team2_id=c.team_id
so that a.? is match data, b.? is team1 data and c.? is team2 data
On Dec 10, 10:47 pm, pedro <[EMAIL PROTECTED]> wrote:
> On 10 Dec, 23:35, DenesL <[EMAIL PROTECTED]> wrote:
>
i went to manage/styles in the t3 here and put line-height:30px in
the body and i could see a difference in the spacing between sections
on the main page.
On Wed, Dec 10, 2008 at 3:56 PM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> can you download t3 and make it work? I tried putting in class body
nope - i'm wrong. see: http://www.alistapart.com/articles/howtosizetextincss
it has line-height in body.
On Wed, Dec 10, 2008 at 3:56 PM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> can you download t3 and make it work? I tried putting in class body,
> page, etc. but it seems to be ignored.
>
> Mas
Massimo,
The examples I've seen with this is with the , i.e, p {
line-height: 180%; } - it works with text items, probably not with
body, etc. Like the def at w3 - defines space between lines - it
defines the text lines height.
-wj
On Wed, Dec 10, 2008 at 3:56 PM, mdipierro <[EMAIL PROTECTED]>
can you download t3 and make it work? I tried putting in class body,
page, etc. but it seems to be ignored.
Massimo
On Dec 10, 4:47 pm, "Wes James" <[EMAIL PROTECTED]> wrote:
> http://www.w3schools.com/css/pr_dim_line-height.asp
>
> sets distance between lines
>
> On Wed, Dec 10, 2008 at 3:43 PM
http://www.w3schools.com/css/pr_dim_line-height.asp
sets distance between lines
On Wed, Dec 10, 2008 at 3:43 PM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> I gave a new css to t3 (web2py.appspot.com/t3) but I do not know how
> to increase the line-hight.
> I tried putting line-height in various pl
On 10 Dec, 23:35, DenesL <[EMAIL PROTECTED]> wrote:
> > SELECT * FROM teams, matches WHERE matches.team1_id=teams.id AND
> > matches.team2_id=teams.id
>
> If I interpret that correctly it means: look for all matches where a
> team played itself.
> Unless you are looking for wrongly entered match i
I gave a new css to t3 (web2py.appspot.com/t3) but I do not know how
to increase the line-hight.
I tried putting line-height in various places in the styles page but
it is ignore. Any idea?
Massimo
--~--~-~--~~~---~--~~
You received this message because you are sub
> SELECT * FROM teams, matches WHERE matches.team1_id=teams.id AND
> matches.team2_id=teams.id
If I interpret that correctly it means: look for all matches where a
team played itself.
Unless you are looking for wrongly entered match info it would not be
very useful.
--~--~-~--~~-
this through me for a loop...
I was seeing that settings.title, etc, were changing the
response.title, etc.. so I added settings.search=0 so I could block
out the google search and do my own footer with
settings.footer='web2py powered', but it wasn't taking in the page
with response.footer. I c
try the same select at your database prompt.
On Wed, Dec 10, 2008 at 2:36 PM, pedro <[EMAIL PROTECTED]> wrote:
>
> Ok, this is what i am trying to replicate using web2py data object
> model:
>
> SELECT * FROM teams, matches WHERE matches.team1_id=teams.id AND
> matches.team2_id=teams.id
--~--~--
try:
print db((db.matches.team1_id==db.teams.id)&
(db.matches.team2_id==db.teams.id))._select()
_select not select
and you will see this is the same as the SQL query below. I guess no
records match the query.
Massimo
On Dec 10, 3:36 pm, pedro <[EMAIL PROTECTED]> wrote:
> Ok, this is what i am
Ok, this is what i am trying to replicate using web2py data object
model:
SELECT * FROM teams, matches WHERE matches.team1_id=teams.id AND
matches.team2_id=teams.id
This is what I've used, but it returns an empty record.
partidas = db( db.matches.team1_id==db.teams.id) &
(db.matches.team2_id==
Thanks for letting us know about this. This is a good point. .table
files are not always portable. they must be re-created (migrate=True)
or ignored (migrate=False) or give them a portable name
(migrate="myfile.table")
Massimo
On Dec 10, 2:44 pm, michal niklas <[EMAIL PROTECTED]> wrote:
> On 6 G
If people want to remove the "powered by web2py" should they at least
do some work to achieve it? ;-)
But I like the idea of making the footer more customizable.
Massimo
On Dec 10, 2:55 pm, "Wes James" <[EMAIL PROTECTED]> wrote:
> Massimo,
>
> You have config settings for title and subtitle how
Massimo,
You have config settings for title and subtitle how about doing this
for the footer too?
in configure.html
settings.footer='my footer'
in layout.html:
{{if response.footer:}}
{{=response.footer}}
{{else:}}
Created by {{=response.author}} - Powered by http://www.web2p
On 6 Gru, 22:28, mdipierro <[EMAIL PROTECTED]> wrote:
> I got it but I do not have postgresql here with me. Will check next
> week.
I have found why it not worked:
Files in databases dir that store serialized tables definition
are created using hash of connection string. Unfortunately ours
connec
I'll look at this. I don't think it should be too hard. Take the
number of items and nitems and create a list of links type think to
spit out at the top...
ciao,
-wj
On Wed, Dec 10, 2008 at 1:41 PM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> I would like to have that. Perhaps you can send me a
I did not know that. I will try and I have no objections to change it.
thanks for bringing it up.
Massimo
On Dec 10, 2:39 pm, "Wes James" <[EMAIL PROTECTED]> wrote:
> with this code:
>
> editAreaLoader.init({id:
> "configuration_{{=request.args[0]}}",start_highlight: false,
>
> the false is
ah - yes - it does this too in firefox too (scrolls to bottom in edit
page), but not safari. heh...
On Wed, Dec 10, 2008 at 1:40 PM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> I removed because it created problems. For example my admin page is
> very very long. the code above made it always open sc
I would like to have that. Perhaps you can send me a patch?
the problem is that one need to account for a very large number of
pages.
Massimo
On Dec 10, 2:36 pm, "Wes James" <[EMAIL PROTECTED]> wrote:
> Massimo,
>
> Would you consider implementing with the itemize next/previous
> numbered links
I removed because it created problems. For example my admin page is
very very long. the code above made it always open scrolled down to
the bottom where the form is. Many people do not like this.
Massimo
On Dec 10, 2:32 pm, "Wes James" <[EMAIL PROTECTED]> wrote:
> At one point I think this was
with this code:
editAreaLoader.init({id:
"configuration_{{=request.args[0]}}",start_highlight: false,
the false is normally true. When it is true, the highlight is about
the same color in the edit area as the selected line color and makes
it hard to select chuncks. I have changed it to fal
Massimo,
Would you consider implementing with the itemize next/previous
numbered links for page access. Say you have 10 pages of content,
place 1 2 3 4 5..., etc. at top so that a specific page can be clicked
on.
thx for your efforts!
-wj
--~--~-~--~~~---~--~~
At one point I think this was working for the admin page, but not now.
It does seem to be implemented for other areas. Would you think
about put in this in by default?
thx,
-wj
On Sat, Nov 1, 2008 at 9:18 AM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> Exellent point but there is a much easier s
Anybody? Phyo?
On Dec 5, 9:01 am, voltron <[EMAIL PROTECTED]> wrote:
> Anybody here using theUbuntuweb2py startup scripts? I have a few
> questions, for example, line 30
>
> DAEMON_ARGS="web2py.py --password= --pid_filename=$PIDFILE"
>
> Should that not be:
>
> DAEMON_ARGS=" nohup web2py.py --pas
I don't see where would you put the expressions for classification ?
You can't get around those, unfortunately (In my Croatian example, 101
starts over the cycle, so you have to use the modulo operator to cover
all cases). So, client side it's OK, but I don't see where does the
gettext 'Plural-For
Got it, was a type in my code
--~--~-~--~~~---~--~~
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 [E
That is to say, subversion tells you when there are unresolved conflicts,
gives you the file names and you have to go look for patterns like this, and
resolve them.
bzr and hg will pull up a merge tool to get you to do it...
anyway, this is manual conflict problem... unless you changed something
def index(): redirect(URL(r=request,f='byplace'))
or at the bottom of controller
def index():
request.function='byplace' # override request
response.view='clubs/byplace.html' # make sure you map into the
right view
return byplace() # call the controller you want
Massimo
On Dec
It is called a version-control conflict. It works when two files are
edited by different sources in different ways. Subversion tries to
reconcile the differences, but in some cases it doesn't know which
version is correct, so it munges the two files together in the form you
saw. This typica
In my controllers I do not make use of the index() function, so it
simply reads:
def index():
return dict()
In one of my controllers called clubs I have got three functions:
byplace():
byactivity():
byfacility():
In my menu, when the visitor click clubs, the byplace function is
exposed, so
This is in trunk know
http://code.google.com/p/web2py/source/browse/trunk/VERSION
something got corrupted in the checkout I guess.
Massimo
On Dec 10, 11:13 am, "Wes James" <[EMAIL PROTECTED]> wrote:
> I did an svn checkout of web2py.
>
> What does this mean:
>
> cat VERSION
> <<< .mine
> V
I did an svn checkout of web2py.
What does this mean:
cat VERSION
<<< .mine
Version 1.52 (2008-12-03 11:25:27)
===
Version 1.53.5 (2008-12-08 16:55:03)
>>> .r543
Why are there two version items in the VERSION file?
-wj
--~--~-~--~~~---~--~~
You rece
You may have a some weird object stored in the session. Something
unpickable. db, tables, rows, sessions, functions, files, cannot be
stored in session.
Massimo
On Dec 10, 10:44 am, voltron <[EMAIL PROTECTED]> wrote:
> I am getting this error from a new appliance that I am coding:
>
> Traceback
We could do something like this:
T("you have %s dogs",k,key=k)
and if a value of key is given, the translation string can be a
dictionary:
1:"you have one dog", 2:"you have two dogs", None:"you have %s dogs"
where None:"" is the default value.
Pros? Cons?
Massimo
On Dec 10, 10:32 am, "Y
I am getting this error from a new appliance that I am coding:
Traceback (most recent call last):
File "E:\projects\test\website\web2py\test\gluon\main.py", line 228,
in wsgibase
session._try_store_on_disk(request,response)
File "E:\projects\test\website\web2py\test\gluon\globals.py", lin
FYI - either is equivalent; if 'date' is the second argument, that is what
type gets set to; if it's in a='b' form, that works in any position.
On Wed, Dec 10, 2008 at 3:09 AM, annet <[EMAIL PROTECTED]> wrote:
> Yarko,
>
>Thanks for pointing me to page 138 of the manual, I replaced 'date'
> with
I can't tell if http://docs.python.org/library/gettext.html
does it does it?
On Wed, Dec 10, 2008 at 10:23 AM, achipa <[EMAIL PROTECTED]> wrote:
>
> Here are some details if some is interested in more details:
>
> http://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html
>
> Also
I added T.force('en-du') to the controller, but the problem with the
date format still exists.
Annet.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email t
Here are some details if some is interested in more details:
http://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html
Also, there is a python-babel module which good for both I18N and
L10N, might be good for inclusion or at least inspiration.
On Dec 10, 4:59 pm, mdipierro <[EMAIL
Example for an english gettext style .po (language) file:
Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;
msgstr[0] "One dog found"
msgstr[1] "%s dogs found
So you have the Plural-Forms line in the header of the file which
classifies the statements below it. The expression is common
I agree there is a problem. I do not have a better solution. How does
gettext handle this case? Can you provide an example?
Massimo
On Dec 10, 9:10 am, achipa <[EMAIL PROTECTED]> wrote:
> Just to see how bad it gets (then you'll understand why you don't want
> to deal with this outside of T()):
Just to see how bad it gets (then you'll understand why you don't want
to deal with this outside of T()):
English:
0 dogs
1 dog
2 dogs
Hungarian
Nincs kutya
1 kutya
2 kutya
3 kutya
Croatian
Nema pasa
1 pas
2..4 psa
5 pasa
... and every time you think you have covered all the cases, a
language
Still not good (enough), see my first post. This is good only for
english. The coder should be isolated from the language and it's
quirks. In most slavic languages for your example you would have 4
cases, not 2. Also, most languages do not use 0 (e.g. you would have
to say the equivalent of 'No do
Checkout my tutorial for Dreamhost at:
http://wiki.dreamhost.com/Web2py
On Dec 7, 3:45 pm, carlo <[EMAIL PROTECTED]> wrote:
> I need to open a new domain where some web2py apps will be hosted and
> I am trying to browse the various offers.
>
> At the moment I get:
>
> WebFaction: I see we2py n
text=T("you have 1 dog") if x==1 else T("you have %s dogs",x)
Massimo
On Dec 10, 8:31 am, achipa <[EMAIL PROTECTED]> wrote:
> OK, this answers the (a) of my post (I could have sworn I tried that
> too, oh well), but how would you do (b) ? x=%.2f just outputs the
> number, but doesn't interpre
OK, this answers the (a) of my post (I could have sworn I tried that
too, oh well), but how would you do (b) ? x=%.2f just outputs the
number, but doesn't interpret it with regard to translation. T("%d
files copied", numcopy) should return '1 file copied' if numcopy is 1,
and '[numcopy] fileS copi
See: http://flowplayer.org/download/LICENSE_GPL.txt
On Dec 9, 3:59 pm, mdipierro <[EMAIL PROTECTED]> wrote:
> I am not sure the license allow redistribution. I cannot find the
> license.
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed
You can do all that. Here are some examples:
name="Achipa"
T("Hello %s",name)
T("Hello %(name)s",dict(name=name))
x=0.123515
T("x=%.2f",x)
Massimo
On Dec 10, 4:40 am, achipa <[EMAIL PROTECTED]> wrote:
> I know we T() for this, but there are some shortcoming. As I'm dealing
The translation is triggered by the accept-language in browser
settings.
You can force it with
T.force('en-du')
On Dec 10, 3:09 am, annet <[EMAIL PROTECTED]> wrote:
> Yarko,
>
> Thanks for pointing me to page 138 of the manual, I replaced 'date'
> with type='date'.
>
> Massimo,
>
> It still isn'
Thank you all for your suggestion. I am trying the free account on
Alwaysdata, the install process was easy and the control panel is
good.
I am tempted to test he Achipa script but too busy with some projects
at the moment.
carlo
On 10 Dic, 12:44, achipa <[EMAIL PROTECTED]> wrote:
> I plan on m
I plan on making (actually, I have it but it's not user friendy yet) a
small script runnable from your own desktop that would (based on the
given hostname, u/p, and parameters you got from the provider) sort of
autodiscover the type of service and make some reasonable step-by-step
guide and/or gen
I know we T() for this, but there are some shortcoming. As I'm dealing
with more languages than it's probably healthy, the T() approach seems
to have significant drawbacks compared to good (?) old gettext. I want
to see whether some solutions already exist that I don't know about,
or we need to do
Yarko,
Thanks for pointing me to page 138 of the manual, I replaced 'date'
with type='date'.
Massimo,
It still isn't working.
This is the table definition of event:
db.define_table('event',
SQLField('bedrijf', db.bedrijf, default='', notnull=True),
SQLField('event', length=50, defaul
74 matches
Mail list logo