Re: [web2py] Re: GETTING THE WRONG RESULTS

2017-10-24 Thread Jim Steil
Ok, still a little confused.  You have 3 {{pass}} statements in the file
but only 2 conditional (for) statements.  Is the other {{pass}} ending a
for or if started in the main template, layout.html?

Also, I'm seeing things confusing me further.  For example, you have these
2 statements:


{{for head in head:}}

then, you have



before you have a {{pass}} which (in my way of thinking) should be before
the /div for letterhead.  Seems a bit disorganized to me.

While this may not be the issue, it is hard for me to follow what you're
trying to accomplish with the template file.

-Jim

On Tue, Oct 24, 2017 at 1:39 PM, mostwanted  wrote:

>
>
> *THATS MY VIEW*{{extend 'layout.html'}}
> 
> .classes
> {
> float: left;
> padding-left: 15px;
> font-weight: bold;
> }
>
> #container
> {
> display:block;
> overflow:auto;
> margin: 0 auto;
> width: 1200px;
> border: solid 1px #3399FF;
> border-radius: 5px;
> #height: 280px;
> padding: 10px;
> #padding-left: 10px;
> margin-top: 3%;
> box-shadow: 10px 10px 5px #88;
> background-color: #3399FF;
> color: white;
> }
> #container textarea
> {
> color: black;
> }
>
> .details
> {
> float:left;
> }
>
> #letterhead
> {
> border: solid 1px #3399FF;
> border-radius: 5px;
> height: 220px;
> padding: 10px;
> #box-shadow: 10px 10px 5px #88;
> background-color: #3399FF;
> color: white;
> }
> #container a
> {
> color:white;
> font-size: small;
> }
> #container a:hover
> {
> background: white;
> color: #3399FF;
> border: solid 1px white;
> border-radius: 5px;
> text-decoration: none;
> }
>
> #container .name
> {
> text-transform: uppercase;
> }
>
> td, th {
> border: 1px solid #dd;
> text-align: left;
> padding: 8px;
> }
> th
> {
> font-size: 18px;
> }
> .particulars
> {
> float: left;
> }
> #particulars
> {
> margin-left: 170px;
> }
> 
> 
> function getPerc(num1, num2)
> {
>  return(num1/num2)*100;
> }
> 
>
> PRINT-REPORT
>  href="javascript:history.back()" style="font-weight: bold;"
> id="back">BACK
> 
> 
> 
> {{for head in head:}}
>
> 
>  />
> 
> 
> 
> {{=head.school_name}}
> 
> {{=head.Telephone}}
> {{=head.Fax}}
> {{=head.Email}}
> 
> COMPILED BY STUDENTS RESULTS MANAGEMENT SYSTEM (SRMS v1)
> 
> 
> 
>
> 
>
> 
>
> 
>  ACADEMIC REPORT
> FOR STUDENT:{{=classes1.surname}} {{=
> classes1.name}} 
> 
> 
> 
> 
> 
> 
> 
> 
> Term
> Subject
> Mark Acquired
> Total Mark
> (%) Acquired
> Grade
> Teacher's Comment
> 
>
>
> {{for report in form:
> perc=(float(report.marks)/float(report.total))*float(100)
> }}
>
>
> 
> {{=report.term.term}}
> {{=report.subject.subject_name}}
> {{=report.marks}}
> {{=report.total}}
>   
> {{=perc}}(%)
> 
> 
>
> 
> {{=report.comments}}
> 
> {{pass}}
> {{pass}}
> 
> 
> 
> 
> Teacher: {{=classes1.class_name.teacher.name}} 
> {{=classes1.class_name.teacher.surname}} />
> 
> 
> Signature:
> {{pass}}
> 
> 
> 
> 
> 
> 
> 
>
>
>
> On Tuesday, October 24, 2017 at 8:11:51 PM UTC+2, Jim S wrote:
>>
>> Just the view, the .html file.
>>
>> -Jim
>>
>> On Tuesday, October 24, 2017 at 11:58:33 AM UTC-5, mostwanted wrote:
>>>
>>> By entire file you mean including the models and controllers?
>>>
>>> I am not getting any Traceback error, the results are just not
>>> displaying!
>>>
>>> On Tuesday, October 24, 2017 at 6:40:53 PM UTC+2, Jim S wrote:

 Do all of your conditional statements have the appropriate
 corresponding {{pass}} statements?

 In the snippet you included I see 3 {{pass}} statements but only 2
 conditional statements.  Can you include the entire file?  Also, are you
 getting a traceback error?

 -Jim

 On Tuesday, October 24, 2017 at 11:01:22 AM UTC-5, mostwanted wrote:
>
>
> *Hi guys, I'm faced with a little problem, I'm developing a results
> management system for a school, in the report preparation page i want 
> there
> to be displayed the student's percentage pass for a subject as well as
> their grade for that subject, now the problem is nothing gets when i write
> down the conditional statement to determine the grade, i don't know what
> I'm doing wrong, this  is part of my code below: PLEASE HELP ME*
> {{extend 'layout.html'}}
> ...
> ..

[web2py] Re: Django guys get a job easily. Why don't web2py guys get a job? How to get a job?

2017-10-24 Thread pbreit
I'd recommend everyone here to at least go through the Django tutorial to 
at least see how Django does things.

-- 
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: migrating database and updating it

2017-10-24 Thread Alex Glaros
I'm a beginner but seems like you should create your new version to first 
be exact duplicate of the original, pg_restore db to the new version, make 
sure it's working like old one, THEN change DAL tables, then run migrate = 
True.  (I haven't needed to run fake_migrate in these situations)

Maybe I read it wrong but looks like you changed DAL first on the new 
instance, then imported Postgres db.

Of course keep your Postgres archive as permanent backup.

Alex Glaros

-- 
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: maybe too many db connections todb on pythonanywhere

2017-10-24 Thread Manuele Pesenti
Il 24/10/17 13:47, Giles Thomas ha scritto:
> Hi Manuele,
>
> PythonAnywhere dev here: there's no extra cost if you want to increase
> the maximum number of Postgres connections -- just follow the
> instructions on this help
> page: https://help.pythonanywhere.com/pages/PostgresConnections/.  
> Don't forget to contact us once you've increased the connection count
> so that we can bounce your Postgres instance.
>
Hi Giles!
Good to know I'll try it and contact you immediatly.
Best regards

    M.
>
> All the best,
>
> Giles


-- 
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] sistemExit during scheduler execution

2017-10-24 Thread Manuele Pesenti
Hi *!

What could be the reason of the subsequant traceback during a scheduler
function execution?

"Traceback (most recent call last):  File
"/home/colouree/web2py/gluon/scheduler.py", line 293, in executor   
_env = env(a=a, c=c, import_models=True)  File
"/home/colouree/web2py/gluon/shell.py", line 166, in env   
sys.exit(1)SystemExit: 1"

Cheers

    Manuele

-- 
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: GETTING THE WRONG RESULTS

2017-10-24 Thread mostwanted


*THATS MY VIEW*{{extend 'layout.html'}}

.classes
{
float: left;
padding-left: 15px;
font-weight: bold;
}

#container
{
display:block;
overflow:auto;
margin: 0 auto;
width: 1200px;
border: solid 1px #3399FF;
border-radius: 5px;
#height: 280px;
padding: 10px;
#padding-left: 10px;
margin-top: 3%;
box-shadow: 10px 10px 5px #88;
background-color: #3399FF;
color: white;
}
#container textarea
{
color: black;
}
   
.details
{
float:left;
}

#letterhead
{
border: solid 1px #3399FF;
border-radius: 5px;
height: 220px;
padding: 10px;
#box-shadow: 10px 10px 5px #88;
background-color: #3399FF;
color: white;
}
#container a
{
color:white;
font-size: small;
}
#container a:hover
{
background: white;
color: #3399FF;
border: solid 1px white;
border-radius: 5px;
text-decoration: none;
}

#container .name
{
text-transform: uppercase;
}

td, th {
border: 1px solid #dd;
text-align: left;
padding: 8px;
}
th
{
font-size: 18px;   
}
.particulars
{
float: left;
}
#particulars
{
margin-left: 170px;
}


function getPerc(num1, num2)
{
 return(num1/num2)*100;
}


PRINT-REPORT
BACK



{{for head in head:}}






{{=head.school_name}}

{{=head.Telephone}}
{{=head.Fax}}
{{=head.Email}}

COMPILED BY STUDENTS RESULTS MANAGEMENT SYSTEM (SRMS v1)









 ACADEMIC REPORT 
FOR STUDENT:{{=classes1.surname}} 
{{=classes1.name}} 








Term
Subject
Mark Acquired
Total Mark
(%) Acquired
Grade
Teacher's Comment



{{for report in form:
perc=(float(report.marks)/float(report.total))*float(100)
}}



{{=report.term.term}}
{{=report.subject.subject_name}}
{{=report.marks}}
{{=report.total}}
  
{{=perc}}(%)


   

{{=report.comments}}

{{pass}}
{{pass}}




Teacher: {{=classes1.class_name.teacher.name}} 
{{=classes1.class_name.teacher.surname}}


Signature:
{{pass}}










On Tuesday, October 24, 2017 at 8:11:51 PM UTC+2, Jim S wrote:
>
> Just the view, the .html file.
>
> -Jim
>
> On Tuesday, October 24, 2017 at 11:58:33 AM UTC-5, mostwanted wrote:
>>
>> By entire file you mean including the models and controllers?
>>
>> I am not getting any Traceback error, the results are just not displaying!
>>
>> On Tuesday, October 24, 2017 at 6:40:53 PM UTC+2, Jim S wrote:
>>>
>>> Do all of your conditional statements have the appropriate corresponding 
>>> {{pass}} statements?
>>>
>>> In the snippet you included I see 3 {{pass}} statements but only 2 
>>> conditional statements.  Can you include the entire file?  Also, are you 
>>> getting a traceback error?
>>>
>>> -Jim
>>>
>>> On Tuesday, October 24, 2017 at 11:01:22 AM UTC-5, mostwanted wrote:


 *Hi guys, I'm faced with a little problem, I'm developing a results 
 management system for a school, in the report preparation page i want 
 there 
 to be displayed the student's percentage pass for a subject as well as 
 their grade for that subject, now the problem is nothing gets when i write 
 down the conditional statement to determine the grade, i don't know what 
 I'm doing wrong, this  is part of my code below: PLEASE HELP ME*
 {{extend 'layout.html'}}
 ...
 ..
 ... 
 {{for report in form:
 perc=(float(report.marks)/float(report.total))*float(100)

 *#WITHOUT THE CONDITIONAL PART BELOW WHICH DETERMINES THE GRADE, 
 EVERYTHING WORKS WELL, THE PERCENTAGE PASS & ALL OTHER RESULTS ARE 
 DISPLAYED BUT WHEN I PUT IT IN NOTHING GETS DISPLAYED!!!*
 if perc>=80:
 grade='A'
 }}
 
 
 
 {{=report.term.term}}
 {{=report.subject.subject_name}}
 {{=report.marks}}
 {{=report.total}}
   
 {{=perc}}(%)
 
 
 {{=grade}}
 
 {{=report.comments}}
 
 {{pass}}
 {{pass}}
 
 
 
 >>> placeholder="Teacher's Overall Comments" style="border: solid 1px white; 
 border-radius: 5px;">
 Teacher: {{=classes1.class_name.teacher.name}} 
 

[web2py] Re: GETTING THE WRONG RESULTS

2017-10-24 Thread Jim S
Just the view, the .html file.

-Jim

On Tuesday, October 24, 2017 at 11:58:33 AM UTC-5, mostwanted wrote:
>
> By entire file you mean including the models and controllers?
>
> I am not getting any Traceback error, the results are just not displaying!
>
> On Tuesday, October 24, 2017 at 6:40:53 PM UTC+2, Jim S wrote:
>>
>> Do all of your conditional statements have the appropriate corresponding 
>> {{pass}} statements?
>>
>> In the snippet you included I see 3 {{pass}} statements but only 2 
>> conditional statements.  Can you include the entire file?  Also, are you 
>> getting a traceback error?
>>
>> -Jim
>>
>> On Tuesday, October 24, 2017 at 11:01:22 AM UTC-5, mostwanted wrote:
>>>
>>>
>>> *Hi guys, I'm faced with a little problem, I'm developing a results 
>>> management system for a school, in the report preparation page i want there 
>>> to be displayed the student's percentage pass for a subject as well as 
>>> their grade for that subject, now the problem is nothing gets when i write 
>>> down the conditional statement to determine the grade, i don't know what 
>>> I'm doing wrong, this  is part of my code below: PLEASE HELP ME*
>>> {{extend 'layout.html'}}
>>> ...
>>> ..
>>> ... 
>>> {{for report in form:
>>> perc=(float(report.marks)/float(report.total))*float(100)
>>>
>>> *#WITHOUT THE CONDITIONAL PART BELOW WHICH DETERMINES THE GRADE, 
>>> EVERYTHING WORKS WELL, THE PERCENTAGE PASS & ALL OTHER RESULTS ARE 
>>> DISPLAYED BUT WHEN I PUT IT IN NOTHING GETS DISPLAYED!!!*
>>> if perc>=80:
>>> grade='A'
>>> }}
>>> 
>>> 
>>> 
>>> {{=report.term.term}}
>>> {{=report.subject.subject_name}}
>>> {{=report.marks}}
>>> {{=report.total}}
>>>   
>>> {{=perc}}(%)
>>> 
>>> 
>>> {{=grade}}
>>> 
>>> {{=report.comments}}
>>> 
>>> {{pass}}
>>> {{pass}}
>>> 
>>> 
>>> 
>>> >> placeholder="Teacher's Overall Comments" style="border: solid 1px white; 
>>> border-radius: 5px;">
>>> Teacher: {{=classes1.class_name.teacher.name}} 
>>> {{=classes1.class_name.teacher.surname}}
>>> 
>>> 
>>> Signature:
>>> {{pass}}
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>
>>>

-- 
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: GETTING THE WRONG RESULTS

2017-10-24 Thread mostwanted
By entire file you mean including the models and controllers?

I am not getting any Traceback error, the results are just not displaying!

On Tuesday, October 24, 2017 at 6:40:53 PM UTC+2, Jim S wrote:
>
> Do all of your conditional statements have the appropriate corresponding 
> {{pass}} statements?
>
> In the snippet you included I see 3 {{pass}} statements but only 2 
> conditional statements.  Can you include the entire file?  Also, are you 
> getting a traceback error?
>
> -Jim
>
> On Tuesday, October 24, 2017 at 11:01:22 AM UTC-5, mostwanted wrote:
>>
>>
>> *Hi guys, I'm faced with a little problem, I'm developing a results 
>> management system for a school, in the report preparation page i want there 
>> to be displayed the student's percentage pass for a subject as well as 
>> their grade for that subject, now the problem is nothing gets when i write 
>> down the conditional statement to determine the grade, i don't know what 
>> I'm doing wrong, this  is part of my code below: PLEASE HELP ME*
>> {{extend 'layout.html'}}
>> ...
>> ..
>> ... 
>> {{for report in form:
>> perc=(float(report.marks)/float(report.total))*float(100)
>>
>> *#WITHOUT THE CONDITIONAL PART BELOW WHICH DETERMINES THE GRADE, 
>> EVERYTHING WORKS WELL, THE PERCENTAGE PASS & ALL OTHER RESULTS ARE 
>> DISPLAYED BUT WHEN I PUT IT IN NOTHING GETS DISPLAYED!!!*
>> if perc>=80:
>> grade='A'
>> }}
>> 
>> 
>> 
>> {{=report.term.term}}
>> {{=report.subject.subject_name}}
>> {{=report.marks}}
>> {{=report.total}}
>>   
>> {{=perc}}(%)
>> 
>> 
>> {{=grade}}
>> 
>> {{=report.comments}}
>> 
>> {{pass}}
>> {{pass}}
>> 
>> 
>> 
>> > placeholder="Teacher's Overall Comments" style="border: solid 1px white; 
>> border-radius: 5px;">
>> Teacher: {{=classes1.class_name.teacher.name}} 
>> {{=classes1.class_name.teacher.surname}}
>> 
>> 
>> Signature:
>> {{pass}}
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>>

-- 
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: GETTING THE WRONG RESULTS

2017-10-24 Thread Jim S
Do all of your conditional statements have the appropriate corresponding 
{{pass}} statements?

In the snippet you included I see 3 {{pass}} statements but only 2 
conditional statements.  Can you include the entire file?  Also, are you 
getting a traceback error?

-Jim

On Tuesday, October 24, 2017 at 11:01:22 AM UTC-5, mostwanted wrote:
>
>
> *Hi guys, I'm faced with a little problem, I'm developing a results 
> management system for a school, in the report preparation page i want there 
> to be displayed the student's percentage pass for a subject as well as 
> their grade for that subject, now the problem is nothing gets when i write 
> down the conditional statement to determine the grade, i don't know what 
> I'm doing wrong, this  is part of my code below: PLEASE HELP ME*
> {{extend 'layout.html'}}
> ...
> ..
> ... 
> {{for report in form:
> perc=(float(report.marks)/float(report.total))*float(100)
>
> *#WITHOUT THE CONDITIONAL PART BELOW WHICH DETERMINES THE GRADE, 
> EVERYTHING WORKS WELL, THE PERCENTAGE PASS & ALL OTHER RESULTS ARE 
> DISPLAYED BUT WHEN I PUT IT IN NOTHING GETS DISPLAYED!!!*
> if perc>=80:
> grade='A'
> }}
> 
> 
> 
> {{=report.term.term}}
> {{=report.subject.subject_name}}
> {{=report.marks}}
> {{=report.total}}
>   
> {{=perc}}(%)
> 
> 
> {{=grade}}
> 
> {{=report.comments}}
> 
> {{pass}}
> {{pass}}
> 
> 
> 
> 
> Teacher: {{=classes1.class_name.teacher.name}} 
> {{=classes1.class_name.teacher.surname}}
> 
> 
> Signature:
> {{pass}}
> 
> 
> 
> 
> 
> 
> 
>
>

-- 
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 THE WRONG RESULTS

2017-10-24 Thread mostwanted

*Hi guys, I'm faced with a little problem, I'm developing a results 
management system for a school, in the report preparation page i want there 
to be displayed the student's percentage pass for a subject as well as 
their grade for that subject, now the problem is nothing gets when i write 
down the conditional statement to determine the grade, i don't know what 
I'm doing wrong, this  is part of my code below: PLEASE HELP ME*
{{extend 'layout.html'}}
...
..
... 
{{for report in form:
perc=(float(report.marks)/float(report.total))*float(100)

*#WITHOUT THE CONDITIONAL PART BELOW WHICH DETERMINES THE GRADE, EVERYTHING 
WORKS WELL, THE PERCENTAGE PASS & ALL OTHER RESULTS ARE DISPLAYED BUT WHEN 
I PUT IT IN NOTHING GETS DISPLAYED!!!*
if perc>=80:
grade='A'
}}



{{=report.term.term}}
{{=report.subject.subject_name}}
{{=report.marks}}
{{=report.total}}
  
{{=perc}}(%)


{{=grade}}

{{=report.comments}}

{{pass}}
{{pass}}




Teacher: {{=classes1.class_name.teacher.name}} 
{{=classes1.class_name.teacher.surname}}


Signature:
{{pass}}








-- 
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] The ondelete in a grid seems do nothing...

2017-10-24 Thread J-Michel Angers
Hi,
I manage a page with a sqlform ("Order") and a sqlform.grid ("Articles").
Test1 : On the grid, when I click on the button "Delete", this Article is 
removed from the grid ... on the screen. When I reload the order, I see the 
article again.
Test2 : I add a line un my grid instruction, with an "ondelete"... But the 
callback is not executed.

Extract of code :
def delArticle(NomTable,IdArt):
print "Suppression article " + NomTable + string(IdArt)
def saisieda():
...
formModArt= SQLFORM.grid(dbW(dbW.TArt.NumDA==NumDA),formname=
'GridArticle',
fields=[dbW.TArt.id,dbW.TArt.Article,dbW.TArt.Compte
,dbW.TArt.PUHT,dbW.TArt.Quantite,dbW.TArt.Description],
create=True,deletable=True,searchable=False,csv=
False,user_signature=False,
ondelete=delArticle)



-- 
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: maybe too many db connections todb on pythonanywhere

2017-10-24 Thread Giles Thomas
Hi Manuele,

PythonAnywhere dev here: there's no extra cost if you want to increase the 
maximum number of Postgres connections -- just follow the instructions on 
this help page: https://help.pythonanywhere.com/pages/PostgresConnections/. 
  Don't forget to contact us once you've increased the connection count so 
that we can bounce your Postgres instance.


All the best,

Giles


On Monday, 23 October 2017 09:33:48 UTC+1, Manuele wrote:
>
> Thanks Alex,
>
> that's what I get from the db engine about my maximum number of 
> connections:
>
> psql (9.4.11, server 9.4beta3)
> Type "help" for help.
> postgres=# SHOW max_connections;
>  max_connections 
> -
>  20
> (1 row)
>
> reading the suggested wiki page I found this: "PostgreSQL on good hardware 
> can support *a few hundred connections*. If you want to have thousands 
> instead..." so it seams something can be done on the side of the db 
> configuration... if permitted from the service (maybe paying something 
> more).
>
> Cheers
>
> Manuele
>
> On 21/10/2017 00:20, Alex Glaros wrote:
>
> there are a lot of fixes if search on your error string, plus 
> max_connections parm info is at Postgres 
> https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server 
>
> what is your max_connections set to now?
>
> Alex Glaros
>
>
> -- 
> 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 to get rid if the /init/default/ in the URL?

2017-10-24 Thread Joe
Hi Dave,

Thanks for your reply.

No, I am not using this directory structure for source control reasons. I 
guess, I was a little bit confused when I initially set up the account.
So, this is a mess. 

What would be the easiest way to fix this? I wonder if I have to start from 
scratch with the account. I mean setting up everything again. I hope not.

Please let me know your thoughts.

Thanks again.

Cheers,

Joe



On Tuesday, October 24, 2017 at 1:27:22 PM UTC+8, Dave S wrote:
>
>
>
> On Monday, October 23, 2017 at 8:00:29 PM UTC-7, Joe wrote:
>>
>> Hi Anthony,
>>
>> My file structure on pythonanywhere looks like this:
>>
>>
>> /home/username/web2py/applications/my_app_directory/applications/init
>>
>> *init* being the app name.
>>
>>  
>>
>
> The book doesn't mention using extra levels of directories when discussing 
> PythonAnywhere deployment
> (chapter 13).  Perhaps they are confusing the routing code when applying 
> the "hide the app+controller" rules.
>
> In the web2py directory, I have a routes.py file which contains this code:
>>
>>  
>>
>>  
>> routers = dict(
>>
>>  
>>
>> BASE = dict( 
>>
>> default_application='init' 
>>
>> ), 
>>
>> init = dict( 
>>
>> default_controller='default', 
>>
>> default_function='index', 
>>
>> functions=['call', 'download', 'index', 'user'] 
>>
>> ) 
>>
>> ) 
>>
>>
>>
>> So, the web2py directory contains an application directory which contains 
>> all my app directories. Then, all the app directories also have an 
>> application directory which contains the app, *named init*.
>>
>>  
>>
>> I am not so sure if this is the optimal structure. Is it?
>>
>>
> Are you doing this for source control reasons?  I would instead consider 
> using just the normal level of directories.  If you're dealing with 
> multiple repositories, than maybe an ln -s might help flatten web2py's view 
> while keeping trees separate, but I would try without it .
>
>  
>>
>> In any case, I used the button on the pythonanywhere *Web* tab to *Reload 
>> www.myapp.com *. And, nothing changed.
>>
>>  
>>
>> I would love to resolve this, and find out what's wrong. 
>>
>>
>> Thanks again for all your help.
>>
>>
>> Cheers,
>>
>>
>> Joe
>>
>>
>>
> /dps
>  
>
>>
>>
>> On Sunday, October 15, 2017 at 10:07:51 PM UTC+8, Anthony wrote:
>>>
>>> On Friday, October 13, 2017 at 7:22:42 PM UTC-4, Joe wrote:

 Hi Dave, I have reloaded the apps in web2py if that's what you mean. I 
 can't restart web2py, I can only reload the apps, I guess.
 Is there an other way on pythonanywhere? I mean, restarting web2py 
 instead of reloading the apps?

 *Re: robots.txt*
 If I put robots.txt in my static folder the URL will still have to be 
 *mysite.com/init/static/robots.txt 
 * to reach it- this is the 
 issue I am trying to solve - I am trying have *mysite.com/robots.txt 
 *

>>>
>>> Are you sure you have created /web2py/routes.py as described above and 
>>> either reloaded the routes via the button in the web2py admin app or 
>>> reloaded the web app via the PythonAnywhere "Web" tab? Note that routes.py 
>>> must be in the root /web2py folder.
>>>
>>> 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.