souper-streetwise / charity_data

App and visualisations to collect and analyse data about homeless charities' activities
MIT License
2 stars 0 forks source link

Can't log in #6

Closed saattrupdan closed 4 years ago

saattrupdan commented 4 years ago

When I plug in a username and password in the app it gives me the following error.

OperationalError at /accounts/login/
no such table: auth_user
Request Method: POST
Request URL:    http://127.0.0.1:8000/accounts/login/?next=/
Django Version: 3.0.4
Exception Type: OperationalError
Exception Value:    
no such table: auth_user
Exception Location: /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py in execute, line 396
Python Executable:  /home/leidem/gitsky/charity_data/.env/bin/python
Python Version: 3.7.5
Python Path:    
['/home/leidem/gitsky/charity_data/web_app/charity_app',
 '/usr/lib/python37.zip',
 '/usr/lib/python3.7',
 '/usr/lib/python3.7/lib-dynload',
 '/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages']
Server time:    Fri, 20 Mar 2020 21:57:57 +0000

Full trace:

Traceback Switch to copy-and-paste view /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/utils.py in _execute return self.cursor.execute(sql, params) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/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: auth_user) was the direct cause of the following exception: /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/core/handlers/exception.py in inner response = get_response(request) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/core/handlers/base.py in _get_response response = self.process_exception_by_middleware(e, request) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/core/handlers/base.py in _get_response response = wrapped_callback(request, *callback_args, callback_kwargs) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/views/generic/base.py in view return self.dispatch(request, *args, *kwargs) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/utils/decorators.py in _wrapper return bound_method(args, kwargs) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/views/decorators/debug.py in sensitive_post_parameters_wrapper return view(request, *args, kwargs) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/utils/decorators.py in _wrapper return bound_method(*args, *kwargs) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/utils/decorators.py in _wrapped_view response = view_func(request, args, kwargs) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/utils/decorators.py in _wrapper return bound_method(*args, kwargs) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/views/decorators/cache.py in _wrapped_view_func response = view_func(request, *args, *kwargs) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/contrib/auth/views.py in dispatch return super().dispatch(request, args, kwargs) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/views/generic/base.py in dispatch return handler(request, *args, kwargs) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/views/generic/edit.py in post if form.is_valid(): … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/forms/forms.py in is_valid return self.is_bound and not self.errors … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/forms/forms.py in errors self.full_clean() … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/forms/forms.py in full_clean self._clean_form() … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/forms/forms.py in _clean_form cleaned_data = self.clean() … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/contrib/auth/forms.py in clean self.user_cache = authenticate(self.request, username=username, password=password) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/contrib/auth/init.py in authenticate user = backend.authenticate(request, credentials) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/contrib/auth/backends.py in authenticate user = UserModel._default_manager.get_by_natural_key(username) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/contrib/auth/base_user.py in get_by_natural_key return self.get(*{self.model.USERNAME_FIELD: username}) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/models/manager.py in manager_method return getattr(self.get_queryset(), name)(args, **kwargs) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/models/query.py in get num = len(clone) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/models/query.py in len self._fetch_all() … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/models/query.py in _fetch_all self._result_cache = list(self._iterable_class(self)) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/models/query.py in iter results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/models/sql/compiler.py in execute_sql cursor.execute(sql, params) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/utils.py in execute return super().execute(sql, params) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/utils.py in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/utils.py in _execute_with_wrappers return executor(sql, params, many, context) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/utils.py in _execute return self.cursor.execute(sql, params) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/utils.py in exit raise dj_exc_value.with_traceback(traceback) from exc_value … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/utils.py in _execute return self.cursor.execute(sql, params) … ▶ Local vars /home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py in execute return Database.Cursor.execute(self, query, params) … ▶ Local vars Request information USER AnonymousUser

GET Variable Value next
'/' POST Variable Value csrfmiddlewaretoken 'do2oZLiyaOqEQKX2cxgkiBoU53yq1ZghehaJK5nOb6JV8zLNOy2VOdITCGovSTyv' username
'test' password
'test' FILES No FILES data

Variable Value csrftoken
'bcZEPYMFLjTECaToMtQMYhZjl2ZQZQJMc57ZAiRVMBcVUZH9ouCnuTjiSFPVQK10' _xsrf
'2|240b8d8e|932620b930670b32e19414fe501ca0a1|1582488694' username-127-0-0-1-8888 '2|1:0|10:1582711000|23:username-127-0-0-1-8888|44:ZTAzNTc5ZTBjZGIwNGZkNDljYTEwYWZmNDE2YjMzNzA=|e53e5d4c17554ad0a92b404e84aff1d572dc8ff07f6d7e6e629946c7c6949441' META Variable Value CLUTTER_BACKEND 'x11' CLUTTER_IM_MODULE
'xim' COLORTERM
'truecolor' CONTENT_LENGTH
'112' CONTENT_TYPE
'application/x-www-form-urlencoded' CSRF_COOKIE 'bcZEPYMFLjTECaToMtQMYhZjl2ZQZQJMc57ZAiRVMBcVUZH9ouCnuTjiSFPVQK10' DBUS_SESSION_BUS_ADDRESS
'unix:path=/run/user/1000/bus' DEFAULTS_PATH
'/usr/share/gconf/xubuntu.default.path' DESKTOP_SESSION 'xubuntu' DISPLAY ':0.0' DJANGO_SETTINGS_MODULE
'charity_app.settings' GATEWAY_INTERFACE
'CGI/1.1' GDMSESSION
'xubuntu' GDM_LANG
'en_GB' GLADE_CATALOG_PATH
':' GLADE_MODULE_PATH
':' GLADE_PIXMAP_PATH
':' GPG_AGENT_INFO
'/run/user/1000/gnupg/S.gpg-agent:0:1' GTK_IM_MODULE
'xim' GTK_OVERLAY_SCROLLING
'0' HOME
'/home/leidem' HTTP_ACCEPT 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9' HTTP_ACCEPT_ENCODING
'gzip, deflate, br' HTTP_ACCEPT_LANGUAGE
'en-GB,en-US;q=0.9,en;q=0.8' HTTP_CACHE_CONTROL
'max-age=0' HTTP_CONNECTION 'keep-alive' HTTP_COOKIE ('csrftoken=bcZEPYMFLjTECaToMtQMYhZjl2ZQZQJMc57ZAiRVMBcVUZH9ouCnuTjiSFPVQK10; ' '_xsrf=2|240b8d8e|932620b930670b32e19414fe501ca0a1|1582488694; ' 'username-127-0-0-1-8888="2|1:0|10:1582711000|23:username-127-0-0-1-8888|44:ZTAzNTc5ZTBjZGIwNGZkNDljYTEwYWZmNDE2YjMzNzA=|e53e5d4c17554ad0a92b404e84aff1d572dc8ff07f6d7e6e629946c7c6949441"') HTTP_DNT
'1' HTTP_HOST
'127.0.0.1:8000' HTTP_ORIGIN 'http://127.0.0.1:8000' HTTP_REFERER
'http://127.0.0.1:8000/accounts/login/?next=/' HTTP_SEC_FETCH_DEST 'document' HTTP_SEC_FETCH_MODE 'navigate' HTTP_SEC_FETCH_SITE 'same-origin' HTTP_SEC_FETCH_USER '?1' HTTP_UPGRADE_INSECURE_REQUESTS
'1' HTTP_USER_AGENT ('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/80.0.3987.132 Safari/537.36') LANG
'en_GB.UTF-8' LANGUAGE
'en_GB:en' LC_ADDRESS
'en_GB.UTF-8' LC_IDENTIFICATION
'en_GB.UTF-8' LC_MEASUREMENT
'en_GB.UTF-8' LC_MONETARY 'en_GB.UTF-8' LC_NAME 'en_GB.UTF-8' LC_NUMERIC
'en_GB.UTF-8' LC_PAPER
'en_GB.UTF-8' LC_TELEPHONE
'en_GB.UTF-8' LC_TIME 'en_GB.UTF-8' LESSCLOSE
'/usr/bin/lesspipe %s %s' LESSOPEN
'| /usr/bin/lesspipe %s' LOGNAME 'leidem' LS_COLORS
'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.zst=01;31:.tzst=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.wim=01;31:.swm=01;31:.dwm=01;31:.esd=01;31:.jpg=01;35:.jpeg=01;35:.mjpg=01;35:.mjpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.m4a=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.oga=00;36:.opus=00;36:.spx=00;36:.xspf=00;36:' MANDATORY_PATH
'/usr/share/gconf/xubuntu.mandatory.path' OLDPWD
'/home/leidem/gitsky/charity_data/web_app' PAPERSIZE
'a4' PATH
'/home/leidem/gitsky/charity_data/.env/bin:/home/leidem/anaconda3/bin:/home/leidem/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin' PATH_INFO
'/accounts/login/' PS1 ('(.env) \[\e]0;\u@\h: ' '\w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ') PWD '/home/leidem/gitsky/charity_data' QT4_IM_MODULE
'xim' QT_ACCESSIBILITY
'1' QT_QPA_PLATFORMTHEME
'gtk2' QUERY_STRING
'next=/' REMOTE_ADDR '127.0.0.1' REMOTE_HOST '' REQUEST_METHOD
'POST' RUN_MAIN
'true' SCRIPT_NAME '' SERVER_NAME 'localhost' SERVER_PORT '8000' SERVER_PROTOCOL 'HTTP/1.1' SERVER_SOFTWARE 'WSGIServer/0.2' SESSION_MANAGER 'local/DansThinkpad:@/tmp/.ICE-unix/1660,unix/DansThinkpad:/tmp/.ICE-unix/1660' SHELL
'/bin/bash' SHLVL
'1' SSH_AGENT_PID
'1615' SSH_AUTH_SOCK
'/run/user/1000/keyring/ssh' TERM
'xterm-256color' TZ
'UTC' USER
'leidem' VIRTUAL_ENV '/home/leidem/gitsky/charity_data/.env' VTE_VERSION '5202' WINDOWID
'88080387' XAUTHORITY
'/home/leidem/.Xauthority' XDG_CONFIG_DIRS '/etc/xdg/xdg-xubuntu:/etc/xdg:/etc/xdg' XDG_CURRENT_DESKTOP 'XFCE' XDG_DATA_DIRS
'/usr/share/xubuntu:/usr/share/xfce4:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop:/usr/share' XDG_GREETER_DATA_DIR
'/var/lib/lightdm-data/leidem' XDG_MENU_PREFIX 'xfce-' XDG_RUNTIME_DIR '/run/user/1000' XDG_SEAT
'seat0' XDG_SEAT_PATH
'/org/freedesktop/DisplayManager/Seat0' XDG_SESSION_DESKTOP 'xubuntu' XDG_SESSION_ID
'c2' XDG_SESSION_PATH
'/org/freedesktop/DisplayManager/Session0' XDG_SESSION_TYPE
'x11' XDGVTNR
'7' XMODIFIERS
'@im=none'

'/home/leidem/gitsky/charity_data/.env/bin/python' wsgi.errors

<_io.TextIOWrapper name='' mode='w' encoding='UTF-8'> wsgi.file_wrapper '' wsgi.input wsgi.multiprocess False wsgi.multithread True wsgi.run_once False wsgi.url_scheme 'http' wsgi.version (1, 0) Settings Using settings module charity_app.settings Setting Value ABSOLUTE_URL_OVERRIDES {} ADMINS [] ALLOWED_HOSTS ['192.168.0.35', 'localhost', '127.0.0.1'] APPEND_SLASH True AUTHENTICATION_BACKENDS ['django.contrib.auth.backends.ModelBackend'] AUTH_PASSWORD_VALIDATORS '********************' AUTH_USER_MODEL 'auth.User' BASE_DIR '/home/leidem/gitsky/charity_data/web_app/charity_app' CACHES {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} CACHE_MIDDLEWARE_ALIAS 'default' CACHE_MIDDLEWARE_KEY_PREFIX '********************' CACHE_MIDDLEWARE_SECONDS 600 CSRF_COOKIE_AGE 31449600 CSRF_COOKIE_DOMAIN None CSRF_COOKIE_HTTPONLY False CSRF_COOKIE_NAME 'csrftoken' CSRF_COOKIE_PATH '/' CSRF_COOKIE_SAMESITE 'Lax' CSRF_COOKIE_SECURE False CSRF_FAILURE_VIEW 'django.views.csrf.csrf_failure' CSRF_HEADER_NAME 'HTTP_X_CSRFTOKEN' CSRF_TRUSTED_ORIGINS [] CSRF_USE_SESSIONS False DATABASES {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.sqlite3', 'HOST': '', 'NAME': '/home/leidem/gitsky/charity_data/web_app/charity_app/db.sqlite3', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': ''}} DATABASE_ROUTERS [] DATA_UPLOAD_MAX_MEMORY_SIZE 2621440 DATA_UPLOAD_MAX_NUMBER_FIELDS 1000 DATETIME_FORMAT 'N j, Y, P' DATETIME_INPUT_FORMATS ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y'] DATE_FORMAT 'N j, Y' DATE_INPUT_FORMATS ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] DEBUG True DEBUG_PROPAGATE_EXCEPTIONS False DECIMAL_SEPARATOR '.' DEFAULT_CHARSET 'utf-8' DEFAULT_EXCEPTION_REPORTER_FILTER 'django.views.debug.SafeExceptionReporterFilter' DEFAULT_FILE_STORAGE 'django.core.files.storage.FileSystemStorage' DEFAULT_FROM_EMAIL 'webmaster@localhost' DEFAULT_INDEX_TABLESPACE '' DEFAULT_TABLESPACE '' DISALLOWED_USER_AGENTS [] EMAIL_BACKEND 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST 'localhost' EMAIL_HOST_PASSWORD '********************' EMAIL_HOST_USER '' EMAIL_PORT 25 EMAIL_SSL_CERTFILE None EMAIL_SSL_KEYFILE '********************' EMAIL_SUBJECT_PREFIX '[Django] ' EMAIL_TIMEOUT None EMAIL_USE_LOCALTIME False EMAIL_USE_SSL False EMAIL_USE_TLS False FILE_CHARSET 'utf-8' FILE_UPLOAD_DIRECTORY_PERMISSIONS None FILE_UPLOAD_HANDLERS ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] FILE_UPLOAD_MAX_MEMORY_SIZE 2621440 FILE_UPLOAD_PERMISSIONS 420 FILE_UPLOAD_TEMP_DIR None FIRST_DAY_OF_WEEK 0 FIXTURE_DIRS [] FORCE_SCRIPT_NAME None FORMAT_MODULE_PATH None FORM_RENDERER 'django.forms.renderers.DjangoTemplates' IGNORABLE_404_URLS [] INSTALLED_APPS ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'record', 'charity_app', 'login', 'charts'] INTERNAL_IPS [] LANGUAGES [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('uz', 'Uzbek'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] LANGUAGES_BIDI ['he', 'ar', 'fa', 'ur'] LANGUAGE_CODE 'en-us' LANGUAGE_COOKIE_AGE None LANGUAGE_COOKIE_DOMAIN None LANGUAGE_COOKIE_HTTPONLY False LANGUAGE_COOKIE_NAME 'django_language' LANGUAGE_COOKIE_PATH '/' LANGUAGE_COOKIE_SAMESITE None LANGUAGE_COOKIE_SECURE False LOCALE_PATHS [] LOGGING {} LOGGING_CONFIG 'logging.config.dictConfig' LOGIN_REDIRECT_URL '/accounts/profile/' LOGIN_URL '/accounts/login/' LOGOUT_REDIRECT_URL None MANAGERS [] MEDIA_ROOT '' MEDIA_URL '' MESSAGE_STORAGE 'django.contrib.messages.storage.fallback.FallbackStorage' MIDDLEWARE ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] MIGRATION_MODULES {} MONTH_DAY_FORMAT 'F j' NUMBER_GROUPING 0 PASSWORD_HASHERS '********************' PASSWORD_RESET_TIMEOUT_DAYS '********************' PREPEND_WWW False ROOT_URLCONF 'charity_app.urls' SECRET_KEY '********************' SECURE_BROWSER_XSS_FILTER False SECURE_CONTENT_TYPE_NOSNIFF True SECURE_HSTS_INCLUDE_SUBDOMAINS False SECURE_HSTS_PRELOAD False SECURE_HSTS_SECONDS 0 SECURE_PROXY_SSL_HEADER None SECURE_REDIRECT_EXEMPT [] SECURE_REFERRER_POLICY None SECURE_SSL_HOST None SECURE_SSL_REDIRECT False SERVER_EMAIL 'root@localhost' SESSION_CACHE_ALIAS 'default' SESSION_COOKIE_AGE 1209600 SESSION_COOKIE_DOMAIN None SESSION_COOKIE_HTTPONLY True SESSION_COOKIE_NAME 'sessionid' SESSION_COOKIE_PATH '/' SESSION_COOKIE_SAMESITE 'Lax' SESSION_COOKIE_SECURE False SESSION_ENGINE 'django.contrib.sessions.backends.db' SESSION_EXPIRE_AT_BROWSER_CLOSE False SESSION_FILE_PATH None SESSION_SAVE_EVERY_REQUEST False SESSION_SERIALIZER 'django.contrib.sessions.serializers.JSONSerializer' SETTINGS_MODULE 'charity_app.settings' SHORT_DATETIME_FORMAT 'm/d/Y P' SHORT_DATE_FORMAT 'm/d/Y' SIGNING_BACKEND 'django.core.signing.TimestampSigner' SILENCED_SYSTEM_CHECKS [] STATICFILES_DIRS [] STATICFILES_FINDERS ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] STATICFILES_STORAGE 'django.contrib.staticfiles.storage.StaticFilesStorage' STATIC_ROOT None STATIC_URL '/static/' TEMPLATES [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/home/leidem/gitsky/charity_data/web_app/charity_app/charity_app/templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}] TEST_NON_SERIALIZED_APPS [] TEST_RUNNER 'django.test.runner.DiscoverRunner' THOUSAND_SEPARATOR ',' TIME_FORMAT 'P' TIME_INPUT_FORMATS ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] TIME_ZONE 'UTC' USE_I18N True USE_L10N True USE_THOUSAND_SEPARATOR False USE_TZ True USE_X_FORWARDED_HOST False USE_X_FORWARDED_PORT False WSGI_APPLICATION 'charity_app.wsgi.application' X_FRAME_OPTIONS 'DENY' YEAR_MONTH_FORMAT 'F Y'
kamransoomro84 commented 4 years ago

You need to first create an admin username and password using:

python manage.py createsuperuser

saattrupdan commented 4 years ago

You need to first create an admin username and password using: python manage.py createsuperuser

I tried this and get the same error:

(.env) leidem@DansThinkpad:~/gitsky/charity_data/web_app/charity_app$ python manage.py createsuperuser
Traceback (most recent call last):
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
    return self.cursor.execute(sql, params)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 396, in execute
    return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: auth_user

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    main()
  File "manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/core/management/base.py", line 328, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 79, in execute
    return super().execute(*args, **options)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/core/management/base.py", line 369, in execute
    output = self.handle(*args, **options)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 100, in handle
    default_username = get_default_username()
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/contrib/auth/management/__init__.py", line 140, in get_default_username
    auth_app.User._default_manager.get(username=default_username)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/models/query.py", line 411, in get
    num = len(clone)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/models/query.py", line 258, in __len__
    self._fetch_all()
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/models/query.py", line 1261, in _fetch_all
    self._result_cache = list(self._iterable_class(self))
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/models/query.py", line 57, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1151, in execute_sql
    cursor.execute(sql, params)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/utils.py", line 100, in execute
    return super().execute(sql, params)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/utils.py", line 68, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
    return self.cursor.execute(sql, params)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/utils.py", line 86, in _execute
    return self.cursor.execute(sql, params)
  File "/home/leidem/gitsky/charity_data/.env/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 396, in execute
    return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: auth_user
kamransoomro84 commented 4 years ago

You also need to apply migrations so that the database tables are updated:

python manage.py migrate python manage.py createsuperuser python manage.py runserver

saattrupdan commented 4 years ago

Great, that worked. Thanks!