i think you should create dirs in modules and add __init__.py to each
one. Then:
def load():
if session.project_a == True:
from applications.your_app.a.upload import Upload
elif session.project_b == True:
from applications.your_app.b.upload import Upload
u = Upload()
Hello,
Lately i've to use web2py's cron, and @reboot "function" but it didn't
work, so I checked it and created patch. Use it if you want.
http://paste.pagenoare.net/default/show/136
Regards.
--~--~-~--~~~---~--~~
You received this message because you are subscri
I would also prefer bitbucket (or even github) instead of Google
Code.
But the own trac (with hg/git/svn whatever) is the best idea i think.
On 14 Paź, 06:09, Thadeus Burgess wrote:
> What about hgwebdir or roll our own app
> usinghttp://mercurial.selenic.com/wiki/MercurialApiwith our own custo
I agree with ceej, he's right.
On 15 Gru, 20:27, ceej wrote:
> I understand what you are saying Massimo and Vince, but what I mean is
> I just think t2 should be kept separate and maintained as a sort of
> plugin and I think vince you proved my point by saying "web2py, T2 and
> T3 are quite conf
I wrote small script to repair it. Place file named 'repair.py' in
root of web2py and paste the source from here:
http://pagenoare.net/paste/default/show/20
It checks and if some directory misses, it'll create it :)
On Jan 17, 4:51 am, BigBaaadBob wrote:
> I just want to point out, for those wh
anguages', 'private']:
>
> Thank you. Should should be part of web2py/scripts
>
> On Jan 31, 6:18 am, Kacper Krupa wrote:
>
> > I wrote small script to repair it. Place file named 'repair.py' in
> > root of web2py and paste the source from
>
Yes, and also you can import it and use in gluon/main.py in creating
apps. Each run of web2py.py will repair "broken" apps.
PS Sorry for double posting.
On Jan 31, 10:32 pm, Kacper Krupa wrote:
> No problem -http://pagenoare.net/paste/default/show/21:)
>
> On Jan 31, 5:36 p
AFAIK you can replace double exception to:
except (ValueError, TypeError):
...
On 10 Lut, 15:29, mdipierro wrote:
> Try replace in sql.py
>
> def is_integer(x):
> try:
> long(x)
> except ValueError:
> return False
> return True
>
> with
>
> def is_integer(x):
>
Hello,
#!/usr/bin/python returns errors on my mac. I had to change it to #!/
usr/bin/env python. I think you shoud replace it.
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To
s worked on my macs.
>
> Do you have something weird set in your .bashrc?
>
> Time for archive and install?
>
> On Wed, Feb 11, 2009 at 11:11 AM, Kacper Krupa wrote:
>
> > Hello,
>
> > #!/usr/bin/python returns errors on my mac. I had to change it t
I've created symbolic link. It works but using /usr/bin/env python is
better i think.
On 11 Lut, 19:51, Kacper Krupa wrote:
> It's 'cos i have another python on /usr/lib/python. When i've added #!/
> usr/bin/env python it choose python from PYTHONPATH.
>
> On
{{= URL(r=request, c='controller', f='function', args='#arg') }}
or
{{= URL(r=request, c='controller', f='function', args=['#arg']) }}
?
On 12 Lut, 13:52, cjparsons wrote:
> I have a page that contains mainly text information in the view
> arranged in sections with labels. I've not put it
> in
Yes, 'cos afaik this first doesn't work with older web2py.
And also i wanted to show that args can be list
On 12 Lut, 15:04, mdipierro wrote:
> it is the same
>
> On Feb 12, 7:25 am, Kacper Krupa wrote:
>
> > {{= URL(r=request, c='controller', f='fu
The only way what i see its:
URL(r=request) + "#something"
On 12 Lut, 15:46, cjparsons wrote:
> On Feb 12, 1:25 pm, Kacper Krupa wrote:
>
> > {{= URL(r=request, c='controller', f='function', args='#arg') }}
> > or
> &
Hello,
I've a problem. I want to use SQLFORM and commit it to db manually. I
mean create form, send some data, create ready data for db insert,
modify this data and at the finish insert it into database. It's
possible, or i have to replace the source of web2py?
--~--~-~--~~---
On 17 Mar, 21:15, blackthorne wrote:
> We are alive!
--~--~-~--~~~---~--~~
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 th
Yeah!
I think 13 people on the channel is success!
On 17 Mar, 21:15, blackthorne wrote:
> We are alive!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send emai
15!
On 17 Mar, 21:21, Francisco Gama wrote:
> Now 14!
>
> On Mar 17, 8:16 pm, Kacper Krupa wrote:
>
> > Yeah!
>
> > I think 13 people on the channel is success!
>
> > On 17 Mar, 21:15, blackthorne wrote:
>
> > > We are alive!
--~--~-~--
http://pagenoare.net/paste/default/show/35
it's a way to do that. i know it's non-pythonic, but i can't do it
more "pythonic".
On 18 Mar, 09:05, Michal Jursa wrote:
> Is it possible to get mime-type of the uploaded object in some web2py
> manner? It would be better to work with mime-type then s
yes, but it guesses by file extension :)
On 18 Mar, 16:00, AchipA wrote:
> Not web2py, but generic python:
>
> import mimetypes
> mimetypes.guess_type(filename)
>
> On Mar 18, 9:05 am, Michal Jursa wrote:
>
> > Is it possible to get mime-type of the uploaded object in some web2py
> > manner? It
Hello,
I wrote small gallery script, and i'm using one to many relationship.
Here is the code: http://paste.pagenoare.net/default/show/62 It worked
on 1.58 but on the newset (1.59) not. What is wrong? I still get
ValueError: invalid literal for int() with base 10: '|1|2|' error. I
seams that web2
gallery',
> SQLField('name', 'string'),
> SQLField('images', 'string', db.image),
> )
>
> should be
>
> db.define_table('gallery',
> SQLField('name', 'string'),
> SQLField('imag
OK, thanks for fast reply!
On Mar 28, 9:13 pm, mdipierro wrote:
> It is not better. It is different. It allows many2many without doing a
> JOIN and that means it works on the Google App Engine without
> overhead.
>
> Massimo
>
> On Mar 28, 3:08 pm, Kacper Krupa wrote
i also agree
On Mar 30, 4:23 pm, Timothy Farrell wrote:
> +1
>
>
>
> johann.scheibelho...@easytouch-edv.com wrote:
> > agree
>
> > On Mar 30, 4:10 pm, mdipierro wrote:
>
> >> Right now if you say:
>
> >> db.table.field.writable=False
>
> >> your field will be hidden to both custom forms and app
In sphinx you could:
- get data from docstrings (like epydoc)
- write your own instructions/tips using reST
and all on one site with (imo) great design.
On Mar 31, 2:48 pm, Grahack wrote:
> Massimo, could you please detail why Epydoc is limited. I personaly
> use it with ReST formatting and fin
3)
def login(): return auth.login()
# create view "default/login.html"
def register(): return auth.register()
# create view "default/register.html"
etc etc
function should returns dict objects (then the templates are loaded
afaik). So: def login(): dict(form=auth.login()) etc.
On Apr 2, 6:54 am
SQLFORM(db.table, row, ..., _id="foo")
On Apr 2, 7:06 pm, phneoix wrote:
> how to get an output from SQLTABLE or crud.select in the following
> way.
> .
>
> thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
http://bitbucket.org/douglas/web2py/get/tip.zip - it's the newset rev
zipped.
On May 13, 7:01 pm, mdipierro wrote:
> OK let's wait the first week on June.
>
> Massimo
>
> On May 13, 11:18 am, Douglas Soares de Andrade
> wrote:
>
> > Em Quarta-feira 13 Maio 2009, às 12:47:19, mdipierro escreveu:
You should try with smaller files and create diff (to check what is
added). It seams to be something between uploading <-> saving.
On May 13, 9:57 pm, Hans
wrote:
> web2py 1.61.4
> WinXP Pro SP3
> Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
> (Intel)]
>
> If there is anyt
yep, i told about it:
http://groups.google.com/group/web2py/browse_thread/thread/71bb1897b47c153f/749923b3c7e7d791?q=#749923b3c7e7d791
On 15 Maj, 10:22, virhilo wrote:
> I think the python path in web2py files stould be:
> /usr/bin/env python
> instead of /usr/bin/python
>
> I make a patch for
before form=crud.create():
db.adres.bedrijf.default = auth.user.bedrijf
On 15 Maj, 16:08, annet wrote:
> I am working on a custom crud function.
>
> In my model I have got the following table:
>
> db.define_table('adres',
> SQLField('bedrijf', db.bedrijf, default='', notnull=True),
> SQL
Hi,
I've written application which creates another thread and do things
inside it. But why i can't use ORM in it? I'm using sqlite3 and i
always get:
ProgrammingError: SQLite objects created in a thread can only be used
in that same thread.The object was created in thread id 28329984 and
this is
it make sure you:
> - implement a lock mechanism
> - do not access the db object after the thread that created the object
> has returned (because the connection is automatically close and
> transaction committed).
>
> Massimo
>
> On May 15, 11:22 am, Kacper Krupa wrote:
>
&g
Hi,
Previous versions works well on lighttpd, but when i'm trying to start
app on trunk /latest version i've got strange errors. First:
AttributeError: 'translator' object has no attribute
'accepted_language'
So i removed T.accepted_language from header from layout.html - it
works.
Next i've:
Wrr, i had to remove sock. I thought it was done when i restart
lighty.
Thanks.
On 17 Maj, 19:15, mdipierro wrote:
> It looks like you updated the applications but not the gluon folder.
>
> Massimo
>
> On May 17, 3:54 am, Kacper Krupa wrote:
>
> > Hi,
>
> >
if not len(record):
or:
query=db(db.adres.id==record_id)
if query.count() == 0:
and then: row = query.select(field)[0]
On 22 Maj, 11:45, annet wrote:
> I have my authentication, authorization, create and read functions
> working, however, I don't get update and delete function to function
> w
Yes, sorry - i've checked. I always used len().
On 22 Maj, 19:28, mdipierro wrote:
> I repeat
>
> if not record:
>
> On May 22, 12:22 pm, Kacper Krupa wrote:
>
> > if not len(record):
>
> > or:
>
> > query=db(db.adres.id==record_id)
&
if not request.args:
return redirect()
On 23 Maj, 08:43, annet.verm...@gmail.com wrote:
> Massimo,
>
> After restarting the server if not record: worked.
>
> However, further down the workflow there is an error ticket issued
> when the user clicks the submit button.
>
> My custom update function:
you should allow to use "normal m2o" relations. i mean with another
table in db. i know it doesn't work on GAE but users should have
choice.
On 30 Maj, 08:21, annet.verm...@gmail.com wrote:
> Massimo,
>
> Will it be possible to have a foreign key on a non id field, in case
> of a look-up table?
>
Hello,
I have a problem - i was searching a while and didn't find any good
advice. I want to create a choice form in model, but the options are
from list. Something like model relations but not to other table --
just to a python list! (Something like choices parametr in Django ->
http://docs.djan
phomore','Junior', 'Senior', 'Graduate')
>
> db.mytable.myfield.requires=IS_IN_SET(values, labels)
>
> (if no labels, values are used as labels)
>
> Massimo
>
> On Oct 19, 7:09 am, Kacper Krupa <[EMAIL PROTECTED]> wrote:
>
>
41 matches
Mail list logo