No Such Table Django Session Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings django.db.utils.operationalerror: no such table: django_session and policies of this site About Us Learn more about Stack Overflow
Table Django_session Doesn T Exist
the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation django no such table error Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it graphite no such table account_profile only takes a minute: Sign up Django: no such table: django_session when using with postgres up vote 1 down vote favorite I'm building a blog with Django and I have configured my server with nginx and uwsgi. Everything works fine on the test server from manage.py but when I try to access it externally I get OperationalError at /admin/ no such
Operationalerror: No Such Table: Account_profile
table: django_session when I try to login to the admin console. Before this I was getting a similiar error but with auth_user instead of django_session. I have configured the server using postgres and when I log in using the blogs user to the database all the tables appear to be there. I noticed this line on the error page /srv/blogenv/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py which I thought to be strange given that the database is in postgres. I tried running syncdb but it returned that there were unmigrated changes and performing makemigrations and migrate didn't fix the problem. python django postgresql share|improve this question asked Jan 22 '15 at 17:38 stmfunk 444215 do you have site in INSTALLED_APPS ? –karthikr Jan 22 '15 at 17:41 Well my app is called mainblog not site but it is in there yes –stmfunk Jan 22 '15 at 19:58 add a comment| 1 Answer 1 active oldest votes up vote 4 down vote accepted So I managed to solve the problem by deleting the existing database and migrating again. share|improve this answer
here for a quick overview of the site Help Center Detailed answers to django operationalerror no such table any questions you might have Meta Discuss the workings and policies django_session does not exist of this site About Us Learn more about Stack Overflow the company Business Learn more
Manage.py Syncdb Unknown Command
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack http://stackoverflow.com/questions/28095195/django-no-such-table-django-session-when-using-with-postgres Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Django: OperationalError No Such Table up vote 11 down vote favorite 2 I'm building a fairly simple application, research, in my Django project that uses Django-CMS. (It's my http://stackoverflow.com/questions/25771755/django-operationalerror-no-such-table first ground-up attempt at a project/application.) It's main purpose is to store various intellectual assets (i.e article, book, etc. written by a researcher). The problem is that when I point the browser to /research/ I get an error saying that the table 'research_journal' doesn't exist ("no such table"). I'm using Djnago 1.6.5 with a sqlite3 database. Looking at python manage.py sql research yields: BEGIN; CREATE TABLE "research_researchbase" ( "id" integer NOT NULL PRIMARY KEY, "pub_date" datetime NOT NULL, "authors" varchar(200) NOT NULL, "year" varchar(25) NOT NULL, "title" varchar(200) NOT NULL, "subtitle" varchar(200) NOT NULL, "image_id" integer NOT NULL REFERENCES "filer_image" ("file_ptr_id"), "link" varchar(200) NOT NULL ) ; CREATE TABLE "research_journal" ( "researchbase_ptr_id" integer NOT NULL PRIMARY KEY REFERENCES "research_researchbase" ("id"), "journal" varchar(200) NOT NULL, "abstract" text NOT NULL, "citation" varchar(200) NOT NULL ) ; CREATE TABLE "research_encyclopedia_chapter" ( "researchbase_ptr_id" integer NOT NULL PRIMARY KEY REFERENCES "research_researchbase" ("id"), "encyclopedia" varchar(200) NOT NULL, "publisher" varc
Previous TicketNext Ticket → Opened 2 years ago Closed 2 years ago #22701 closed Bug (invalid) 'no such table: django_session' with python https://code.djangoproject.com/ticket/22701 3 in os x mavericks Reported by: zero Owned by: nobody Component: Uncategorized Version: master Severity: Normal Keywords: Cc: Triage Stage: Unreviewed Has patch: no Needs documentation: no Needs tests: no Patch needs improvement: no Easy pickings: no UI/UX: no Description OS and Python versions: OS X no such 10.9.3 installed python 3.4.1 from https://www.python.org/download/: https://www.python.org/ftp/python/3.4.1/python-3.4.1-macosx10.6.dmg Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 00:54:21) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Commands to reproduce error: $ virtualenv --python=/usr/local/bin/python3 --no-site-packages my_venv $ cd my_venv $ source bin/activate $ pip3 install https://www.djangoproject.com/download/1.7.b4/tarball/ $ django-admin.py startproject my_proj no such table $ cd my_proj/ $ ./manage.py runserver OUTPUT: Performing system checks... System check identified no issues (0 silenced). May 25, 2014 - 14:50:53 Django version 1.7b4, using settings 'my_proj.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. Goto http://127.0.0.1:8000/ in browser, get this: A server error occurred. Please contact the administrator. SERVER ERROR OUTPUT: Traceback (most recent call last): File "/Users/alex/_workspace/friend/test/my_venv/lib/python3.4/site-packages/django/contrib/sessions/backends/base.py", line 170, in _get_session return self._session_cache AttributeError: 'SessionStore' object has no attribute '_session_cache' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/alex/_workspace/friend/test/my_venv/lib/python3.4/site-packages/django/db/backends/utils.py", line 65, in execute return self.cursor.execute(sql, params) File "/Users/alex/_workspace/friend/test/my_venv/lib/python3.4/site-packages/django/db/backends/sqlite3/base.py", line 484, in execute return Database.Cursor.execute(self, query, params) sqlite3.OperationalError: no such table: django_session The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/alex/_workspace/friend/test/my_venv/lib/python3.4/site-packages/django/core/handlers/base.py", line 87, in get_response response = middleware_method(request) File "/Users/