[Answer]-Tango with Django tutorial: "table rango_category has no column named views"

1👍

Are you using SQLite? Look at the warning in this section of your tutorial:
http://www.tangowithdjango.com/book/chapters/models.html#creating-and-synchronising-the-database

Whenever you add to existing database models, you will have to delete the database file and then re-sync the database by running python manage.py syncb again. This is a drawback of Django 1.5.4, and can be quite frustrating. If you however add a new model, you can syncdb your database without having to delete and recreate it. You must therefore bear this in mind when tweaking your database: new models will be synchronised with syncdb – but changes to existing models will not be.

So, I’d delete the sqlite file, then run manage.py syncdb again.

Note: Django 1.7 is so much better, and there is a beta tutorial for it online.

Leave a comment