Hello !
Because I needed mutagen in a project, I added this to the __init__.py
of my application:
import sys, os
# add modules dir to sys.path
sys.path.append( os.path.abspath(request.folder + 'modules/'))
It works like a charm but why isn't modules already in sys.path
since its purpose is to
I just guess, perhaps that would pollute the sys.path. Imagine this
case, app_one and app_two both have a homebred module named modules/
mylib.py, you can not know which one is actually called when using
just import mylib.
Searching from this maillist, I found some post relevant to this topic
10x for your kind replies...By using firebug debugger, I was able to solve
the problem. When I used {{=URL(r=request,f='getcities')}}, the URL function
was not working in the controller. And hence I had to give the absolute path
to solve the problem.
regards,
Nithin Kumar M.
On Sat, Apr 25,
Hi,
Thanks for your replies. I actually messed with some paths in my
code. So it was accessing some old code and hence the new code wasnt
working. Anyhow, thank you very much for your reply mdipierro. I'm able to
solve my problem. :)
regards,
Nithin Kumar M.
On Tue, Apr 28, 2009 at
Yes, this conclusion is mostly in line with mine, but it's very
synthetic - in real life you'll see a larger boost (as you're not
downloading a single file).
Also, the encoding is I think most easily done through the mimetypes
module - it will recognize the extension and the compression so you
Good god.. I love you! I just requested this! Where you listening to
me!? I am touch. ;_;
Regards,
Jason
On Mon, 2009-04-27 at 22:23 -0700, mdipierro wrote:
SQLField('fieldname','upload',length='256',rememberfilename=True)
Do I need to say more?
Just try with appadmin (requires
Since I adapt the following code from Django to Web2py:
from reportlab.pdfgen import canvas
from django.http import HttpResponse
def some_view(request):
# Create the HttpResponse object with the appropriate PDF headers.
response = HttpResponse(mimetype='application/pdf')
I see... but I don't think the helper would be that useful because
imported modules may themselves import other modules, with the usual
import keyword, not the helper.
Perhaps applications could have the privilege to install libraries in
contrib when they install ? Some post-install script could
I need to create some links to pdf files saved in a static/pdf folder.
I found an example in the book for images using :
URL(r=request,c='static',f='myimage.png')
is that ok adding the folder name to the f parameter like:
URL(r=request,c='static',f='pdf/mypdffile.pdf') ?
carlo
I don't have much to say about the helper. But when talking about the
__init__.py proposal, I still think it is dangerous. The pollution
is not just about elegance or so, it could be about totally unusable.
Should namespace collision happen, the first app being visited
overwhelms the latter, the
Not sure, but why not just try and come back to tell us the
conclusion? :-)
On Apr28, 9:12pm, carlo syseng...@gmail.com wrote:
I need to create some links to pdf files saved in a static/pdf folder.
I found an example in the book for images using :
URL(r=request,c='static',f='myimage.png')
It does already if you define
SQLField(...label=T('fieldname'))
On Apr 28, 12:50 am, Francisco Gama francisco@gmail.com wrote:
what about db fields?
It's funny I was working atm the moment to make SQLForm() and SQLTable
() generate internationazable fields.
Example:
SQLFORM(db.table,
This is tentative. There may be a better way.
On Apr 28, 7:48 am, Jason Brower encomp...@gmail.com wrote:
Good god.. I love you! I just requested this! Where you listening to
me!? I am touch. ;_;
Regards,
Jason
On Mon, 2009-04-27 at 22:23 -0700, mdipierro wrote:
yes
On Apr 28, 8:12 am, carlo syseng...@gmail.com wrote:
I need to create some links to pdf files saved in a static/pdf folder.
I found an example in the book for images using :
URL(r=request,c='static',f='myimage.png')
is that ok adding the folder name to the f parameter like:
On 28 abr, 12:52, Jose jjac...@gmail.com wrote:
Since I adapt the following code from Django to Web2py:
from reportlab.pdfgen import canvas
from django.http import HttpResponse
def some_view(request):
# Create the HttpResponse object with the appropriate PDF headers.
response =
di you mean that all __init__.py files are executed, no matter what
application is being used ?
On Apr 28, 3:14 pm, Iceberg iceb...@21cn.com wrote:
I don't have much to say about the helper. But when talking about the
__init__.py proposal, I still think it is dangerous. The pollution
is not
WooHoo! Now I can ditch my workaround...
Brian
On Apr 28, 12:23 am, mdipierro mdipie...@cs.depaul.edu wrote:
SQLField('fieldname','upload',length='256',rememberfilename=True)
Do I need to say more?
Just try with appadmin (requires appadmin from trunk)
As Iceberg suggested I tried and it is working indeed!
carlo
On 28 Apr, 15:17, Iceberg iceb...@21cn.com wrote:
Not sure, but why not just try and come back to tell us the
conclusion? :-)
On Apr28, 9:12pm, carlo syseng...@gmail.com wrote:
I need to create some links to pdf files saved in
Definitely, a CMS with profiles and contact info is the way to go. I
consult on various projects (2 going on right now based on web2py) and
have 2 of my own websites, which I plan on converting to web2py as
soon as I have the time. But I don't have a formal website advertising
myself, so a
Hi Massimo and Hi list,
I've a question about css frameworks. Is there planned support for framework
like YAML or Blueprint?
Or is there a way to simple integrate a css framework into web2py?
Thank you!
--~--~-~--~~~---~--~~
You received this message because you
So far I'm using blueprint for my layouts. It's as easy as dropping
blueprint files in application/static and then call the css:
link href={{=URL(r=request,c='static',f='grid.css')}}
media=screen rel=stylesheet type=text/css
On Apr 28, 4:17 pm, Angelo Compagnucci angelo.compagnu...@gmail.com
Hi,
I'm running trunk version and I get this trace when adding accentued
(é) caracters in a translation string:
Traceback (most recent call last):
File C:\Documents and Settings\m_desfresnes\Mes documents\web2py-svn
\gluon\restricted.py, line 102, in restricted
exec ccode in environment
I'm experiencing a strange behavior within the code below. I tried to
split the problem in the smallest pieces which I'm able to debug. My
interpretation of the findings is that most likely I run into a web2py
internal variable length issue/limitation. Let me tell you why I think
that:
The
How are you editing the translation strings? Ra eyou doing it via the
interface? If not mind that translations must be UTF8.
On Apr 28, 9:32 am, desfrenes desfre...@gmail.com wrote:
Hi,
I'm running trunk version and I get this trace when adding accentued
(é) caracters in a translation
Using this alternative works:
response.flash = str(T('Song uploaded: %s - %s [%s]')) % (str(audio
[artist][0]),str(audio[title][0]),str(audio[album][0]))
but T([...], dict([...])) doesn't.
On Apr 28, 5:28 pm, desfrenes desfre...@gmail.com wrote:
Googling for 'ascii' codec can't decode byte
I would suggest:
1) add RST parsing functionality to web2py just like markdown is
already in.
http://bazaar.launchpad.net/~mdipierro/web2py-wiki/trunk/annotate/head%3A/models/rest.py
2) use rst2pdf for creation of your PDF files
http://code.google.com/p/rst2pdf/
It will to all kind of things
Is there an example for creating submenus in web2py?
I could only create a main menu with the response.menu function.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
web2py Web Framework group.
To post to this
The T3 app has code in it that does it.
On Apr 28, 11:29 am, Timmie timmichel...@gmx-topmail.de wrote:
Is there an example for creating submenus in web2py?
I could only create a main menu with the response.menu function.
--~--~-~--~~~---~--~~
You received this
Hi,
I would like to use the jsonpickle module - http://code.google.com/p/jsonpickle/
- with web2py.
I thought to just place it in the modules dir of my app and to import
it into a controller via
import applications.myapp.modules.jsonpickle
, however it complains with 'ImportError: No module
Hi all,
I think I found an issue into gluon\contrib\memcache\__init__.py
The 'key' parameter is missing for 'set' function
And I had to add import time to make it work
Hope this help here as I don't know where to post a patch.
Regards,
Nicolas
Here is the modified code:
---
Thank you. I will post it to trunk asap.
On Apr 28, 11:46 am, NicolasB nicolas.bn...@gmail.com wrote:
Hi all,
I think I found an issue into gluon\contrib\memcache\__init__.py
The 'key' parameter is missing for 'set' function
And I had to add import time to make it work
Hope this help
Yes it is a patch issue. three solutions
1) if you want jsonpicker in your app you need to edit the import
statements, including import simplejson
2) if you run from source, simply install jsonpickler in site-packages
and use it normally
3) you can install it under gluon/contrib and it will be
On Tue, Apr 28, 2009 at 12:00 PM, mdipierro mdipie...@cs.depaul.edu wrote:
There is one issue with my solution.
If you upload a file filename.abc, it is internally renamed as lots-of-
junk--filename.abc
and you can download it with
http:///download/lots-of-junk--filename.abc
It works
say more about this URL function was not working in the
controller
What was going on?
On Tue, Apr 28, 2009 at 4:10 AM, Nithin Kumar M mara.ku...@gmail.comwrote:
10x for your kind replies...By using firebug debugger, I was able to solve
the problem. When I used
Thanks so much for your response. I'll give option 3 a try.
Regards,
HC
On Apr 28, 7:38 pm, mdipierro mdipie...@cs.depaul.edu wrote:
Yes it is a patch issue. three solutions
1) if you want jsonpicker in your app you need to edit the import
statements, including import simplejson
2) if you
it would give more flexibility but would not solve the original
problem.
On Apr 28, 12:41 pm, Álvaro Justen [Turicas] alvarojus...@gmail.com
wrote:
On Tue, Apr 28, 2009 at 12:00 PM, mdipierro mdipie...@cs.depaul.edu wrote:
There is one issue with my solution.
If you upload a file
On Tue, Apr 28, 2009 at 2:55 PM, mdipierro mdipie...@cs.depaul.edu wrote:
it would give more flexibility but would not solve the original
problem.
So I didn't understand the original problem. :-)
Anyway...we can add that feature?
On Apr 28, 12:41 pm, Álvaro Justen [Turicas]
Hello,
I have created appliance that can be used for testing of web2py.
Currently available images are based on Version 1.61.4 (2009-04-21
10:02:50) of web2py
It will start web2py automatically on boot of virtual machine.
You can download images for writing on USB stick from URL bellow.
have you considered filename.abc -- uuid.abc ?if you _always_ store the
original filename this should be ok.
Another alternative is to hexify the filename, then the character encoding
would be irrelevant, and this is simpler than uuid (and decodable), e.g.
ABC.abc == 414243.616263
...there
I have several issues concerning internationalization, that I'd like
to present.
1. There are several strings on the administrator panel, that don't
use the T function, and therefor cannot be translated. Is that on
purpose? If not, I am willing to take the time, locate those strings,
and make
On Apr 28, 1:40 pm, Yarko Tymciurak yark...@gmail.com wrote:
have you considered filename.abc -- uuid.abc ?if you _always_ store the
original filename this should be ok.
uuids is how web2y always worked and still does by default.
Another alternative is to hexify the filename, then the
On Apr 28, 1:43 pm, guruyaya guruy...@gmail.com wrote:
I have several issues concerning internationalization, that I'd like
to present.
1. There are several strings on the administrator panel, that don't
use the T function, and therefor cannot be translated. Is that on
purpose? If not, I am
This solves the problem of storing it but not the problem of
downloading a file with a fancy name. We would lose the ability to
search the uploaded files by filename.
Not if you ALWAYS store by uploaded filename, and have the stored name as a
field for retrieval only...
Maybe I don't see
Let's say I upload a file called 漢.dat from a windows machine, how do
I download it from a Unix machine? I just do not know different
browsers and
OSs will handle it and it may cause vulnerabilities. Anyway, I like
the idea of hexing and it probably better than the current solution. I
will try it
Wow.
Virtual machine running what OS? linux?
On Apr 28, 2:34 pm, Boris Manojlovic boris.manojlo...@gmail.com
wrote:
Hello,
I have created appliance that can be used for testing of web2py.
Currently available images are based on Version 1.61.4 (2009-04-21
10:02:50) of web2py
It will start
fixed in trunk. Can you please email me your last name so I can add
your name to the list of contributors.
Massimo
On Apr 28, 11:46 am, NicolasB nicolas.bn...@gmail.com wrote:
Hi all,
I think I found an issue into gluon\contrib\memcache\__init__.py
The 'key' parameter is missing for 'set'
This is fantastic and I have been looking for this in long time.
I have some questions:
- what's the default username and password? I cannot login ;-(
- could you redo it with ubuntu instead of suse?
- does it use mod_wsgi? if not can that be added?
- could we have a web2py themed background?
-
Considering that we are moving to google mercurial soon. Can this be
done there too?
Massimo
On Apr 28, 4:42 pm, Tim Michelsen timmichel...@gmx-topmail.de wrote:
Hello,
please see here:https://edge.launchpad.net/web2py-project
You may now register your projects (applicances) hosted at LP
good link - thanks!
2009/4/28 mdipierro mdipie...@cs.depaul.edu
I found this which answers some of my questions
http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http
On 28 Apr, 14:30, Yarko Tymciurak yark...@gmail.com wrote:
To add the email/password, try these switches with appcfg.py:
--email=...
--passin
http://code.google.com/appengine/docs/python/tools/uploadinganapp.html#Command_Line_Arguments
Robin
On Apr 28, 5:03 pm, mdipierro mdipie...@cs.depaul.edu wrote:
would somebody be able to send a piece of Python
aaah my stupidity to not give all details...
user root
pass web2py
user web2py
pass web2py (or linux :) )
this is done with help of susestudio.com and as such behind is always
opensuse 11.1 (except if i'm bored enough and use KIWI imaging system by
myself and create new image from scratch)
Hi Robin,
I am trying to do this programmatically and I cannot use os.system
because a shell my may not be available.
Massimo
On 28 Apr, 18:54, Robin B robi...@gmail.com wrote:
To add the email/password, try these switches with appcfg.py:
--email=...
--passin
Yarko, thanks for your useful reply. Yes, you are correct, this is
essentially a python question, not a web2py question. What's so
wonderful about web2py is how seamlessly and transparently integrated
it can *appear* to be with python and the web. However, the correct
syntax can be nuanced, like
I think I figured it out. On mac the code is
import sys
path='/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/appcfg.py'
sys.path.append(path)
fixed in trunk. I tried with chinese filename and works great!
Massimo
On 28 Apr, 18:36, Yarko Tymciurak yark...@gmail.com wrote:
good link - thanks!
2009/4/28 mdipierro mdipie...@cs.depaul.edu
I found this which answers some of my questions
Maybe we can store the uploaded file on disk as:
lots-of-junk__encoded-filename.abc
where:
lots-of-junk is a unique hash string as web2py currently does.
encoded-filename.abc can be the original filename encoded by base64
to make it appears as ascii-char only on disk.
Then when
I have changed this again. Here is how it works
NO MORE
SQLField('file','update',rememberfilename=True)
NO MORE rememberfilename=True at all
NOW
SQLField('test','upload')
always remembers the filename (話.dat) and encodes it in the stored
filename.
Seem like my last post was not published for some reason, so I'll
issue the same issues again.
1. There are several strings in the admin panel, that don't use the T
function to make them available for translate. Is there a reason? If
not, I'm willing to put the effort and locate these strings, so
OK, Oddly I didn't see the quistion I asked, and the aswer until I
posted the 2nd. God help google groups.
Anyway, thanks for your answers. I imagine I'll find the time to
handle 1 and 2 this weekend.
On Apr 29, 6:47 am, guruyaya guruy...@gmail.com wrote:
Seem like my last post was not
You're welcome, Weheh - I'm glad you found it helpful.
On Tue, Apr 28, 2009 at 8:05 PM, weheh richard_gor...@verizon.net wrote:
Yarko, thanks for your useful reply. Yes, you are correct, this is
essentially a python question, not a web2py question. What's so
wonderful about web2py is how
there is a new experimental feature in trunk.
run from source
easy_install mercurial
go to web2py admin and design an app
you will notice a new menu item [mercurial]
if you click on it it creates new mercurial repo associated to the
app.
if you write a comment and commit the current app gets
Oh, Man, Massimo - this is great
I'll look in a few mintues...
I'm thinking this is just the tip of a workflow thing - we should talk a
bit...
First: local repo is good (localhost);
Second: deploy to remote server
Third: commit to project or public place (e.g. bitbucket or google
source,
62 matches
Mail list logo