Perhaps you can store the encoded filename in the db rather than the
original or add a new field to store newly encoded filename?
video-js helped make playing vids easier.
Best of luck,
David
On Tuesday, June 12, 2012 6:04:21 AM UTC-4, Charles Tang wrote:
>
> I am using web2py to play user's up
Hello,
I have been using OrientDB and web2py quite successfully for some
months now.
While there are many great projects and efforts to combine these
powerful programs, I do not know of the current status of the web2py
<---> OrientDB adapter.
Bulbflow is a great project too but I could not use i
May it help you and many more.
http://paste.pocoo.org/show/552147/
-David Bloom
On Feb 16, 12:03 am, Massimo Di Pierro
wrote:
> You say you have been using it. Do you have a patch? I'll be happy to
> take a look and include it.
>
> On Feb 15, 2:48 pm, TheSweetlink wrote:
>
>
>
That is thrilling news Massimo. Issue #407. Having strong
integration between web2py and OrientDB will allow for some truly
amazing products on top of the already amazing capabilities of web2py.
Please tell me what could use testing lately and how I can find that
information out without bugging
I have tested bulbs with Rexster and while they are great products
with an equally great community, there are some existing
incompatibilities that prevent usage of OrientDB's remote engine.
This is the only one that allows multiple connections to a db as well
as the built-in clustering capabilities
Bloom
On Sep 4, 2:04 pm, Nicolas Palumbo wrote:
> what is the difference between orientDB and other graph databases? like endeca
>
>
>
> On Sat, Sep 3, 2011 at 11:12 PM, TheSweetlink wrote:
> > I have tested bulbs with Rexster and while they are great products
> > with
Well deserved and looking forward to a pile of awards going forward.
Web2py and its community are a delight. Congrats.
-David
On Sep 9, 3:20 am, paroiron wrote:
> Congratulations!
I would love to be able to stick sessions in Redis.
Is that a possibility with redis_cache.py?
I tried it but was unable to get it to work. MEMDB complained about
('RedisClient' object has no
attribute 'incr')
If I use redis-py from pip as a plain cache I am able to incr values
so I have no ide
, 11:11 pm, Massimo Di Pierro
wrote:
> Not yet. Sessons for now go in filesystem or db only, they cannot go
> on cache.
>
> Actually, I would digitally sign sessions and store them client-side
> than store them in cache.
>
> massimo
>
> On Sep 14, 7:49 pm, TheSweetlink w
+1 DAL support for Document-Graph database OrientDB and thank you very
much for your work Massimo + contributors.
I am attempting to insert the new "encoded" filename of my upload into
an unsupported db manually.
I have a SQLFORM.factory with an upload field that works fine. It
uploads my file to disk and goes through store() from dal.py renaming
my uploaded file as expected. no_table.a_witch
My proble
Please disregard and forgive the list spam.
I adapted some of the file renaming code from store() in dal.py to
manually rename the file and everything worked out.
Thanks Massimo and contributers once again for the amazing code we all
benefit from.
-David
I spoke too soon.
SQLFORM.factory is doing the proper renaming and uploading of the file
to the filesystem but I still cannot get the new filename
no_table.sirgallahad.823497htn7crh743uo5e4.ext
I can only retrieve the original filename with no path a la
request.vars.sirgallahad.filename
After se
Got it!
My problem was using request.vars.bridgetroll.filename when I should
have used form.vars.bridgetroll_newfilename
Will read more carefully next time.
-David
A different but related problem.
Now that I have the file on the filesystem with the nice web2py
renaming to prevent directory traversal attack, I cannot use the
default download function to download my newly uploaded file.
('no_table')
This is because I'm using SQLFORM.factory and dal.py store(
Thank you so much Carlos. How noobtastic of me to not think of that
one.
-David
On Sep 28, 3:03 pm, Carlos wrote:
> Hi,
>
> This occurred to me too, and I had to use the 'table_name' argument in the
> SQLFORM that handles the factory.
>
> I hope this helps.
>
> Carlos
SQLFORM.factory renames and uploads my file to uploads/ dir via
store() in dal.py great.
In form.accepts (will refactor code to use .process() soon) I store
the new filename in a currently unsupported db.
What is the safe/proper/best way to retrieve my file?
I know the renamed filename but sinc
om other projects.
-David
On Sep 28, 7:25 pm, Massimo Di Pierro
wrote:
> Before we get into this discussion. Why are you bypassing the normal
> mechanism?
>
> Massimo
>
> On Sep 28, 5:51 pm, TheSweetlink wrote:
>
> > SQLFORM.factory renames and uploads my file to u
Thanks to Carlos Galindo for the tip. He helped me earlier today.
"I am not using web2py's auth to download the uploaded files, I just
reference them directly with URL('static', 'myfolder/' +
uploadfieldvalue) ... where uploadfieldvalue is the uploaded file name
stored in the field."
I believe h
Awesome, thank you pbreit.
I cannot get over helpful this community is.
-David
On Sep 28, 9:01 pm, pbreit wrote:
> I store my images in a different folder and serve them directly:
>
> Field('image', 'upload', uploadfolder=request.folder+'static/uploads',
> requires=IS_EMPTY_OR(I
I have recently found OrientDB http://orientechnologies.com
It is a document-graph db that will allow you to evolve your schema
over time. In fact you can have no schema, mixed-schema, or full
schema. There is SQL syntax that is both familiar and powerful,
especially when combined with Gremlin t
Hello pbreit,
I cannot find the post on this group where I found it but I'm pretty
sure form.vars.filename_newfilename is what you're looking for.
This is not to be confused with request.vars.filename.filename which
will contain your original filename. form.vars.filename_filename will
contain th
Please help me with your suggestions.
I'm playing with Redis pub/sub via redis-py as a possible method to
reload a component in a page instead of polling.
In its simplest form the idea is:
1) create pubsub object
2) subscribe it to one or more channels (just one in this case)
3) create listen
On a VM running latest stable, ntpd running on both guest as well as
host so I don't know what I'm missing here.
I know this must be a really simple one but I could use a push in the
right direction please.
Thank you in advance for your help.
-David
Truly bizarre.
When I put timetest() in default.py and test it it works a treat.
output:
2011-10-04 18:40:07.876602 ## 2011-10-04 18:40:07.894192
If I run from the commandline (importing models and such as I normally
do to test things):
print request.now, datetime.datetime.now()
produces:
201
I want to insert all posts in UTC and convert to local time with
prettydates.
Either the gluon.tools prettydate() or a JS script I got a hold of
convert the time properly.
How could I insert a record that is UTC timestamped in the db but
converted to local timezone when retrieving and viewing the
nvironment in the context of a single request.
>
> Anthony
>
> On Tuesday, October 4, 2011 7:08:26 PM UTC-4, TheSweetlink wrote:
>
> > Truly bizarre.
>
> > When I put timetest() in default.py and test it it works a treat.
>
> > output:
> > 2011-10-04 18
I believe your FORM needs a totalitems field or INPUT. At least
that's what I experienced with SQLFORM.factory.
Needed a Field('totalitems', readable=False, writable=False) to match
if I was passing hidden=dict(totalitems='1').
I often choose SQLFORM or .factory for the ability to customize the
.)
> db.table.field.represent = lambda d,r,s=shift: prettydate(d+s)
>
> for all tables and fields where shift is the localtion-uct time shift.
> To compute it you need to know where the visitor it.
>
> On Oct 4, 6:39 pm, TheSweetlink wrote:
>
> > I want to insert all pos
Thank you too Farsheed. Didn't mean to leave you out there :)
-David
On Oct 5, 10:20 am, Farsheed Ashouri
wrote:
> Thank you Massimo, You solution is very good. I am using a javascript code
> that detects timezone and other things, but i should change it to your way
> for sure. Although this sc
Thank you so much Farsheed. I will test this and post my findings.
Pubsub over polling would save me a ton of bandwidth.
-David
On Oct 5, 1:52 pm, Farsheed Ashouri
wrote:
> Put something like this at the end of your page:
>
>
>
> ajax('../response_url', [''], 'jsrun');
>
>
> create a functio
No errors but no running of the listener.next() either. I tried to
put the function declaration above the {{extend...}} statement as per
the book but still no go.
I get up to subscribing to the channel just fine (but that's from
controller and passed to the view) verified via telnet to Redis but
Hello Alex,
Two things I've found when manually uploading via SQLFORM.factory:
1) You need to specify a table_name='...' to avoid the
no_table_newfilename.extension issue like this:
form = SQLFORM.factory(...Field definitions...,
table_name='some_table_name')
2) Additionally you must specify
For those interested in timezones and your international site I found
a nice js script after much hunting to detect utc timezone offset,
whether or not it is DST, and the hemisphere of the client.
https://bitbucket.org/pellepim/jstimezonedetect
Another plus: "Provided under the Do Whatever You W
r uploadfolder and tablename?
>
> On 6 Okt., 03:46, Massimo Di Pierro
> wrote:
>
> > Suggestions to make the behaviour better?
>
> > On Oct 5, 5:55 pm, TheSweetlink wrote:
>
> > > Hello Alex,
>
> > > Two things I've found when manua
+1
Coming from PHP months ago I had never touched python or anything
python related but was drawn to it by an article on how Disqus used
python and the whole MVC concept.
Tried Django but was met with less than nice responses when asking
questions while reading their book.
Found web2py as I like
I'm happy the upload works for you Alex.
> do I have to take care about directory traversals and other security
> risks? What's the easiest way to do this?
As I understand it the store() renaming of the file is what takes care
of the dir traversal protection.
I'm not a web2py dev so don't quote
Yes a user can by default can download() but how would the user know
the renamed filename though? I cannot say as I do not have much
detail behind your app. Depending on where you're saving what will
dictate what you should do better than any advice I can give. web2py
enables a great deal of sec
I've made something like this work. Perhaps something like this is
what you're looking for?
*UNTESTED CODE* but same exact concept as what I got to work for me
when making a list of forms.
tags = db(db.tags).select()
# For readability or if you need to do calculations or append more to
your
# SQ
which would not
> be good at all. I'm now testing for '..' in the filename, I hope
> that's sufficient and there is no way to circumvent this.
>
> On 9 Okt., 03:53, TheSweetlink wrote:
>
> > Yes a user can by default can download() but how would the user k
Full stack strikes again.
On Oct 12, 10:46 am, Massimo Di Pierro
wrote:
> The url is validated. .. is not allowed in the URL.
>
I commend you Massimo and happy to see you respond so level headed to
such an emotionally driven thread (elsewhere btw)...again.
CentOS 5 uses an old ver of python I believe but I stopped after 5.6.
The only way I got it to work was under virtualenv and that was after
compiling separate version of python (best not to dump the old version
as yum depends on python 2.4). As Peter states it will require great
manual labor on yo
On Oct 12, 8:08 pm, Daniel Aguayo wrote:
> El 12/10/11 18:17, Stefaan Himpe escribi :
>
> >> Do we need a policy about this?
>
> > "live and let live" ?
>
> ++1
>
> I would be worried if anyone take seriously enough another user signature
> ;3
+1 all of the above for funny and true.
> ... Or
+1 Foundation or Skeleton for mobile friendliness.
Seems much easier than adapting a custom grid.
I found one here a while ago if anyone is interested. Licensed under
GPL and MIT.
http://www.spry-soft.com/grids/
On Oct 18, 2:01 pm, Anthony wrote:
> All,
>
> There are plans to update the 'welc
I have a SQLFORM.factory that is respecting IS_NOT_EMPTY() for a field
with type='string' but not respecting it for a diffirent field of
type='list:string'.
If the list:string type field is left empty the form validates.
Confirmed with firebug.
Tested with form.accepts, form.process(...).accepte
I don't wish to irritate rather just curious to know if anyone else
can replicate this.
A SQLFORM.factory with an empty field of type='list:string' is
submitting as passed when an IS_NOT_EMPTY() validator is used in any
and every way possible.
The very same .factory has a field type string where
isinstance(value, list):
> ivalue = [ivalue]
> if not self.min<=len(ivalue)<=self.max:
> return (ivalue, self.error_message)
> return (ivalue, None)
>
> On Oct 23, 5:37 pm, TheSweetlink wrote:
>
> > I don't wish to irritate rather jus
Ugh, just realized, right from the online book:
"
Note that when multiple=True, IS_IN_SET will accept zero or more
values, i.e. it will accept the field when nothing has been selected.
"
How can I have multiple=true AND require the field? Is that possible?
David
TheSweetlink wrot
Hello Vasile,
I tried that and the IS_NOT_EMPTY() doesn't take.
I should really test if the IS_IN_SET() is working properly too but I
suspect that it is.
I need to find out how I can override that behavior I described above
from the book.
Apparently multiple=true allows IS_IN_SET() to pass vali
Thank you all for your help.
I was able to resolve the problem quirky as it may be but here we go.
For science!!!
To get a type='list:string' to fail validation if none passed from
your SQLFORM.factory form:
1) Used an onvalidation=... in my form.accepts(...) /
process(...).accepted / validate(.
in
order to get form.errors.fieldname to flash a form error?
Thank you.
David
On Oct 24, 10:25 am, Massimo Di Pierro
wrote:
> Good solutions. Not everything can be done with built-in validators.
>
> On Oct 24, 12:13 am, TheSweetlink wrote:
>
> > Thank you all for your help.
>
> > I wa
Cool, yes that is what I was asking about and thank you for the
answer. It makes sense, just like the rest of the framework.
David
On Oct 24, 12:35 pm, Massimo Di Pierro
wrote:
> If I understand the question...
> Because otherwise SQLFORM would not know where to display the error.
Is there a reason for using represent to make redirection links? You
may have an easier time creating redirection links with the A()
helper:
http://web2py.com/book/default/chapter/05?search=redirect
Apparently there is a new callback feature to the A helper which might
be helpful in your situati
Very cool. I especially enjoyed the tactful handling of web2py's
criticisms amongst the Python community as well as the fascinating
physics tangent. M lattice quantum chromodynamics.
May this bring even more attention to web2py.
David
On Oct 26, 3:17 pm, Bruno Rocha wrote:
> Massimo Di Pi
I have an app that polls for new messages and reloads a component when
there are new messages.
My problem is that when the component is refreshed/reloaded while a
user is typing, the message being typed disappears.
This makes sense because the component contains the form being
submitted. For exa
stuff
posted below:
http://groups.google.com/group/web2py/browse_thread/thread/fe03404c155aaf10/f9cb6c1ac67c3f49?lnk=gst&q=thesweetlink#f9cb6c1ac67c3f49
Two things I've found when manually uploading via SQLFORM.factory:
1) You need to specify a table_name=
displayed by
> the refresh (i.e., maybe used two separate components)?
>
> On Friday, October 28, 2011 3:16:41 PM UTC-4, TheSweetlink wrote:
>
> > I have an app that polls for new messages and reloads a component when
> > there are new messages.
>
> > My problem is
ascript and then fill the content back in once the component
> refreshes (i.e., do everything client side)?
>
> On Friday, October 28, 2011 5:56:54 PM UTC-4, TheSweetlink wrote:
>
> > Hi Anthony and thanks for your reply.
>
> > I do not believe that I can separate the form
How delightfully newbtastic of me. I don't have it working quite the
way I want to yet but it does indeed appear that a global JS variable
will do the trick.
Thanks for the help Anthony.
David
On Oct 28, 6:52 pm, Anthony wrote:
> On Friday, October 28, 2011 6:50:20 PM UTC-4, TheS
I am not certain that the case is the same but one thing I noticed
with SQLFORM.factory and hidden fields was that in order to pass a
hidden field from the SQLFORM.factory(...hidden=dict(Sir Robin: 'the
brave')) required that a Field(...) be defined for it in the form
definition.
To make it hidden
web2py will inspire the beginner and empower the advanced to rapidly
develop robust web applications with Python.
Its international community is both helpful and responsive to
questions ranging from the most basic to the complicated and advanced.
If you value ease of use, security, and rapid develo
Good upgrade!
I particularly like the Bossie Award at the top, the detailed
web2py_vs_others.pdf (needs a few minor corrections noted below), and /
what but I don't understand why the link is titled 3rd party tools.
Slide notes:
Slides 36 and 40 say SQLField instead of Field like in the Book.
94
Long time lurker here. First, thank you all for this incredible
product and community. I have learned a great deal in a very short
order of time thanks to web2py and this mailing list.
I may have the opportunity to finally contribute back meaningfully.
Regarding background message/task queuing
Hello Massimo,
I do not have any code I can share at the moment for this solution as
I am using it in my current project but I will be very happy to make a
detailed example tomorrow to share with the community. Do you have
any particular focus in mind? Async insert into db? What level of
detail
I did set it up for async insert into db to handle traffic spikes if
for example a bunch of people show up and start messaging.
I haven't used it for an e-mail queue yet but that is on my list of
things to do.
Once complete I will post a working e-mail queue solution.
It sounds like Massimo's we
Massimo,
I didn't realize that there were other efforts to integrate celery
with web2py aside from yours or that yours was completed already. I
only offered mine up as a possible easy alternative for those who want
queuing or async insert into db to smooth out traffic spikes. If it
can be of use
I am trying to use IS_IN_SET() in a 1 field SQLFORM.factory().
IS_IN_SET() is receiving a list of tuples like:
(['#8:5', 'Bob'), ('#4:2', 'Jane'), ... ]
The set shows up just fine as an dropdown select box but form.errors
shows:
" }> "
I tried to place T.force(None) in models and top of controll
Not sure if my post made it so I apologize if I am reposting. I will
not make any more attempts to post the text below:
Thanks for the quick reply Richard.
The bizarre thing is that I'm not passing anything to T in my code.
I am passing as an example:
sorted_stuff = [ ('#3:4', 'Monty'), ('#6:1
Massimo,
I tried to test web2py-celery but was only able to reach the step
where you run celeryd --loglevel=DEBUG -E
When I try to run:
celerybeat -S scheduler.Web2pyScheduler --loglevel=DEBUG
from the appname/modules/plugin_celery dir I get this error:
Pasted for viewability:
http://paste.poco
Yes sir I did that.
celeryd --loglevel=DEBUG -E
runs just fine but
celerybeat -S scheduler.Web2pyScheduler --loglevel=DEBUG
does not for me. Error posted above.
On Aug 18, 8:30 pm, Massimo Di Pierro
wrote:
> You must run it from the applications/app/modules/plugin_celery folder
>
Di Pierro
wrote:
> Can you try set
>
> export WEB2PY_PATH=/path/to/web2py
>
> On Aug 18, 8:01 pm, TheSweetlink wrote:
>
>
>
> > Yes sir I did that.
>
> > celeryd --loglevel=DEBUG -E
> > runs just fine but
>
> > celerybeat -S scheduler.Web2pySch
Upon further investigation I looked at validators.py to make sure I
was passing IS_IN_SET() the data it is looking for.
A list of tuples should be no problem. I suspect it must be either
the '#' or the ':' that's the problem.
1) Am I correct in assuming that it shouldn't matter if everything in
Please excuse my typo. I passed one dict as the validator expects
rather than a list of dicts.
>
> I also tried passing a list of dicts to IS_IN_SET() and get the same
> LazyT 'value not allowed' error.
>
Nevermind. Got it.
There was a mismatch in # of fields between SQLFORM.factory and my
custom form in the view.
This caused the form to have errors rather than being accepted.
I will be more careful in the future with my custom forms.
Thank you Richard for your help.
-David
I have a custom form for a SQLFORM.factory.
The form has two buttons:
Clicking either button will submit the form and request.vars will have
the correct value.
This works great until I try to LOAD my form as a component.
I was able to find out that when I LOAD my form, request.vars no
longer
Anthony you are the man. That is precisely what I needed to get on my
way.
This post in particular was roughly what I followed to accomplish what
I wanted to do.
http://forum.jquery.com/topic/submit-event-serialize-and-submit-buttons-get-the-button-name
For anyone else reading this it is worth
I would like to build an interface between web2py and OrientDB. It's
a NOSQL document-graph database with some astonishing features. See
http://www.orientechnologies.com for full details.
I have been communicating between the two via the requests python lib
and OrientDB's RESTful interface. The
Thanks for your quick reply Vasile. I am truly impressed with this
community.
There are some interesting comparisons between MongoDB and OrientDB.
I chose Orient for my project because of the graph capabilities on top
of its document capabilities.
The mongo adapter is probably a good starting po
Strangely I didn't even consider using strictly OrientDB as up until
now I have been using mysql or postgres for login/profile actions and
OrientDB for the rest. It would be wonderful to use OrientDB for the
entire application.
Storing on disk would be nice for me but OrientDB has a binary type
f
I have not run OrientDB in production but spent the last month
converting my application from mysql --> Orient. I know that Luca
Garulli has been developing this since 1999 or '97 or so and that it's
made available under the Apache 2.0 license.
He has personally responded quite helpfully to my qu
Please tell me where in the source code I can find out how web2py
renames files to prevent directory traversal attacks.
I want to emulate upload field behaviour of renaming the file and
saving it to uploads dir with a reference to it in a currently
unsupported DB.
Thank you
-David
Yes that is precisely what I was searching for.
Thank you for your turbo reply pbreit.
On Sep 1, 2:44 pm, pbreit wrote:
> Is this it?http://code.google.com/p/web2py/source/browse/gluon/dal.py#5329
82 matches
Mail list logo