1
votes

I have just cloned a Django app from Github to a local directory. I know for a fact that the app works because I've run it on others' computers.

When I run the server, I can see the site and register for an account. This works fine (I get a confirmation email). But then my login information causes an error because the DB appears to not have configured properly on my machine. I get the following errors:

/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/db/backends/utils.py in execute return self.cursor.execute(sql, params) ... ▶ Local vars /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/db/backends/sqlite3/base.py in execute return Database.Cursor.execute(self, query, params) ... ▶ Local vars The above exception (no such table: django_session) was the direct cause of the following exception:

(It then lists a bunch of problems with local vars).

I tried making migrations with every part of the app but this didn't appear to fix anything.

1
It might be a good idea to show some of the errors. Indent 4 spaces (or highlight and use the "{}" sign in the editor) for code. A lot of things can go wrong when running an app from a git clone: Wrong Python version, not having all the libraries/frameworks installed (which is why a requirements.txt topip install for Python projects on GitHub is important); unresolved references (such as environment/PATH variables that aren't in the same place on the new system). Running make migrations and migrate doesn't always cut it, either -- there are times when deleting the db file is needed.Jordon Birk

1 Answers

0
votes

The django_sessions table should get initialized when you run your first migrations. You said taht you made your migrations, but did you run them (with python manage.py migrate). Also, do you have django.contrib.auth in the installed_apps in your settings file? This is the app that owns that session table