[web2py] Re: Getting more form, y'all
On Tuesday, January 10, 2017 at 3:04:13 PM UTC-8, Dave S wrote: > Maybe replace the top part with? > > form = SQLFORM(db.QuarterMaster) > if request.vars.PostDate: > form.vars.PostDate = request.vars.PostDate > else: > form.vars.PostDate = str(request.now.year) + "-" + str(request.now. > month) + "-" + str(request.now.day) > if form.process().accepted: > # here was form.vars.PostDate = request.vars.PostDate > Nope. /dps > > -- 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: How can i create radio buttons in web2py? And how can i link it with database?
please give me all the codes to create radio buttons using widgets. -- 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] Self-hosted web analytics solutions for Web2py
I worked it out. It's great! Working fine! Thanks again. "BTW: what is the best way to include a unique session id for each visit in the 'usage_statistics' table?" On Wednesday, January 11, 2017 at 2:09:24 AM UTC+8, Richard wrote: > > I guess you need to create the table... For some reason the web2py-slice > site does block in fortigate so, I am not sure of the code... I guess there > is migrate set to False or something or you set migrations to False in your > connection string. > > Richard > > On Sun, Jan 8, 2017 at 8:21 AM, Joe > > wrote: > >> Thanks for the link Richard, >> >> I just copied everything and tried it but I am getting this error: >> OperationalError: no such table: usage_statistics >> >> I think I am missing a step. >> >> Can you please advise. >> >> Thanks. >> >> Cheers, >> >> Joe >> >> >> >> >> >> On Friday, January 6, 2017 at 11:12:36 PM UTC+8, Richard wrote: >>> >>> You can look on the side of piwik : https://piwik.org/ >>> >>> If you only want to log your users activity and don't need that much of >>> analytic you can have look at this slice : >>> >>> >>> http://www.web2pyslices.com/slice/show/1618/basic-usage-statistics-log-what-your-users-do >>> >>> But it has a drawback which is that it makes an insert each time users >>> make request... Plus you don't have any analytics, graph, you have to forge >>> your own query to trend your data. >>> >>> Here there was discussion about improving this contrib by making it less >>> database intensive : >>> https://groups.google.com/d/msg/web2py/659_7_hDiks/947KRwtQDssJ >>> >>> good luck >>> >>> Richard >>> >>> >>> >>> On Fri, Jan 6, 2017 at 8:12 AM, Joe wrote: >>> I am interested in using a self-hosted web analytics solutions on Pythonanywhere for my Web2py apps. I asked this question on the Pythonanywhere forum, they suggested to ask here. Can anyone suggest the best solution for this and let me know the easiest way to install it on the server? Thanks. Cheers, Joe -- 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+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. >>> >>> -- >> 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+un...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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: How can i create radio buttons in web2py? And how can i link it with database?
On Tuesday, January 10, 2017 at 3:07:17 PM UTC-8, Sankhajit Das wrote: > > I am a very beginner in web2py. so can ne1 pls help me with how to create > radio buttons in web2py and link them with database? > If you're using SQLFORM(), there's a widget for radio buttons: http://web2py.com/books/default/chapter/29/07/forms-and-validators#Widgets> SQLFORM.process() takes care of updating the database, too, for the table that you create it for. If you're not familiar with SQLFORM(), the image blog example is a good place to start (but doesn't show radio buttons). http://web2py.com/books/default/chapter/29/03/overview#An-image-blog> /dps -- 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: Foreign key constraint failed
How are you generating the URL to access eintrag_erstellen, and are you sure the integer you are using in the URL is in fact the record ID of one of the records in db.category? Anthony On Tuesday, January 10, 2017 at 6:07:17 PM UTC-5, pilzsu...@emailn.de wrote: > > Good day, > > I was following the video tutorial of Massimo, just as other users here. > But when I want to submit a post I get the error > >IntegrityError: foreign key constraint failed< > > ---My db.py:--- > > db.define_table('category', > Field('name',requires=IS_IN_SET(['suess','sauer','frostig','fruchtig','schokoladig','einfach_lecker']))) > > db.define_table('eintrag', > Field('category','reference category',writable=False), > Field('eintragId', > 'integer',readable=False,writable=False), > Field('standort','string',requires=IS_NOT_EMPTY()), > Field('laden','string'), > Field('eis', > requires=IS_IN_SET(['Schokolade','Vanille','Erdbeere','Pistazie','Banane','Andere',])), > Field('eigenschaft','text'), > auth.signature) > > ---My default.py:--- > > def get_category(): > category_name = request.args(0) > category = db.category(name=category_name) > if not category: > session.flash = 'Element nicht gefunden' > redirect(URL('eis')) > return category > > def eintrag_erstellen(): > category = get_category() > db.eintrag.category.default = category.id > form = SQLFORM(db.eintrag).process(next='eintrag_betrachten/[id]') > return locals() > > ---My view:--- > > {{extend 'layout.html'}} > > {{block header}} > > {{end}} > > > Erstelle einen neuen Beitrag über das Thema {{=category.name.title()}} > > > > > {{=form}} > > > > - > this is exactly the same code as massimo used (just with german words > instead of english ones, but this does not cause the problem). I already > found threads about this problem and their solution was to create tabled > with appadmin. I did. But the same error. > If I delete the row in default.py >db.eintrag.category.default = > category.id< everything works just fine but the fact that the category > field is "None". > -- 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: Invalid SQLFORM submit generates ticket instead of redirecting back to form with errors
FYI, already answered on SO: http://stackoverflow.com/a/41554743/440323 Anthony On Tuesday, January 10, 2017 at 6:07:17 PM UTC-5, Rahul Priyadarsi wrote: > > Here is my db.py: > > db.define_table('antenna_details', > Field('antenna_name',required=True), > Field('model_name',required=True), > Field('project_name',required=True), > Field('frequency_band',required=True), > Field('polarization',required=True), > Field('aperture_size',required=True), > Field('fixer_availability',required=True), > Field('weight',required=True), > Field('material',required=True), > > Field('email_id',required=True,unique=True,requires=[IS_NOT_IN_DB]), > Field('subject',type='text',required=True), > Field('attached',type='upload', label=""" > Antenna/feed Geometry > Electrical specification > Attach Simulated data in predicted form > """) > ) > > db.antenna_details.email_id.requires=[IS_EMAIL(),IS_NOT_EMPTY()] > db.antenna_details.attached.requires=IS_NOT_EMPTY() > db.antenna_details.subject.rquires=IS_NOT_EMPTY() > db.antenna_details.material.requires=IS_NOT_EMPTY() > db.antenna_details.weight.requires=IS_NOT_EMPTY() > db.antenna_details.fixer_availability.requires=IS_NOT_EMPTY() > db.antenna_details.aperture_size.requires=IS_NOT_EMPTY() > db.antenna_details.polarization.requires=IS_NOT_EMPTY() > db.antenna_details.frequency_band.requires=IS_NOT_EMPTY() > db.antenna_details.project_name.requires=IS_NOT_EMPTY() > db.antenna_details.model_name.requires=IS_NOT_EMPTY() > > > And I am using SQLFORM to create a form for it: > > def index(): > """ > example action using the internationalization operator T and flash > rendered by views/default/index.html or views/generic.html > > if you need a simple wiki simply replace the two lines below with: > return auth.wiki() > """ > # response.flash = T("Hello World") > # return dict(message=T('Welcome to web2py!')) > > form = SQLFORM(db.antenna_details).process() > > if form.process().accepted: > response.flash = 'your data is posted' > > return dict(form=form) > > My problem is that when I submit a form with duplicate email id(that > already exists in db), instead of redirecting back to form and showing the > error, it generates a ticket like this: > > column email_id is not unique > > While if I submit with empty fields, it simply redirects to the form and > shows errors besides the respective input tags in red. > Why is it happening like this for email_id field only? And how do I > disable this to show error messages in form itself? > -- 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: Invalid SQLFORM submit generates ticket instead of redirecting back to form with errors
On Tuesday, January 10, 2017 at 3:07:17 PM UTC-8, Rahul Priyadarsi wrote: > > Here is my db.py: > > db.define_table('antenna_details', > Field('antenna_name',required=True), > Field('model_name',required=True), > Field('project_name',required=True), > Field('frequency_band',required=True), > Field('polarization',required=True), > Field('aperture_size',required=True), > Field('fixer_availability',required=True), > Field('weight',required=True), > Field('material',required=True), > > Field('email_id',required=True,unique=True,requires=[IS_NOT_IN_DB]), > Field('subject',type='text',required=True), > Field('attached',type='upload', label=""" > Antenna/feed Geometry > Electrical specification > Attach Simulated data in predicted form > """) > ) > > db.antenna_details.email_id.requires=[IS_EMAIL(),IS_NOT_EMPTY()] > db.antenna_details.attached.requires=IS_NOT_EMPTY() > db.antenna_details.subject.rquires=IS_NOT_EMPTY() > db.antenna_details.material.requires=IS_NOT_EMPTY() > db.antenna_details.weight.requires=IS_NOT_EMPTY() > db.antenna_details.fixer_availability.requires=IS_NOT_EMPTY() > db.antenna_details.aperture_size.requires=IS_NOT_EMPTY() > db.antenna_details.polarization.requires=IS_NOT_EMPTY() > db.antenna_details.frequency_band.requires=IS_NOT_EMPTY() > db.antenna_details.project_name.requires=IS_NOT_EMPTY() > db.antenna_details.model_name.requires=IS_NOT_EMPTY() > > [...] > My problem is that when I submit a form with duplicate email id(that > already exists in db), instead of redirecting back to form and showing the > error, it generates a ticket like this: > > column email_id is not unique > > While if I submit with empty fields, it simply redirects to the form and > shows errors besides the respective input tags in red. > Why is it happening like this for email_id field only? And how do I > disable this to show error messages in form itself? > You have unique=True for the email_id field, and my understanding is that is enforced by the database engine, not the DAL. I don't have an explanation for why the IS_NOT_IN_DB() didn't exclude that before the update. Unless it is the .process() when you create the form. /dps -- 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: Invalid SQLFORM submit generates ticket instead of redirecting back to form with errors
perhaps it related with dal constractor on email_id field : Field('email_id', required = True, unique = True, requires = [IS_NOT_IN_DB(db, 'antenna_details.email_id'), IS_EMAIL(), IS_NOT_EMPTY() ] ) or you can make simplified it into : Field('email_id', required = True, unique = True, requires = IS_EMAIL() ) best regards, stifan -- 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] How can i create radio buttons in web2py? And how can i link it with database?
I am a very beginner in web2py. so can ne1 pls help me with how to create radio buttons in web2py and link them with database? -- 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] Foreign key constraint failed
Good day, I was following the video tutorial of Massimo, just as other users here. But when I want to submit a post I get the error >IntegrityError: foreign key constraint failed< ---My db.py:--- db.define_table('category', Field('name',requires=IS_IN_SET(['suess','sauer','frostig','fruchtig','schokoladig','einfach_lecker']))) db.define_table('eintrag', Field('category','reference category',writable=False), Field('eintragId', 'integer',readable=False,writable=False), Field('standort','string',requires=IS_NOT_EMPTY()), Field('laden','string'), Field('eis', requires=IS_IN_SET(['Schokolade','Vanille','Erdbeere','Pistazie','Banane','Andere',])), Field('eigenschaft','text'), auth.signature) ---My default.py:--- def get_category(): category_name = request.args(0) category = db.category(name=category_name) if not category: session.flash = 'Element nicht gefunden' redirect(URL('eis')) return category def eintrag_erstellen(): category = get_category() db.eintrag.category.default = category.id form = SQLFORM(db.eintrag).process(next='eintrag_betrachten/[id]') return locals() ---My view:--- {{extend 'layout.html'}} {{block header}} {{end}} Erstelle einen neuen Beitrag über das Thema {{=category.name.title()}} {{=form}} - this is exactly the same code as massimo used (just with german words instead of english ones, but this does not cause the problem). I already found threads about this problem and their solution was to create tabled with appadmin. I did. But the same error. If I delete the row in default.py >db.eintrag.category.default = category.id< everything works just fine but the fact that the category field is "None". -- 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] Invalid SQLFORM submit generates ticket instead of redirecting back to form with errors
Here is my db.py: db.define_table('antenna_details', Field('antenna_name',required=True), Field('model_name',required=True), Field('project_name',required=True), Field('frequency_band',required=True), Field('polarization',required=True), Field('aperture_size',required=True), Field('fixer_availability',required=True), Field('weight',required=True), Field('material',required=True), Field('email_id',required=True,unique=True,requires=[IS_NOT_IN_DB]), Field('subject',type='text',required=True), Field('attached',type='upload', label=""" Antenna/feed Geometry Electrical specification Attach Simulated data in predicted form """) ) db.antenna_details.email_id.requires=[IS_EMAIL(),IS_NOT_EMPTY()] db.antenna_details.attached.requires=IS_NOT_EMPTY() db.antenna_details.subject.rquires=IS_NOT_EMPTY() db.antenna_details.material.requires=IS_NOT_EMPTY() db.antenna_details.weight.requires=IS_NOT_EMPTY() db.antenna_details.fixer_availability.requires=IS_NOT_EMPTY() db.antenna_details.aperture_size.requires=IS_NOT_EMPTY() db.antenna_details.polarization.requires=IS_NOT_EMPTY() db.antenna_details.frequency_band.requires=IS_NOT_EMPTY() db.antenna_details.project_name.requires=IS_NOT_EMPTY() db.antenna_details.model_name.requires=IS_NOT_EMPTY() And I am using SQLFORM to create a form for it: def index(): """ example action using the internationalization operator T and flash rendered by views/default/index.html or views/generic.html if you need a simple wiki simply replace the two lines below with: return auth.wiki() """ # response.flash = T("Hello World") # return dict(message=T('Welcome to web2py!')) form = SQLFORM(db.antenna_details).process() if form.process().accepted: response.flash = 'your data is posted' return dict(form=form) My problem is that when I submit a form with duplicate email id(that already exists in db), instead of redirecting back to form and showing the error, it generates a ticket like this: column email_id is not unique While if I submit with empty fields, it simply redirects to the form and shows errors besides the respective input tags in red. Why is it happening like this for email_id field only? And how do I disable this to show error messages in form itself? -- 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] Getting more form, y'all
I thought I remembered this question coming up before, but a quick look didn't turn up what I want. I have a straight-forward controller function for entering the primary data: def index(): """ """ response.flash = T("Hello World") form = SQLFORM(db.QuarterMaster) form.vars.PostDate = str(request.now.year) + "-" + str(request.now.month ) + "-" + str(request.now.day) if form.process().accepted: form.vars.PostDate = request.vars.PostDate response.flash = T("Thank you!") elif form.errors: response.flash = T("Please correct the errors in the form") else: response.flash = T("Please fill out the form") return dict(form=form) The intial display of the form shows the current date correctly (give or take a leading 0), but after submission the PostDate field is empty. I would like to have it default to what was used the previous time through, but it appears that value is dropped after the accepted branch. What do I need to do? Maybe replace the top part with? form = SQLFORM(db.QuarterMaster) if request.vars.PostDate: form.vars.PostDate = request.vars.PostDate else: form.vars.PostDate = str(request.now.year) + "-" + str(request.now. month) + "-" + str(request.now.day) if form.process().accepted: # here was form.vars.PostDate = request.vars.PostDate Thanks. /dps -- 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] Self-hosted web analytics solutions for Web2py
I guess you need to create the table... For some reason the web2py-slice site does block in fortigate so, I am not sure of the code... I guess there is migrate set to False or something or you set migrations to False in your connection string. Richard On Sun, Jan 8, 2017 at 8:21 AM, Joe wrote: > Thanks for the link Richard, > > I just copied everything and tried it but I am getting this error: > OperationalError: no such table: usage_statistics > > I think I am missing a step. > > Can you please advise. > > Thanks. > > Cheers, > > Joe > > > > > > On Friday, January 6, 2017 at 11:12:36 PM UTC+8, Richard wrote: >> >> You can look on the side of piwik : https://piwik.org/ >> >> If you only want to log your users activity and don't need that much of >> analytic you can have look at this slice : >> >> http://www.web2pyslices.com/slice/show/1618/basic-usage-stat >> istics-log-what-your-users-do >> >> But it has a drawback which is that it makes an insert each time users >> make request... Plus you don't have any analytics, graph, you have to forge >> your own query to trend your data. >> >> Here there was discussion about improving this contrib by making it less >> database intensive : https://groups.google.com/d/ >> msg/web2py/659_7_hDiks/947KRwtQDssJ >> >> good luck >> >> Richard >> >> >> >> On Fri, Jan 6, 2017 at 8:12 AM, Joe wrote: >> >>> I am interested in using a self-hosted web analytics solutions on >>> Pythonanywhere for my Web2py apps. >>> I asked this question on the Pythonanywhere forum, they suggested to ask >>> here. >>> Can anyone suggest the best solution for this and let me know the >>> easiest way to install it on the server? >>> Thanks. >>> Cheers, >>> Joe >>> >>> -- >>> 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+un...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > 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. > -- 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: auth on GAE 'unable to send email'
There's nothing different about the way Auth sends emails. Nothing. The most likely cause then, given that you can send emails in other places, is that your email message bodies such as auth.messages.verify_email have some mistake in them, causing Mail.send to get an exception, Mail.send has everything inside a Try/Except but it does log the error as "Mail.send failure:YOUR_ERROR_HERE". I suggest you check the log. -- 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: Email not working
Sparkpostmail works. Much appreciated. Also found out that a part of the issue was that I'm developing on c9 which prevents emails from going out directly from their service. Thanks again. On Tuesday, August 9, 2016 at 3:07:58 AM UTC-5, Massimo Di Pierro wrote: > > There is some problem with Gmail security settings. I am not sure what > they are. It stopped working at some point less than one year ago. > > I have been using spakpostmail since then with no issues: > > server = smtp.sparkpostmail.com:587 > > sender = > > login = > > tls= true > > ssl= false > > > > On Monday, 8 August 2016 15:07:33 UTC-5, Niphlod wrote: >> >> the "usual" issues are: >> - gmail's newer "secure apps" enabled by default which requires a >> two-step verification, which smtplib can't handle >> - tls or ssl enabled (or disabled) and the smtp endpoint not "in tune" >> with web2py's settings >> >> I'm also pretty sure that the traceback kinda steers towards the right >> direction in the second case. >> >> On Monday, August 8, 2016 at 9:12:16 PM UTC+2, Valdeck Rowe wrote: >>> >>> Hi >>> >>> I've never gotten the smtp interface in web2py to work either. >>> >>> It just simply does not appear to work with Google or with Mailgun. I >>> always end up using the mailgun api. >>> >>> I'm not sure what I'm missing but its a bit frustrating, especially >>> considering that I'm trying to sell them on web2py at work. >>> >>> What's interesting is that I'm able to connect to the mailgun smtp via >>> telnet, so I doubt its the port information. >>> >>> I'm using the username and password copied directly from the mailgun >>> domain page. >>> >>> I'm not sure what the problem is. Any suggestions at this point would be >>> sincerely appreciated. >>> >>> Thanks. >>> >>> >>> On Friday, February 12, 2016 at 2:38:38 PM UTC-5, Tom Russell wrote: I have since my last time trying to get email sending working with the built in registration process moved to Amazon AWS SES mail services which I know works well with other people. I have put in all the required info in db.py needed but still cannot send an email. I have tried gmail, a few other services and nothing so far seems to work. Has anyone tried an actual mail service that works, preferably free or close to it. I am beginning to think that web2py has an issue doing this task. I really need to get past this hurtle for a product launch soon. Thanks, Tom >>> -- 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: Issues with record versioning
Ah.. that should explain it then. In that case I'll have to do an update call with each of the update fields named individually. That would be something nice to have in the book, I agree :) Thanks Anthony, I'm going to test it now. On Monday, January 9, 2017 at 10:10:23 PM UTC, Anthony wrote: > > record = db(db.table_x.id == row_id).select().first() >> record['name'] = 'something else' >> record.update_record() >> >> That's the one way you cannot do it. The problem is when you call > .update_record() with no arguments, it takes all the existing fields in the > record and uses them in the database update. It will therefore use the > existing values of modified_by and modified_on. Typically, modified_by and > modified_on get updated because they are excluded from the update call, > which prompts the DAL to fill their values in automatically. But this > mechanism breaks down when calling .update_record() with no arguments. We > should probably add a note about this in the book. > > Anthony > -- 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] How to set-up function to call via URL on a HTTPS GAE Web2py ?
I have a GAE App built with Web2py. I've added a SSL cert to the GAE App. I have URLS like this: https://mydomain/app/controller/function when function is an undecorated function then all is well and I get back some HTML The problem: When function is decorated with `@myservice.json` and `myservice` is `myservice = Service()` then a web browser is refused connection: Chrome: "mydomain unexpectedly closed the connection." Am I looking in the right place to solve this issue? -- 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] add_button to go to the previous page
example: form.add_button("Annulla",URL('default','index')) 2017-01-10 8:47 GMT-02:00 Áureo Dias Neto : > with this: > > form.add_button("Annulla",URL( 'CONTROLLER' , 'FUNCTION_NAME' )) > > 2017-01-10 8:44 GMT-02:00 Andrea Fae' : > >> I have this situation >> form = crud.update(db.pc, pc, onaccept=crud.archive, deletable=False, >> next='lista_pc') >> form.add_button("Annulla",URL('lista_pc')) >> >> I want that button "annulla" go in the previus page, not in the >> 'lista_pc'. >> How to do? >> thank you >> >> -- >> 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. >> > > -- 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] add_button to go to the previous page
with this: form.add_button("Annulla",URL( 'CONTROLLER' , 'FUNCTION_NAME' )) 2017-01-10 8:44 GMT-02:00 Andrea Fae' : > I have this situation > form = crud.update(db.pc, pc, onaccept=crud.archive, deletable=False, > next='lista_pc') > form.add_button("Annulla",URL('lista_pc')) > > I want that button "annulla" go in the previus page, not in the 'lista_pc'. > How to do? > thank you > > -- > 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. > -- 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] add_button to go to the previous page
I have this situation form = crud.update(db.pc, pc, onaccept=crud.archive, deletable=False, next='lista_pc') form.add_button("Annulla",URL('lista_pc')) I want that button "annulla" go in the previus page, not in the 'lista_pc'. How to do? thank you -- 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] response.flash or session.flash with dict instead of string???
I´m not using toastr but sweetalert2 Just changed layout.html to {{if response.flash and type(response.flash)==type({}):}} swal( '{{=response.flash["title"]}}', '{{=response.flash["msg"] h}}', '{{=response.flash["type"] }}' ) {{pass}} {{if response.flash and type(response.flash)==type(""):}} // because of login failures or auth errors swal( 'Error', '{{= response.flash}}', 'error' ) {{pass}} and then in any controller session.flash=dict(title=T("Good job!"),msg=T("Comment added to the document"),type="success") Works for me... 2017-01-09 20:37 GMT+00:00 LoveWeb2py : > How did you implement this Ramos? I ended up writing a toastr function in > a model file and using that when I needed the flash. Did you just modify > the javascript? > > On Monday, January 9, 2017 at 5:00:50 AM UTC-5, Ramos wrote: >> >> nice ;) >> >> 2017-01-08 23:18 GMT+00:00 Anthony : >> >>> Try it and see. ;-) >>> >>> -- >>> 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+un...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > 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. > -- 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.