I've spent the last few days on an abstruse problem: inconsistent use of
tabs and spaces. I check my code minutely - and it is perfect - but I am still
getting an error. Turns out that python does not accept code that is spaced with
both spaces and tabs in the same function; it needs to be one or the other.
preferably spaces. And the Sublime code editor will show which is at work
on a block of code by selecting the text and hitting crtl +A. Dots
for spaces and lines for tabs. Below:
One just gets to work placing the code anew, till the error stops...
* * *
Now done with Django #19. If someone has pressed Like on a post in a previous
visit, the button is now red. It is impossible to like somethong more than once, and a further
press will subtact a Like from the count.
From articledetails.html:
* * *
In my desperation to check everythting in my non-working code, ended up
finding a set of the Codemy simpleBlog code on Github. Not telling anyone to
use it; but it is a resource:
https://github.com/PawanaShrestha/SimpleBlog-in-Django-Codemy.com-Tutorial-
No comments:
Post a Comment