Hi guys,
I'm having troubles with using the django_sample project.
After I run the server and log in as a superuser, it redirects me to the base URL and throws following error:
`
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.3
Python Version: 2.7.12
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'plus']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.csrf.CsrfViewMiddleware')
Traceback:
File "/var/www/google-api-python-client/virtualenv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
Exception Type: DatabaseError at /
Exception Value: no such column: plus_credentialsmodel.credential
I also filled my access credentials in the client_secrets.json file:
{
"web": {
"client_id": "secured",
"client_secret": "secured",
"redirect_uris": [],
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/token"
}
}
`
How do I fix this?
Thank you
Seems like you're missing the CredentialsModel table in your database.
Try running
python manage.py makemigrations
python manage.py migrate
before running
python manage.py runserver
The django_sample is out of date as it designed for Django 1.3. I got it to work by upgrading the django project to django 1.11 it wasn't easy. I might create a pull request
Closing this, as it is effectively a dupe of #166 (the sample needs to be updated for a more recent Django).
Most helpful comment
The django_sample is out of date as it designed for Django 1.3. I got it to work by upgrading the django project to django 1.11 it wasn't easy. I might create a pull request