Django TemplateDoesNotExist?

First solution: These settings mean that Django will look at the templates from templates/ directory under your project. Assuming your Django project is located at /usr/lib/python2.5/site-packages/projectname/ then with your settings django will look for the templates under /usr/lib/python2.5/site-packages/projectname/templates/ So in that case we want to move our templates to be structured like this: Second solution: If that still doesn’t work … Read more

Django – no such table exception

I solved the same problem with these steps : Delete your database (db.sqlite3 in my case) in your project directory Remove everything from __pycache__ folder under your project subdirectory For the application you are trying to fix, go to the folder and clear migrations and __pycache__ directories When you are sure you have cleared all the above files, run: I hope this … Read more

OSError – Errno 13 Permission denied

You need to change the directory permission so that web server process can change the directory. To change ownership of the directory, use chown:chown -R user-id:group-id /path/to/the/directory To see which user own the web server process (change httpd accordingly):ps aux | grep httpd | grep -v grep ORps -efl | grep httpd | grep -v grep

Setting Django up to use MySQL

MySQL support is simple to add. In your DATABASES dictionary, you will have an entry like this: You also have the option of utilizing MySQL option files, as of Django 1.7. You can accomplish this by setting your DATABASES array like so: You also need to create the /path/to/my.cnf file with similar settings from above With this new method of connecting in Django … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)