In a web2py application I generate .vcf and .ics files using web2py's
templating features. The problem is that all the code in {{}} results in
empty lines, which is no problem on my Mac, but Google doesn't allow empty
lines. For example, this:
{{response.headers['Content-Disposition'] = 'attac
Yeah, with instantpress, you can manage users, create tags and categories,
publish articles in few seconds and more. It also has the ability to manage
comments. To see more, I think you should download it and add it as an
application to your web2py framework to see how it works. Most of your
config
Thanks for the replies. Pbreit, you pointed the real issue -- what should I
call the arguments (addperiodform.vars.id), that are passed from the goal
function to the addingperiod function?
from the controller file:
def goal():
...some code...
addperiodform = SQLFORM(db.period, field
If smartgrid is used to edit the values of fields in auth_user that are
designated unique=True, smartgrid will crash when a duplicate value is
entered. Here's a ticket trace. SQLite is the underlying db. Incidentally,
this is my first go at grid and smartgrid and I'm very impressed. Kudos.
Fi
Heh, no worries. :-)
I wonder, just out of interest, is there any great performance difference
between searching for records containing region.id 'x' (as below) rather
than returning all rows with region.id 'x' from a junction table?
Chris
On Sat, Apr 14, 2012 at 11:34 PM, villas wrote:
> Oops
This went away, don't know why or how..
On Saturday, April 14, 2012 11:17:51 AM UTC-4, Yarin wrote:
>
> When inserting records with web2py's db class, my string values have
> vertical bars surrounding them. I don't remember seeing this behavior
> before. What's more, if i insert records through
>
> In a web2py application I generate .vcf and .ics files using web2py's
> templating features. The problem is that all the code in {{}} results in
> empty lines, which is no problem on my Mac, but Google doesn't allow empty
> lines. For example, this:
>
> {{response.headers['Content-Disposit
Only SQLFORM has a custom attribute.
You are using FORM.
Look into gluon/contrib/login_methods/oauth2_auth.py there is sample code
in there.
On Saturday, 14 April 2012 09:33:51 UTC-5, SB wrote:
>
> how to access google spreadsheets using Oauth2 in web2py. Need help.
>
there is a chat in KPAX (in its own controller). Not very efficient because
does not uses websockets but works. You may want to look also into
gluon/contrib/comet_messaging.py
On Friday, 13 April 2012 17:30:19 UTC-5, cyan wrote:
>
>
> Hi group,
>
> I am trying to make a minimal multiuser chat-li
Fixed in trunk.
On Saturday, 14 April 2012 23:10:18 UTC-5, tomt wrote:
>
> I discovered why the archive table wasn't being created, there is a typo
> in gluon/tools.py at line 1293:
> for table in tables:
> if 'modifed_on' in table.fields():
> should be
> for table in
Please submit a google code ticket.
On Sunday, 15 April 2012 06:09:19 UTC-5, weheh wrote:
>
> If smartgrid is used to edit the values of fields in auth_user that are
> designated unique=True, smartgrid will crash when a duplicate value is
> entered. Here's a ticket trace. SQLite is the underlyin
Thanks a bunch DenesL, Do you know how I could use SQLFORM and have the
checkboxes added to each row in the form? I couldn't figure that out.
On Sunday, April 15, 2012 7:12:13 AM UTC-7, DenesL wrote:
>
>
> Only SQLFORM has a custom attribute.
> You are using FORM.
>
>
>
when I change FORM to SQLFORM i get error
'THEAD' object has no attribute 'writable'
On Sunday, April 15, 2012 7:58:37 AM UTC-7, web2py_Superfan wrote:
>
> Thanks a bunch DenesL, Do you know how I could use SQLFORM and have the
> checkboxes added to each row in the form? I couldn't figure th
Depends, but I think there would always be a difference in favour of
normalized data because the data access is fully indexed. However, this
difference may be almost negligible if your main table is less than say 10K
records and your queries are simple.
In my experience, where performance
You can not just substitute FORM with SQLFORM.
In your case it is better to stick with FORM and use element to access and
modify the table inside the form.
tbod=form.element('table tbody') # the body of the SQLTABLE
tbod is a list of the table rows, so tbod[0] is the first TR
and each TR is a li
Thanks again, will give it a shot
On Sunday, April 15, 2012 9:39:32 AM UTC-7, DenesL wrote:
>
>
> You can not just substitute FORM with SQLFORM.
> In your case it is better to stick with FORM and use element to access and
> modify the table inside the form.
>
> tbod=form.element('table tbody') #
I think it was the server. I rebuilt/installed from scratch OS etc.. the
server last night and now it seems to be running without problems. I am
slowing increasing the load to see how well it handles before moving it to
the new site again.
On Sat, Apr 14, 2012 at 8:13 PM, Bruno Rocha wrote:
> We
Hi,
I want to load test my server to see how much it can handle while running
my web2py app. I came across Jmeter has any used this or have a better
suggestion?
http://jmeter.apache.org/
--
--
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.fitt
On Sun, 15 Apr 2012 07:36:19 +0100, doncoleon...@gmail.com said:
> So you mean I should just click the 'configure' file?
You need to do this from the command line.
> And how do I add
> the parameters, are u saying
It's "you", not "u".
You need a open a terminal window and type in the commands
I've just tried it out.
Unzip the latest stable source code of web2py to a folder, say,
"web2py_src".
Go to Eclipse - Preferences - PyDev - 'Interpreter - Python'
In the 'System PYTHONPATH' window, add 'web2py_src' to the path.
So far, it seems autocomplete is working without doing all the impo
got a problem with my routes
routes_in = (
('/asdf', '/aggat/default/rules'),
)
routes_out = (
('/aggat/default/rules', '/asdf'),
)
isn't working, but i followed the same format on the web2py tutorial
defining the base router works when i have that defined alone
Not fixed yet in trunk. There is a regex replacement proposal in the issue
page by Massimo.
El sábado, 14 de abril de 2012 22:44:41 UTC-3, pyhead escribió:
>
>
> Hi web2py users,
>
> db = DAL('imap://') successfully logs in to the mail server, but fails
> when the commonly used spaces or '.' are
Does web2py automatically save a cPickle in the database as gluon.storage?
Because I saved ads with the web2py framework, however now when trying to
load them with the old framework I get an error ImportError: No module
named gluon.storage when I don't use gluon at all in that old framework.
--
-
What exactly did you save in the database?
On Sunday, April 15, 2012 8:10:50 PM UTC-4, Bruce Wade wrote:
>
> Does web2py automatically save a cPickle in the database as gluon.storage?
> Because I saved ads with the web2py framework, however now when trying to
> load them with the old framework I
ads = []
if random_ads:
for index, url in enumerate(random_ads):
ads.append({
'index': index,
'id': url['id'],
'url': url['url'],
'valid': '',
And what are the index, url['id'], and url['url'] objects? Are any of them
storage objects?
On Sunday, April 15, 2012 8:19:45 PM UTC-4, Bruce Wade wrote:
>
>ads = []
>if random_ads:
> for index, url in enumerate(random_ads):
> ads.append
url['id'] = integer
url['url'] = string
On Sun, Apr 15, 2012 at 7:03 PM, Anthony wrote:
> And what are the index, url['id'], and url['url'] objects? Are any of them
> storage objects?
>
>
> On Sunday, April 15, 2012 8:19:45 PM UTC-4, Bruce Wade wrote:
>>
>>ads = []
>>if r
Omi,
Sorry, my bad. Been away.
Should be:
sub_menu = [('Admin', False, URL('admin'), []), ] # Added empty list
On Thursday, April 12, 2012 9:43:39 AM UTC-4, Omi Chiba wrote:
>
> Cliff,
>
> Thank you for sharing code but now I got a different error. Maybe it
> cannot understand sub_menu
Good point.
Also that is the rule of thumb for we applications.
A request that can make a change to a resource should be a POST.
A request to access a resource should be a GET.
On Thursday, April 12, 2012 8:15:09 AM UTC-4, villas wrote:
>
> My conclusion is that it is better to submit search fo
I'm building an administrative interface where only the admin can register
new users. Upon registering a new user, the system will email login and
initial temporary password to user. I'm using the auth_user table but with
a customized form and create action. Is there a way to capture the passwor
Cliff,
Thanks ! I'm on vacation but I will try when I come back but I'm sure it
works !!
On Sun, Apr 15, 2012 at 9:52 PM, Cliff wrote:
> Omi,
>
> Sorry, my bad. Been away.
>
> Should be:
> sub_menu = [('Admin', False, URL('admin'), []), ] # Added empty list
>
> On Thursday, April 12, 20
use request.vars.password to get unencrypted and form.vars.password for
encrypted if you use requires CRYPT()
On Sun, Apr 15, 2012 at 8:06 PM, weheh wrote:
> I'm building an administrative interface where only the admin can register
> new users. Upon registering a new user, the system will email
In one of my applications, I create users by hand as well with a custom
form. My flow goes something like this:
1. Fill out the Create User form. There are is no password field here.
2. In the function that processes the form, I generate a random, readable
password at the beginning.
3. Before i
that makes sense. thanks!
On Monday, April 16, 2012 11:39:52 AM UTC+8, Matt Gorecki wrote:
>
> In one of my applications, I create users by hand as well with a custom
> form. My flow goes something like this:
>
> 1. Fill out the Create User form. There are is no password field here.
> 2. In the
Thanks, Bruce. It's good to know where this is being stored. Actually, I
like Matt's suggestion for auto-password generation. I'm doing this for a
client and I assumed they wanted to choose the password, but Matt's
approach makes more sense to me.
On Monday, April 16, 2012 11:38:09 AM UTC+8, Br
Will the proposed solution solve the problem?
replace mailbox_name = mailbox.replace("[", "").replace("]", "").replace("/",
"_")
with
mailbox_name = re.sub('[^_\w]','',re.sub('[/ ]','_',mailbox))
On Sunday, 15 April 2012 18:40:29 UTC-5, Alan Etkin wrote:
>
> Not fixed yet in trunk. There is
I assume a Storage object got into some part of one of your ads objects
somehow. How is the url object created? Aside from that insert code, is
there any other code that updates the records?
On Sunday, April 15, 2012 10:27:41 PM UTC-4, Bruce Wade wrote:
>
> url['id'] = integer
> url['url'] = str
The code I showed you is exactly how ads are created and stored in the
database. It is all through that code.
The code that updates the code uses cPickle.loads and treats it like a
python object updating the array then redumps it cPickle.dumps before
saving.
This is the exact same code I use in t
Hi Anthony,
Thanks for your reply.
You could do:
>
> {{if organization:}}FN: {{=organization.name}}
> ORG: {{=organization.name}}{{pass}}
>
> and you won't get any blank lines when there is an organization, but I
> think you'll still get two blank lines when there is no organization.
>
This won
>
> The code I showed you is exactly how ads are created and stored in the
> database. It is all through that code.
The code doesn't show how the random_ads object and the url objects it
contains are created.
> The code that updates the code uses cPickle.loads and treats it like a
> python
You might also try inspecting the contents of some of the records. Do all
records include a Storage object, or just some? What part of the dumped
"ads" object is a Storage object? This may provide some clues.
Anthony
On Monday, April 16, 2012 1:27:19 AM UTC-4, Anthony wrote:
>
> The code I show
random ads web2py query:
unseen_ads = unseen_ads_query.select(orderby='', limitby=(0,5))
return unseen_ads
update is pretty much the exact same code as provided before, with the
different it appends to the list of ads it got from the database.
today_ads = self.db((self.db.viewedads.member_id == me
Sorry, my mistake -- there is no "context" argument. Just pass the dict as
an unnamed argument, or pass each item as its own keyword argument:
response.render(dict(organization=session.organization, ...))
or just:
response.render(organization=session.organization, ...)
Side note: you don't nee
>
> random_ads = self._get_random_urls(ad_ids_to_skip)
> for new_ad in random_ads:
> ad_details = {
> 'index':start_index,
> 'id':new_ad['id'],
> 'url':new_ad['url'],
> 'valid':'',
>
Hi Anthony,
Thanks for your help, problem solved.
Side note: you don't need the line continuation slash ("\") if what you're
> continuing is in parentheses.
>
I appreciate the side node.
Kind regards,
Annet
It gives me an error -
*-bash-3.2$ python anyserver.py -s gunicorn -i 72.3.247.225 -p 9065*
starting gunicorn on 72.3.247.225:9065...
Traceback (most recent call last):
File "anyserver.py", line 299, in
main()
File "anyserver.py", line 295, in main
run(options.server,options.ip,optio
47 matches
Mail list logo