My first guess was indeed the $var css: assignment. It's not
incomplete though -- that's the only way I could figure out how to
assign an empty string. Is there a more thorough explanation of
variables in the templating system somewhere? I deduced that as the
only way to assign an empty string based on the tutorial / templetor
page. However, if I remove that variable from the design, all it does
is give back the two characters in the footer that were lost to those
two lines of code.
I added some more text in the logo area on the top left, but it didn't
initially affect anything. BUT, after adding another line of text, it
cost one more character off the footer. It seems to be that each <br>
tag induces this loss. The same behavior is observed when adding lines
of comments into either base.html or index.html.
The nested render calls are another possibility. To investigate, I
updated my code.py with a new URLs list and an additional class:
urls = (
'/', 'index',
'/add', 'add',
'/delete/(.*)', 'delete',
'/indexonly', 'indexonly')
class indexonly:
def GET(self):
todos = web.select('todo')
print render.index(todos)
link: http://75.33.96.148/indexonly
The "test line of text" is a part of the index.html template. Now,
going to '/' uses the same class from before and we see that more
characters have disappeared off the footer as a result of this extra
line. Going to '/indexonly', however, shows that adding lines to the
database through here will start cropping characters off this test
line of text! In fact, if you continue adding entries to the database,
characters will disappear one by one until even the form breaks.
(Note: You'll have to re-navigate to /indexonly if you POST through
the form there... I wanted to keep the code as simple as possible
without adding in referrer variables and all.)
So the problem is happening regardless of the nested renders... and
occurs even in just a single template rendering call. For what it's
worth, here's my server config:
A virtual host set up in my httpd.conf:
<VirtualHost *:80>
DocumentRoot "C:/apache/htdocs/webpy"
ServerName *
</VirtualHost>
And the corresponding .htaccess in the folder:
Options +ExecCGI
AddHandler cgi-script .py
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !^/icons
RewriteCond %{REQUEST_URI} !^/favicon.ico$
RewriteCond %{REQUEST_URI} !^(/.*)+code.py/
RewriteCond %{REQUEST_URI} !^/menu
RewriteCond %{REQUEST_URI} !^/style
RewriteCond %{REQUEST_URI} !^/templates
RewriteRule ^(.*)$ code.py/$1 [PT]
</IfModule>
Thanks for looking into this, Eric... it just keeps getting weirder!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---