Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 554949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:45:52+00:00 2026-05-13T11:45:52+00:00

I’m trying to do connect form on my django website If in a shell

  • 0

I’m trying to do connect form on my django website

If in a shell I do :

$ ./manage.py shell
Python 2.6.4 (r264:75706, Oct 27 2009, 06:25:13) 
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.contrib import auth
>>> user = auth.authenticate(username='user', password='password')
>>> 

no problem as you can see

but if on my views, I have :

# views.py
...
from django.contrib import auth
...

def check_pass(request):
    ...
    user = auth.authenticate(username='user', password='password')
    ...

I’ve got an 500 error page with the stacktrace :

Environment:

Request Method: POST
Request URL: http://localhost/check_pass/
Django Version: 1.1.1
Python Version: 2.6.4
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware')


Traceback:
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response
  92.                 response = callback(request, *callback_args, **callback_kwargs)
File "/home/mart/programmation/python/django/martfiles/views.py" in check_pass
  67.         user = auth.authenticate(username='user', password='password')
File "/usr/lib/python2.6/site-packages/django/contrib/auth/__init__.py" in authenticate
  37.             user = backend.authenticate(**credentials)
File "/usr/lib/python2.6/site-packages/django/contrib/auth/backends.py" in authenticate
  18.             user = User.objects.get(username=username)
File "/usr/lib/python2.6/site-packages/django/db/models/manager.py" in get
  120.         return self.get_query_set().get(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/django/db/models/query.py" in get
  300.         num = len(clone)
File "/usr/lib/python2.6/site-packages/django/db/models/query.py" in __len__
  81.                 self._result_cache = list(self.iterator())
File "/usr/lib/python2.6/site-packages/django/db/models/query.py" in iterator
  238.         for row in self.query.results_iter():
File "/usr/lib/python2.6/site-packages/django/db/models/sql/query.py" in results_iter
  287.         for rows in self.execute_sql(MULTI):
File "/usr/lib/python2.6/site-packages/django/db/models/sql/query.py" in execute_sql
  2369.         cursor.execute(sql, params)
File "/usr/lib/python2.6/site-packages/django/db/backends/util.py" in execute
  19.             return self.cursor.execute(sql, params)
File "/usr/lib/python2.6/site-packages/django/db/backends/sqlite3/base.py" in execute
  193.         return Database.Cursor.execute(self, query, params)

Exception Type: OperationalError at /check_pass/
Exception Value: no such table: auth_user

my settings.py

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
)
...
INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
)

I’ve run ‘syncdb’ without any changes and I’m sure it’s this line the problem as I isolated it with

assert False
user = auth...

AssertionError

user = auth...
assert False

no such table auth_user

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:45:52+00:00Added an answer on May 13, 2026 at 11:45 am

    Same as for the static files, I needed to put my database outside my home folder and not next to my python files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 303k
  • Answers 303k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The code $('#txtPropHPhone' + "<br/>" + '#txtPropWPhone') is basically telling… May 13, 2026 at 8:34 pm
  • Editorial Team
    Editorial Team added an answer I assume they correspond to select and input HTML tags.… May 13, 2026 at 8:34 pm
  • Editorial Team
    Editorial Team added an answer SELECT * FROM PrimaryData pd CROSS APPLY ( SELECT TOP… May 13, 2026 at 8:33 pm

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want use html5's new tag to play a wav file (currently only supported
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I've got a string that has curly quotes in it. I'd like to replace
In order to apply a triggered animation to all ToolTip s in my app,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.