[web2py] Re: git integration application
Hi, looking at the code: https://github.com/web2py/web2py/blob/master/applications/admin/controllers/default.py#L250 the repository url must finish with '.git' Paolo On Thursday, November 20, 2014 1:03:41 AM UTC+1, Ian Bell wrote: So here's the basic problem. I have pushed our web2py application to https://github.com/CoolProp/Coolprop-Online , and I would like to add this application to my web2py instance running on pythonanywhere.com (props to them btw, PA is a great solution for getting going with web2py). I tried to add the app with the URL to the github repo in the box labeled Or Get from URL (can be a git repo) by putting in https://github.com/CoolProp/Coolprop-Online and then I got an error that it couldn't add this app. And nothing else in terms of error message. Quite a useless error message. So then I tried the same thing with one of the apps from https://github.com/mdipierro/web2py-appliances . I still can't get it to import one of these appliances. How is that supposed to work? I don't want to point to the .w2p file since that has to be manually exported from the admin interface, unless I am understanding something fundamentally incorrectly. The w2p files are not updated (unless manually) if other changes are made in the appliance. The docs are pretty sparse on how this is supposed to work. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: auth.messages.verify_email html template
@Lisandro, would happen to have these code snippets handy to share? I'm interested in using the mailgun api too. Either way, thanks for checking! My best, Jay On Tuesday, October 29, 2013 5:46:51 PM UTC-4, Lisandro wrote: ... For those interested in doing that, is just as simple as instantiating Auth class and overwriting wanted methods, for example, I overwrited register and email_reset_password methods in Auth class, that is, to send my custom emails on register and request reset password respectively. Regards, Lisandro. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: auth.messages.verify_email html template
Hi Jay Martin. Actually, I ended up coding my own functions instead of instantiating the Auth class. That is, I coded my own login, register, reset_password, etc functions. For example, for the login, this is the code in the controller: # This code should run when the users posts the form with all required data, and after doing some validation to the data provided from gluon.tools import web2py_uuid registration_key = web2py_uuid() db.auth_user.insert(\ first_name=form.vars.first_name, \ last_name=form.vars.last_name, \ email=form.vars.email, \ password=db.auth_user.password.validate(form.vars.password)[0], \ registration_key=registration_key) mail.send(to=form.vars.email, subject='Confirm your registration', \ message='Hi %s, thanks for registering in our website!\n\n' %first_name + \ 'To finish the registration, please click on the next link:\n' + \ '%s\n\n' %URL('default', 'user/verify_email/%s' %registration_key, host= request.env.http_host)) Then, in the default/user/verify_email I use this code: registration_key = request.args(1) user = db(db.auth_user.registration_key==registration_key).select().first() if not user: redirect(URL('default', 'index')) user.update_record(registration_key='') auth.login_user(user) session.flash = 'Your registration has been confirmed. Thanks!' redirect(URL('init', 'default', 'index')) I hope it helps! El sábado, 22 de noviembre de 2014 10:39:12 UTC-3, Jay Martin escribió: @Lisandro, would happen to have these code snippets handy to share? I'm interested in using the mailgun api too. Either way, thanks for checking! My best, Jay On Tuesday, October 29, 2013 5:46:51 PM UTC-4, Lisandro wrote: ... For those interested in doing that, is just as simple as instantiating Auth class and overwriting wanted methods, for example, I overwrited register and email_reset_password methods in Auth class, that is, to send my custom emails on register and request reset password respectively. Regards, Lisandro. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: auth.messages.verify_email html template
Extremely helpful! Thanks Lisandro. I'll be sure to share any tweaks... On Saturday, November 22, 2014 8:56:06 AM UTC-5, Lisandro wrote: ... I hope it helps! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py RESTful timeout
My python script is getting a stock price from google finance and then posting (using RESTful api) to my web2py application every 15 minutes. When I look at the log files everything works for awhile, but after a couple hours every POST will timeout. If I load the application's default/index page from a web browser then the RESTful POST works for another hour or two and then it times out again. I've run the web2py server on pythonanywhere and on a local computer with the same results. r = requests.post(url, headers=headers, data=json.dumps(payload), timeout=360) def POST(table_name,**vars): if table_name == 'VEXMX': row = db(db.VEXMX.date==vars['date']).select().first() if row: result = {'exists':1, 'id':row.id, 'errors': {}} result = dict(result=result) else: result = dict(db.VEXMX.validate_and_insert(**vars)) result['exists'] = 0 result = dict(result=result) return result On Friday, November 21, 2014 3:55:31 PM UTC-7, Massimo Di Pierro wrote: We need more details. How often do you post? How long does it take to get a response? On Friday, 21 November 2014 09:36:36 UTC-6, Bart wrote: I have a python script that posts data to my web2py/application/projects database using RESTful services. Everything works fine for an hour or two, but then all future posts will timeout. If, using a web browser, I reload the web2py application's main page then the RESTful services start working again for another hour or two. Any ideas why I cant run a script 24/7 to GET/POST data to my web2py application's RESTful services? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Possible to use CAS/Single Signon with custom auth_db?
If you add fields to auth_user than you can still use CAS. If you use your own authentication logic, than I cannot say without more details. On Saturday, 22 November 2014 00:55:52 UTC-6, LoveWeb2py wrote: Hello, I'm trying to use Web2py's CAS feature and database cooperation. I tried to follow this article: http://www.web2pyslices.com/slice/show/1877/single-login-by-two-different-ways And it looks good, but what if I'm using custom authentication? The appliance found here: https://github.com/mdipierro/web2py-appliances/tree/master/PyForum2 uses custom authentication and I'm not what the best approach would be to use central authentication between two appliances. Main appliance: Uses web2py's basic authentication Forum Appliance: Uses custom auth here is a sample of the db.py ## Authentication Schema (3 tables) db.define_table('auth_users', db.Field('auth_email', 'string', length=128, required=True), db.Field('auth_passwd', 'string', length=128, required=True), db.Field('auth_created_on', 'string', required=True), db.Field('auth_modified_on', 'string', required=True), db.Field('is_enabled', 'boolean', required=False, default=True), migrate='auth_users.table', fake_migrate=fake_migrate) Is CAS an option here? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py and security
What aspect of security are you concerned about? Are you asking how to configure web2py for maximum security? Are there aspects of the security model you feel need boosting? Have you read the manual about web2py and security? I'm not an expert, but as I understand it, security was one of the prime design goals of web2py. On Wednesday, November 19, 2014 8:42:12 PM UTC-5, James O' Driscoll wrote: Are there any good resources on how to boost the security of web2py. Regards, James -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.