Pat-Martinez / share_stuff

Share Stuff web app- class project from PDX Code Guild
http://www.sharestuffnow.net
0 stars 0 forks source link

Group Add Error #2

Closed benkul closed 10 years ago

benkul commented 10 years ago

when attempting to create a group, I get an error saying that the logged in member must be a moderator.
Django Error report below:

ValueError at /sharing/add_group/

Cannot assign "<Member: Ben Kulp (Ben_Kulp)>": "Group.moderator" must be a "Moderator" instance.

Request Method: POST Request URL: http://127.0.0.1:8000/sharing/add_group/ Django Version: 1.6.6 Exception Type: ValueError Exception Value:

Cannot assign "<Member: Ben Kulp (Ben_Kulp)>": "Group.moderator" must be a "Moderator" instance.

Exception Location: C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\db\models\fields\related.py in set, line 339 Python Executable: C:\Users\Lauren.virtualenvs\share\Scripts\python.exe Python Version: 2.7.6 Python Path:

['C:\projects\share_stuff', 'C:\Windows\system32\python27.zip', 'C:\Python27\lib\site-packages\Orange\orng', 'C:\Users\Lauren.virtualenvs\share\DLLs', 'C:\Users\Lauren.virtualenvs\share\lib', 'C:\Users\Lauren.virtualenvs\share\lib\plat-win', 'C:\Users\Lauren.virtualenvs\share\lib\lib-tk', 'C:\Users\Lauren.virtualenvs\share\Scripts', 'c:\Python27\Lib', 'c:\Python27\DLLs', 'c:\Python27\Lib\lib-tk', 'C:\Users\Lauren.virtualenvs\share', 'C:\Users\Lauren.virtualenvs\share\lib\site-packages']

Server time: Mon, 1 Sep 2014 19:15:38 -0700 Traceback Switch to copy-and-paste view

C:\Users\Lauren\.virtualenvs\share\lib\site-packages\django\core\handlers\base.py in get_response

                        response = wrapped_callback(request, *callback_args, **callback_kwargs)

    ...
▶ Local vars
C:\Users\Lauren\.virtualenvs\share\lib\site-packages\django\contrib\auth\decorators.py in _wrapped_view

                    return view_func(request, *args, **kwargs)

    ...
▶ Local vars
C:\projects\share_stuff\sharing\views.py in add_group

                group.moderator = request.user.member

    ...
▶ Local vars
C:\Users\Lauren\.virtualenvs\share\lib\site-packages\django\db\models\fields\related.py in __set__

                                     self.field.name, self.field.rel.to._meta.object_name))

    ...
▶ Local vars

Request information GET

No GET data POST Variable Value csrfmiddlewaretoken

u'XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf'

name

u'Groupy'

submit

u'Create Group'

description

u'this is a group for people who like devo.'

FILES Variable Value group_picture

<InMemoryUploadedFile: devo.jpg (image/jpeg)>

COOKIES Variable Value csrftoken

'XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf'

sessionid

'264ds3kfwowq8qeg1xd2ima7yw5m4fey'

META Variable Value TMP

'C:\Users\Lauren\AppData\Local\Temp'

COMPUTERNAME

'LAUREN-PC'

wsgi.multiprocess

False

RUN_MAIN

'true'

HTTP_REFERER

'http://127.0.0.1:8000/sharing/add_group/'

USERDOMAIN

'Lauren-PC'

wsgi.multithread

True

SERVER_PROTOCOL

'HTTP/1.1'

SERVER_SOFTWARE

'WSGIServer/0.1 Python/2.7.6'

PSMODULEPATH

'C:\Users\Lauren\Documents\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\'

SCRIPT_NAME

u''

COMMONPROGRAMFILES

'C:\Program Files (x86)\Common Files'

QUERY_STRING

''

PROCESSOR_IDENTIFIER

'Intel64 Family 6 Model 23 Stepping 10, GenuineIntel'

REQUEST_METHOD

'POST'

VBOX_MSI_INSTALL_PATH

'C:\Program Files\Oracle\VirtualBox\'

PROGRAMFILES

'C:\Program Files (x86)'

PROCESSOR_REVISION

'170a'

PATH

'C:\Users\Lauren.virtualenvs\share/Scripts;%SystemRoot%\system32\WindowsPowerShell\v1.0\;C:\Users\Lauren.virtualenvs\gui\Lib\site-packages\PyQt4;C:\Python27\Lib\site-packages\PyQt4\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Dell\Dell Wireless WLAN Card;c:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\QuickTime\QTSystem\;c:\Python27\scripts\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\MySQL\MySQL Utilities 1.3.6\;C:\Program Files\MySQL\MySQL Server 5.6\bin;C:\HashiCorp\Vagrant\bin;C:\Program Files (x86)\Heroku\bin;C:\Program Files (x86)\git\cmd;C:\RailsInstaller\Ruby1.9.3\bin;C:\Windows\system32\WindowsPowerShell\v1.0\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Dell\Dell Wireless WLAN Card;c:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Python27;C:\Users\Lauren\AppData\Roaming\npm'

QTJAVA

'C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip'

SYSTEMROOT

'C:\Windows'

PROGRAMFILES(X86)

'C:\Program Files (x86)'

CONTENT_LENGTH

'247637'

VIRTUAL_ENV

'C:\Users\Lauren.virtualenvs\share'

HTTP_USER_AGENT

'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0'

HTTP_CONNECTION

'keep-alive'

HTTP_COOKIE

'csrftoken=XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf; sessionid=264ds3kfwowq8qeg1xd2ima7yw5m4fey'

TEMP

'C:\Users\Lauren\AppData\Local\Temp'

REMOTE_ADDR

'127.0.0.1'

COMMONPROGRAMFILES(X86)

'C:\Program Files (x86)\Common Files'

PROCESSOR_ARCHITECTURE

'x86'

wsgi.url_scheme

'http'

ALLUSERSPROFILE

'C:\ProgramData'

SERVER_PORT

'8000'

LOCALAPPDATA

'C:\Users\Lauren\AppData\Local'

HOMEPATH

'\Users\Lauren'

PROCESSOR_LEVEL

'6'

PROGRAMW6432

'C:\Program Files'

USERNAME

'Lauren'

WORKON_HOME

'C:\Users\Lauren/.virtualenvs'

LOGONSERVER

'\LAUREN-PC'

COMSPEC

'C:\Windows\system32\cmd.exe'

PROGRAMDATA

'C:\ProgramData'

HTTP_ACCEPT

'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8'

PATH_INFO

u'/sharing/add_group/'

CLASSPATH

'.;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip'

CSRF_COOKIE

u'XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf'

wsgi.input

<socket._fileobject object at 0x02FFBC70>

wsgi.errors

<open file '', mode 'w' at 0x020260D0>

HTTP_HOST

'127.0.0.1:8000'

SESSIONNAME

'Console'

PATHEXT

'.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'

ASL.LOG

'Destination=file'

FP_NO_HOST_CHECK

'NO'

WINDIR

'C:\Windows'

wsgi.file_wrapper

''

HTTP_ACCEPT_ENCODING

'gzip, deflate'

wsgi.version

(1, 0)

HOMEDRIVE

'C:'

APPDATA

'C:\Users\Lauren\AppData\Roaming'

SERVER_NAME

'Lauren-PC'

wsgi.run_once

False

REMOTE_HOST

''

SYSTEMDRIVE

'C:'

GATEWAY_INTERFACE

'CGI/1.1'

HTTP_ACCEPT_LANGUAGE

'en-US,en;q=0.5'

NUMBER_OF_PROCESSORS

'2'

HEROKUPATH

'C:\Program Files (x86)\Heroku'

DJANGO_SETTINGS_MODULE

'share_stuff.settings'

CONTENT_TYPE

'multipart/form-data; boundary=---------------------------27458734210002'

PROCESSOR_ARCHITEW6432

'AMD64'

COMMONPROGRAMW6432

'C:\Program Files\Common Files'

OS

'Windows_NT'

PUBLIC

'C:\Users\Public'

USERPROFILE

'C:\Users\Lauren'

Settings Using settings module share_stuff.settings Setting Value USE_L10N

True

USE_THOUSAND_SEPARATOR

False

CSRF_COOKIE_SECURE

False

LANGUAGE_CODE

'en-us'

ROOT_URLCONF

'share_stuff.urls'

MANAGERS

()

BASE_DIR

'C:\projects\share_stuff'

DEFAULT_CHARSET

'utf-8'

SESSION_SERIALIZER

'django.contrib.sessions.serializers.JSONSerializer'

STATIC_ROOT

None

ALLOWED_HOSTS

[]

MESSAGE_STORAGE

'django.contrib.messages.storage.fallback.FallbackStorage'

EMAIL_SUBJECT_PREFIX

'[Django] '

FILE_UPLOAD_PERMISSIONS

None

STATICFILES_FINDERS

('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder')

SESSION_CACHE_ALIAS

'default'

SESSION_COOKIE_DOMAIN

None

SESSION_COOKIE_NAME

'sessionid'

ADMIN_FOR

()

TIME_INPUT_FORMATS

('%H:%M:%S', '%H:%M:%S.%f', '%H:%M')

DATABASES

{'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.sqlite3', 'HOST': '', 'NAME': 'C:\projects\share_stuff\sharing.db', 'OPTIONS': {}, 'PASSWORD': u'****', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'UTC', 'USER': ''}}

SERVER_EMAIL

'root@localhost'

FILE_UPLOAD_HANDLERS

('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler')

DEFAULT_CONTENT_TYPE

'text/html'

APPEND_SLASH

True

LOCALE_PATHS

()

DATABASE_ROUTERS

[]

YEAR_MONTH_FORMAT

'F Y'

STATICFILES_STORAGE

'django.contrib.staticfiles.storage.StaticFilesStorage'

CACHES

{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}

SESSION_COOKIE_PATH

'/'

MIDDLEWARE_CLASSES

('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')

USE_I18N

True

THOUSAND_SEPARATOR

','

SECRET_KEY

u'****'

LANGUAGE_COOKIE_NAME

'django_language'

DEFAULT_INDEX_TABLESPACE

''

TRANSACTIONS_MANAGED

False

LOGGING_CONFIG

'django.utils.log.dictConfig'

SEND_BROKEN_LINK_EMAILS

False

TEMPLATE_LOADERS

('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader')

FIRST_DAY_OF_WEEK

0

WSGI_APPLICATION

'share_stuff.wsgi.application'

TEMPLATE_DEBUG

True

X_FRAME_OPTIONS

'SAMEORIGIN'

CSRF_COOKIE_NAME

'csrftoken'

FORCE_SCRIPT_NAME

None

USE_X_FORWARDED_HOST

False

SETTINGS_DIR

'C:\projects\share_stuff\share_stuff'

SIGNING_BACKEND

'django.core.signing.TimestampSigner'

SESSION_COOKIE_SECURE

False

CSRF_COOKIE_DOMAIN

None

FILE_CHARSET

'utf-8'

DEBUG

True

SESSION_FILE_PATH

None

DEFAULT_FILE_STORAGE

'django.core.files.storage.FileSystemStorage'

INSTALLED_APPS

('django.contrib.admin', 'django.contrib.admindocs', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'sharing')

LANGUAGES

(('af', 'Afrikaans'), ('ar', 'Arabic'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy-nl', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmal'), ('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'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese'))

COMMENTS_ALLOW_PROFANITIES

False

STATICFILES_DIRS

()

PREPEND_WWW

False

SECURE_PROXY_SSL_HEADER

None

SESSION_COOKIE_HTTPONLY

True

DEBUG_PROPAGATE_EXCEPTIONS

False

MONTH_DAY_FORMAT

'F j'

LOGIN_URL

'/sharing/sign_in/'

SESSION_EXPIRE_AT_BROWSER_CLOSE

False

TIME_FORMAT

'P'

AUTH_USER_MODEL

'auth.User'

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')

AUTHENTICATION_BACKENDS

('django.contrib.auth.backends.ModelBackend',)

EMAIL_HOST_PASSWORD

u'****'

TEMPLATE_PATH

'C:\projects\share_stuff\templates'

PASSWORD_RESET_TIMEOUT_DAYS

u'****'

CACHE_MIDDLEWARE_ALIAS

'default'

SESSION_SAVE_EVERY_REQUEST

False

NUMBER_GROUPING

0

SESSION_ENGINE

'django.contrib.sessions.backends.db'

CSRF_FAILURE_VIEW

'django.views.csrf.csrf_failure'

CSRF_COOKIE_PATH

'/'

LOGIN_REDIRECT_URL

'/accounts/profile/'

DECIMAL_SEPARATOR

'.'

IGNORABLE_404_URLS

()

PROJECT_PATH

'C:\projects\share_stuff'

TEMPLATE_STRING_IF_INVALID

''

LOGOUT_URL

'/accounts/logout/'

EMAIL_USE_TLS

False

FIXTURE_DIRS

()

EMAIL_HOST

'localhost'

DATE_FORMAT

'N j, Y'

MEDIA_ROOT

'C:\projects\share_stuff\media'

DEFAULT_EXCEPTION_REPORTER_FILTER

'django.views.debug.SafeExceptionReporterFilter'

ADMINS

()

FORMAT_MODULE_PATH

None

DEFAULT_FROM_EMAIL

'webmaster@localhost'

MEDIA_URL

'/media/'

DATETIME_FORMAT

'N j, Y, P'

TEMPLATE_DIRS

('C:\projects\share_stuff\templates',)

DISALLOWED_USER_AGENTS

()

ALLOWED_INCLUDE_ROOTS

()

LOGGING

{}

SHORT_DATE_FORMAT

'm/d/Y'

TEST_RUNNER

'django.test.runner.DiscoverRunner'

CACHE_MIDDLEWARE_KEY_PREFIX

u'****'

TIME_ZONE

'UTC'

FILE_UPLOAD_MAX_MEMORY_SIZE

2621440

EMAIL_BACKEND

'django.core.mail.backends.smtp.EmailBackend'

DEFAULT_TABLESPACE

''

TEMPLATE_CONTEXT_PROCESSORS

('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages')

SESSION_COOKIE_AGE

1209600

SETTINGS_MODULE

'share_stuff.settings'

USE_ETAGS

False

LANGUAGES_BIDI

('he', 'ar', 'fa', 'ur')

FILE_UPLOAD_TEMP_DIR

None

INTERNAL_IPS

()

STATIC_URL

'/static/'

EMAIL_PORT

25

USE_TZ

True

SHORT_DATETIME_FORMAT

'm/d/Y P'

PASSWORD_HASHERS

u'****'

ABSOLUTE_URL_OVERRIDES

{}

CACHE_MIDDLEWARE_SECONDS

600

CSRF_COOKIE_HTTPONLY

False

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')

EMAIL_HOST_USER

''

PROFANITIES_LIST

u'****'

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.

Pat-Martinez commented 10 years ago

Dear bug catcher,

Thanks! I'll look into this.

Pat

On Mon, Sep 1, 2014 at 7:22 PM, Ben Kulp notifications@github.com wrote:

when attempting to create a group, I get an error saying that the logged in member must be a moderator.

Django Error report below:

ValueError at /sharing/add_group/

Cannot assign "": "Group.moderator" must be a "Moderator" instance.

Request Method: POST Request URL: http://127.0.0.1:8000/sharing/add_group/ Django Version: 1.6.6 Exception Type: ValueError Exception Value:

Cannot assign "": "Group.moderator" must be a "Moderator" instance.

Exception Location: C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\db\models\fields\related.py in set, line 339 Python Executable: C:\Users\Lauren.virtualenvs\share\Scripts\python.exe Python Version: 2.7.6 Python Path:

['C:\projects\share_stuff', 'C:\Windows\system32\python27.zip', 'C:\Python27\lib\site-packages\Orange\orng', 'C:\Users\Lauren.virtualenvs\share\DLLs', 'C:\Users\Lauren.virtualenvs\share\lib', 'C:\Users\Lauren.virtualenvs\share\lib\plat-win', 'C:\Users\Lauren.virtualenvs\share\lib\lib-tk', 'C:\Users\Lauren.virtualenvs\share\Scripts', 'c:\Python27\Lib', 'c:\Python27\DLLs', 'c:\Python27\Lib\lib-tk', 'C:\Users\Lauren.virtualenvs\share', 'C:\Users\Lauren.virtualenvs\share\lib\site-packages']

Server time: Mon, 1 Sep 2014 19:15:38 -0700 Traceback Switch to copy-and-paste view

C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\core\handlers\base.py in get_response

                    response = wrapped_callback(request, *callback_args, **callback_kwargs)

...

▶ Local vars C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\contrib\auth\decorators.py in _wrapped_view

                return view_func(request, *args, **kwargs)

...

▶ Local vars C:\projects\share_stuff\sharing\views.py in add_group

            group.moderator = request.user.member

...

▶ Local vars C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\db\models\fields\related.py in set

                                 self.field.name, self.field.rel.to._meta.object_name))

...

▶ Local vars

Request information GET

No GET data POST Variable Value csrfmiddlewaretoken

u'XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf'

name

u'Groupy'

submit

u'Create Group'

description

u'this is a group for people who like devo.'

FILES Variable Value group_picture

COOKIES Variable Value csrftoken

'XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf'

sessionid

'264ds3kfwowq8qeg1xd2ima7yw5m4fey'

META Variable Value TMP

'C:\Users\Lauren\AppData\Local\Temp'

COMPUTERNAME

'LAUREN-PC'

wsgi.multiprocess

False

RUN_MAIN

'true'

HTTP_REFERER

'http://127.0.0.1:8000/sharing/add_group/'

USERDOMAIN

'Lauren-PC'

wsgi.multithread

True

SERVER_PROTOCOL

'HTTP/1.1'

SERVER_SOFTWARE

'WSGIServer/0.1 Python/2.7.6'

PSMODULEPATH

'C:\Users\Lauren\Documents\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\'

SCRIPT_NAME

u''

COMMONPROGRAMFILES

'C:\Program Files (x86)\Common Files'

QUERY_STRING

''

PROCESSOR_IDENTIFIER

'Intel64 Family 6 Model 23 Stepping 10, GenuineIntel'

REQUEST_METHOD

'POST'

VBOX_MSI_INSTALL_PATH

'C:\Program Files\Oracle\VirtualBox\'

PROGRAMFILES

'C:\Program Files (x86)'

PROCESSOR_REVISION

'170a'

PATH

'C:\Users\Lauren.virtualenvs\share/Scripts;%SystemRoot%\system32\WindowsPowerShell\v1.0\;C:\Users\Lauren.virtualenvs\gui\Lib\site-packages\PyQt4;C:\Python27\Lib\site-packages\PyQt4\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Dell\Dell Wireless WLAN Card;c:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\QuickTime\QTSystem\;c:\Python27\scripts\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\MySQL\MySQL Utilities 1.3.6\;C:\Program Files\MySQL\MySQL Server 5.6\bin;C:\HashiCorp\Vagrant\bin;C:\Program Files (x86)\Heroku\bin;C:\Program Files (x86)\git\cmd;C:\RailsInstaller\Ruby1.9.3\bin;C:\Windows\system32\WindowsPowerShell\v1.0\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Dell\Dell Wireless WLAN Card;c:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Python27;C:\Users\Lauren\AppData\Roaming\npm'

QTJAVA

'C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip'

SYSTEMROOT

'C:\Windows'

PROGRAMFILES(X86)

'C:\Program Files (x86)'

CONTENT_LENGTH

'247637'

VIRTUAL_ENV

'C:\Users\Lauren.virtualenvs\share'

HTTP_USER_AGENT

'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0'

HTTP_CONNECTION

'keep-alive'

HTTP_COOKIE

'csrftoken=XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf; sessionid=264ds3kfwowq8qeg1xd2ima7yw5m4fey'

TEMP

'C:\Users\Lauren\AppData\Local\Temp'

REMOTE_ADDR

'127.0.0.1'

COMMONPROGRAMFILES(X86)

'C:\Program Files (x86)\Common Files'

PROCESSOR_ARCHITECTURE

'x86'

wsgi.url_scheme

'http'

ALLUSERSPROFILE

'C:\ProgramData'

SERVER_PORT

'8000'

LOCALAPPDATA

'C:\Users\Lauren\AppData\Local'

HOMEPATH

'\Users\Lauren'

PROCESSOR_LEVEL

'6'

PROGRAMW6432

'C:\Program Files'

USERNAME

'Lauren'

WORKON_HOME

'C:\Users\Lauren/.virtualenvs'

LOGONSERVER

'\LAUREN-PC'

COMSPEC

'C:\Windows\system32\cmd.exe'

PROGRAMDATA

'C:\ProgramData'

HTTP_ACCEPT

'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8'

PATH_INFO

u'/sharing/add_group/'

CLASSPATH

'.;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip'

CSRF_COOKIE

u'XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf'

wsgi.input

wsgi.errors

', mode 'w' at 0x020260D0>

HTTP_HOST

'127.0.0.1:8000'

SESSIONNAME

'Console'

PATHEXT

'.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'

ASL.LOG

'Destination=file'

FP_NO_HOST_CHECK

'NO'

WINDIR

'C:\Windows'

wsgi.file_wrapper

''

HTTP_ACCEPT_ENCODING

'gzip, deflate'

wsgi.version

(1, 0)

HOMEDRIVE

'C:'

APPDATA

'C:\Users\Lauren\AppData\Roaming'

SERVER_NAME

'Lauren-PC'

wsgi.run_once

False

REMOTE_HOST

''

SYSTEMDRIVE

'C:'

GATEWAY_INTERFACE

'CGI/1.1'

HTTP_ACCEPT_LANGUAGE

'en-US,en;q=0.5'

NUMBER_OF_PROCESSORS

'2'

HEROKUPATH

'C:\Program Files (x86)\Heroku'

DJANGO_SETTINGS_MODULE

'share_stuff.settings'

CONTENT_TYPE

'multipart/form-data; boundary=---------------------------27458734210002'

PROCESSOR_ARCHITEW6432

'AMD64'

COMMONPROGRAMW6432

'C:\Program Files\Common Files'

OS

'Windows_NT'

PUBLIC

'C:\Users\Public'

USERPROFILE

'C:\Users\Lauren'

Settings Using settings module share_stuff.settings Setting Value USE_L10N

True

USE_THOUSAND_SEPARATOR

False

CSRF_COOKIE_SECURE

False

LANGUAGE_CODE

'en-us'

ROOT_URLCONF

'share_stuff.urls'

MANAGERS

()

BASE_DIR

'C:\projects\share_stuff'

DEFAULT_CHARSET

'utf-8'

SESSION_SERIALIZER

'django.contrib.sessions.serializers.JSONSerializer'

STATIC_ROOT

None

ALLOWED_HOSTS

[]

MESSAGE_STORAGE

'django.contrib.messages.storage.fallback.FallbackStorage'

EMAIL_SUBJECT_PREFIX

'[Django] '

FILE_UPLOAD_PERMISSIONS

None

STATICFILES_FINDERS

('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder')

SESSION_CACHE_ALIAS

'default'

SESSION_COOKIE_DOMAIN

None

SESSION_COOKIE_NAME

'sessionid'

ADMIN_FOR

()

TIME_INPUT_FORMATS

('%H:%M:%S', '%H:%M:%S.%f', '%H:%M')

DATABASES

{'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.sqlite3', 'HOST': '', 'NAME': 'C:\projects\share_stuff\sharing.db', 'OPTIONS': {}, 'PASSWORD': u'****', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'UTC', 'USER': ''}}

SERVER_EMAIL

'root@localhost'

FILE_UPLOAD_HANDLERS

('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler')

DEFAULT_CONTENT_TYPE

'text/html'

APPEND_SLASH

True

LOCALE_PATHS

()

DATABASE_ROUTERS

[]

YEAR_MONTH_FORMAT

'F Y'

STATICFILES_STORAGE

'django.contrib.staticfiles.storage.StaticFilesStorage'

CACHES

{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}

SESSION_COOKIE_PATH

'/'

MIDDLEWARE_CLASSES

('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')

USE_I18N

True

THOUSAND_SEPARATOR

','

SECRET_KEY

u'****'

LANGUAGE_COOKIE_NAME

'django_language'

DEFAULT_INDEX_TABLESPACE

''

TRANSACTIONS_MANAGED

False

LOGGING_CONFIG

'django.utils.log.dictConfig'

SEND_BROKEN_LINK_EMAILS

False

TEMPLATE_LOADERS

('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader')

FIRST_DAY_OF_WEEK

0

WSGI_APPLICATION

'share_stuff.wsgi.application'

TEMPLATE_DEBUG

True

X_FRAME_OPTIONS

'SAMEORIGIN'

CSRF_COOKIE_NAME

'csrftoken'

FORCE_SCRIPT_NAME

None

USE_X_FORWARDED_HOST

False

SETTINGS_DIR

'C:\projects\share_stuff\share_stuff'

SIGNING_BACKEND

'django.core.signing.TimestampSigner'

SESSION_COOKIE_SECURE

False

CSRF_COOKIE_DOMAIN

None

FILE_CHARSET

'utf-8'

DEBUG

True

SESSION_FILE_PATH

None

DEFAULT_FILE_STORAGE

'django.core.files.storage.FileSystemStorage'

INSTALLED_APPS

('django.contrib.admin', 'django.contrib.admindocs', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'sharing')

LANGUAGES

(('af', 'Afrikaans'), ('ar', 'Arabic'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy-nl', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmal'), ('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'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese'))

COMMENTS_ALLOW_PROFANITIES

False

STATICFILES_DIRS

()

PREPEND_WWW

False

SECURE_PROXY_SSL_HEADER

None

SESSION_COOKIE_HTTPONLY

True

DEBUG_PROPAGATE_EXCEPTIONS

False

MONTH_DAY_FORMAT

'F j'

LOGIN_URL

'/sharing/sign_in/'

SESSION_EXPIRE_AT_BROWSER_CLOSE

False

TIME_FORMAT

'P'

AUTH_USER_MODEL

'auth.User'

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')

AUTHENTICATION_BACKENDS

('django.contrib.auth.backends.ModelBackend',)

EMAIL_HOST_PASSWORD

u'****'

TEMPLATE_PATH

'C:\projects\share_stuff\templates'

PASSWORD_RESET_TIMEOUT_DAYS

u'****'

CACHE_MIDDLEWARE_ALIAS

'default'

SESSION_SAVE_EVERY_REQUEST

False

NUMBER_GROUPING

0

SESSION_ENGINE

'django.contrib.sessions.backends.db'

CSRF_FAILURE_VIEW

'django.views.csrf.csrf_failure'

CSRF_COOKIE_PATH

'/'

LOGIN_REDIRECT_URL

'/accounts/profile/'

DECIMAL_SEPARATOR

'.'

IGNORABLE_404_URLS

()

PROJECT_PATH

'C:\projects\share_stuff'

TEMPLATE_STRING_IF_INVALID

''

LOGOUT_URL

'/accounts/logout/'

EMAIL_USE_TLS

False

FIXTURE_DIRS

()

EMAIL_HOST

'localhost'

DATE_FORMAT

'N j, Y'

MEDIA_ROOT

'C:\projects\share_stuff\media'

DEFAULT_EXCEPTION_REPORTER_FILTER

'django.views.debug.SafeExceptionReporterFilter'

ADMINS

()

FORMAT_MODULE_PATH

None

DEFAULT_FROM_EMAIL

'webmaster@localhost'

MEDIA_URL

'/media/'

DATETIME_FORMAT

'N j, Y, P'

TEMPLATE_DIRS

('C:\projects\share_stuff\templates',)

DISALLOWED_USER_AGENTS

()

ALLOWED_INCLUDE_ROOTS

()

LOGGING

{}

SHORT_DATE_FORMAT

'm/d/Y'

TEST_RUNNER

'django.test.runner.DiscoverRunner'

CACHE_MIDDLEWARE_KEY_PREFIX

u'****'

TIME_ZONE

'UTC'

FILE_UPLOAD_MAX_MEMORY_SIZE

2621440

EMAIL_BACKEND

'django.core.mail.backends.smtp.EmailBackend'

DEFAULT_TABLESPACE

''

TEMPLATE_CONTEXT_PROCESSORS

('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages')

SESSION_COOKIE_AGE

1209600

SETTINGS_MODULE

'share_stuff.settings'

USE_ETAGS

False

LANGUAGES_BIDI

('he', 'ar', 'fa', 'ur')

FILE_UPLOAD_TEMP_DIR

None

INTERNAL_IPS

()

STATIC_URL

'/static/'

EMAIL_PORT

25

USE_TZ

True

SHORT_DATETIME_FORMAT

'm/d/Y P'

PASSWORD_HASHERS

u'****'

ABSOLUTE_URL_OVERRIDES

{}

CACHE_MIDDLEWARE_SECONDS

600

CSRF_COOKIE_HTTPONLY

False

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')

EMAIL_HOST_USER

''

PROFANITIES_LIST

u'****'

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.

— Reply to this email directly or view it on GitHub https://github.com/Pat-Martinez/share_stuff/issues/2.

benkul commented 10 years ago

Pretty sure I sent a pull request with a possible fix. :) On Sep 6, 2014 12:13 PM, "Pat Martinez" notifications@github.com wrote:

Dear bug catcher,

Thanks! I'll look into this.

Pat

On Mon, Sep 1, 2014 at 7:22 PM, Ben Kulp notifications@github.com wrote:

when attempting to create a group, I get an error saying that the logged in member must be a moderator.

Django Error report below:

ValueError at /sharing/add_group/

Cannot assign "": "Group.moderator" must be a "Moderator" instance.

Request Method: POST Request URL: http://127.0.0.1:8000/sharing/add_group/ Django Version: 1.6.6 Exception Type: ValueError Exception Value:

Cannot assign "": "Group.moderator" must be a "Moderator" instance.

Exception Location:

C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\db\models\fields\related.py

in set, line 339 Python Executable: C:\Users\Lauren.virtualenvs\share\Scripts\python.exe Python Version: 2.7.6 Python Path:

['C:\projects\share_stuff', 'C:\Windows\system32\python27.zip', 'C:\Python27\lib\site-packages\Orange\orng', 'C:\Users\Lauren.virtualenvs\share\DLLs', 'C:\Users\Lauren.virtualenvs\share\lib', 'C:\Users\Lauren.virtualenvs\share\lib\plat-win', 'C:\Users\Lauren.virtualenvs\share\lib\lib-tk', 'C:\Users\Lauren.virtualenvs\share\Scripts', 'c:\Python27\Lib', 'c:\Python27\DLLs', 'c:\Python27\Lib\lib-tk', 'C:\Users\Lauren.virtualenvs\share', 'C:\Users\Lauren.virtualenvs\share\lib\site-packages']

Server time: Mon, 1 Sep 2014 19:15:38 -0700 Traceback Switch to copy-and-paste view

C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\core\handlers\base.py in get_response

response = wrapped_callback(request, _callback_args, *_callback_kwargs)

... ▶ Local vars

C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\contrib\auth\decorators.py in _wrapped_view

return view_func(request, _args, *_kwargs)

... ▶ Local vars C:\projects\share_stuff\sharing\views.py in add_group

group.moderator = request.user.member

... ▶ Local vars

C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\db\models\fields\related.py in set

self.field.name, self.field.rel.to._meta.object_name))

... ▶ Local vars

Request information GET

No GET data POST Variable Value csrfmiddlewaretoken

u'XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf'

name

u'Groupy'

submit

u'Create Group'

description

u'this is a group for people who like devo.'

FILES Variable Value group_picture

COOKIES Variable Value csrftoken

'XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf'

sessionid

'264ds3kfwowq8qeg1xd2ima7yw5m4fey'

META Variable Value TMP

'C:\Users\Lauren\AppData\Local\Temp'

COMPUTERNAME

'LAUREN-PC'

wsgi.multiprocess

False

RUN_MAIN

'true'

HTTP_REFERER

'http://127.0.0.1:8000/sharing/add_group/'

USERDOMAIN

'Lauren-PC'

wsgi.multithread

True

SERVER_PROTOCOL

'HTTP/1.1'

SERVER_SOFTWARE

'WSGIServer/0.1 Python/2.7.6'

PSMODULEPATH

'C:\Users\Lauren\Documents\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\'

SCRIPT_NAME

u''

COMMONPROGRAMFILES

'C:\Program Files (x86)\Common Files'

QUERY_STRING

''

PROCESSOR_IDENTIFIER

'Intel64 Family 6 Model 23 Stepping 10, GenuineIntel'

REQUEST_METHOD

'POST'

VBOX_MSI_INSTALL_PATH

'C:\Program Files\Oracle\VirtualBox\'

PROGRAMFILES

'C:\Program Files (x86)'

PROCESSOR_REVISION

'170a'

PATH

'C:\Users\Lauren.virtualenvs\share/Scripts;%SystemRoot%\system32\WindowsPowerShell\v1.0\;C:\Users\Lauren.virtualenvs\gui\Lib\site-packages\PyQt4;C:\Python27\Lib\site-packages\PyQt4\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program

Files\Dell\Dell Wireless WLAN Card;c:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\QuickTime\QTSystem\;c:\Python27\scripts\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\MySQL\MySQL Utilities 1.3.6\;C:\Program Files\MySQL\MySQL Server 5.6\bin;C:\HashiCorp\Vagrant\bin;C:\Program Files (x86)\Heroku\bin;C:\Program Files

(x86)\git\cmd;C:\RailsInstaller\Ruby1.9.3\bin;C:\Windows\system32\WindowsPowerShell\v1.0\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program

Files\Dell\Dell Wireless WLAN Card;c:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files

(x86)\QuickTime\QTSystem\;C:\Python27;C:\Users\Lauren\AppData\Roaming\npm'

QTJAVA

'C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip'

SYSTEMROOT

'C:\Windows'

PROGRAMFILES(X86)

'C:\Program Files (x86)'

CONTENT_LENGTH

'247637'

VIRTUAL_ENV

'C:\Users\Lauren.virtualenvs\share'

HTTP_USER_AGENT

'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0'

HTTP_CONNECTION

'keep-alive'

HTTP_COOKIE

'csrftoken=XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf; sessionid=264ds3kfwowq8qeg1xd2ima7yw5m4fey'

TEMP

'C:\Users\Lauren\AppData\Local\Temp'

REMOTE_ADDR

'127.0.0.1'

COMMONPROGRAMFILES(X86)

'C:\Program Files (x86)\Common Files'

PROCESSOR_ARCHITECTURE

'x86'

wsgi.url_scheme

'http'

ALLUSERSPROFILE

'C:\ProgramData'

SERVER_PORT

'8000'

LOCALAPPDATA

'C:\Users\Lauren\AppData\Local'

HOMEPATH

'\Users\Lauren'

PROCESSOR_LEVEL

'6'

PROGRAMW6432

'C:\Program Files'

USERNAME

'Lauren'

WORKON_HOME

'C:\Users\Lauren/.virtualenvs'

LOGONSERVER

'\LAUREN-PC'

COMSPEC

'C:\Windows\system32\cmd.exe'

PROGRAMDATA

'C:\ProgramData'

HTTP_ACCEPT

'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8'

PATH_INFO

u'/sharing/add_group/'

CLASSPATH

'.;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip'

CSRF_COOKIE

u'XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf'

wsgi.input

wsgi.errors

', mode 'w' at 0x020260D0>

HTTP_HOST

'127.0.0.1:8000'

SESSIONNAME

'Console'

PATHEXT

'.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'

ASL.LOG

'Destination=file'

FP_NO_HOST_CHECK

'NO'

WINDIR

'C:\Windows'

wsgi.file_wrapper

''

HTTP_ACCEPT_ENCODING

'gzip, deflate'

wsgi.version

(1, 0)

HOMEDRIVE

'C:'

APPDATA

'C:\Users\Lauren\AppData\Roaming'

SERVER_NAME

'Lauren-PC'

wsgi.run_once

False

REMOTE_HOST

''

SYSTEMDRIVE

'C:'

GATEWAY_INTERFACE

'CGI/1.1'

HTTP_ACCEPT_LANGUAGE

'en-US,en;q=0.5'

NUMBER_OF_PROCESSORS

'2'

HEROKUPATH

'C:\Program Files (x86)\Heroku'

DJANGO_SETTINGS_MODULE

'share_stuff.settings'

CONTENT_TYPE

'multipart/form-data; boundary=---------------------------27458734210002'

PROCESSOR_ARCHITEW6432

'AMD64'

COMMONPROGRAMW6432

'C:\Program Files\Common Files'

OS

'Windows_NT'

PUBLIC

'C:\Users\Public'

USERPROFILE

'C:\Users\Lauren'

Settings Using settings module share_stuff.settings Setting Value USE_L10N

True

USE_THOUSAND_SEPARATOR

False

CSRF_COOKIE_SECURE

False

LANGUAGE_CODE

'en-us'

ROOT_URLCONF

'share_stuff.urls'

MANAGERS

()

BASE_DIR

'C:\projects\share_stuff'

DEFAULT_CHARSET

'utf-8'

SESSION_SERIALIZER

'django.contrib.sessions.serializers.JSONSerializer'

STATIC_ROOT

None

ALLOWED_HOSTS

[]

MESSAGE_STORAGE

'django.contrib.messages.storage.fallback.FallbackStorage'

EMAIL_SUBJECT_PREFIX

'[Django] '

FILE_UPLOAD_PERMISSIONS

None

STATICFILES_FINDERS

('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder')

SESSION_CACHE_ALIAS

'default'

SESSION_COOKIE_DOMAIN

None

SESSION_COOKIE_NAME

'sessionid'

ADMIN_FOR

()

TIME_INPUT_FORMATS

('%H:%M:%S', '%H:%M:%S.%f', '%H:%M')

DATABASES

{'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.sqlite3', 'HOST': '', 'NAME': 'C:\projects\share_stuff\sharing.db', 'OPTIONS': {}, 'PASSWORD': u'****', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'UTC', 'USER': ''}}

SERVER_EMAIL

'root@localhost'

FILE_UPLOAD_HANDLERS

('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler')

DEFAULT_CONTENT_TYPE

'text/html'

APPEND_SLASH

True

LOCALE_PATHS

()

DATABASE_ROUTERS

[]

YEAR_MONTH_FORMAT

'F Y'

STATICFILES_STORAGE

'django.contrib.staticfiles.storage.StaticFilesStorage'

CACHES

{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}

SESSION_COOKIE_PATH

'/'

MIDDLEWARE_CLASSES

('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')

USE_I18N

True

THOUSAND_SEPARATOR

','

SECRET_KEY

u'****'

LANGUAGE_COOKIE_NAME

'django_language'

DEFAULT_INDEX_TABLESPACE

''

TRANSACTIONS_MANAGED

False

LOGGING_CONFIG

'django.utils.log.dictConfig'

SEND_BROKEN_LINK_EMAILS

False

TEMPLATE_LOADERS

('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader')

FIRST_DAY_OF_WEEK

0

WSGI_APPLICATION

'share_stuff.wsgi.application'

TEMPLATE_DEBUG

True

X_FRAME_OPTIONS

'SAMEORIGIN'

CSRF_COOKIE_NAME

'csrftoken'

FORCE_SCRIPT_NAME

None

USE_X_FORWARDED_HOST

False

SETTINGS_DIR

'C:\projects\share_stuff\share_stuff'

SIGNING_BACKEND

'django.core.signing.TimestampSigner'

SESSION_COOKIE_SECURE

False

CSRF_COOKIE_DOMAIN

None

FILE_CHARSET

'utf-8'

DEBUG

True

SESSION_FILE_PATH

None

DEFAULT_FILE_STORAGE

'django.core.files.storage.FileSystemStorage'

INSTALLED_APPS

('django.contrib.admin', 'django.contrib.admindocs', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'sharing')

LANGUAGES

(('af', 'Afrikaans'), ('ar', 'Arabic'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy-nl', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmal'), ('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'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese'))

COMMENTS_ALLOW_PROFANITIES

False

STATICFILES_DIRS

()

PREPEND_WWW

False

SECURE_PROXY_SSL_HEADER

None

SESSION_COOKIE_HTTPONLY

True

DEBUG_PROPAGATE_EXCEPTIONS

False

MONTH_DAY_FORMAT

'F j'

LOGIN_URL

'/sharing/sign_in/'

SESSION_EXPIRE_AT_BROWSER_CLOSE

False

TIME_FORMAT

'P'

AUTH_USER_MODEL

'auth.User'

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')

AUTHENTICATION_BACKENDS

('django.contrib.auth.backends.ModelBackend',)

EMAIL_HOST_PASSWORD

u'****'

TEMPLATE_PATH

'C:\projects\share_stuff\templates'

PASSWORD_RESET_TIMEOUT_DAYS

u'****'

CACHE_MIDDLEWARE_ALIAS

'default'

SESSION_SAVE_EVERY_REQUEST

False

NUMBER_GROUPING

0

SESSION_ENGINE

'django.contrib.sessions.backends.db'

CSRF_FAILURE_VIEW

'django.views.csrf.csrf_failure'

CSRF_COOKIE_PATH

'/'

LOGIN_REDIRECT_URL

'/accounts/profile/'

DECIMAL_SEPARATOR

'.'

IGNORABLE_404_URLS

()

PROJECT_PATH

'C:\projects\share_stuff'

TEMPLATE_STRING_IF_INVALID

''

LOGOUT_URL

'/accounts/logout/'

EMAIL_USE_TLS

False

FIXTURE_DIRS

()

EMAIL_HOST

'localhost'

DATE_FORMAT

'N j, Y'

MEDIA_ROOT

'C:\projects\share_stuff\media'

DEFAULT_EXCEPTION_REPORTER_FILTER

'django.views.debug.SafeExceptionReporterFilter'

ADMINS

()

FORMAT_MODULE_PATH

None

DEFAULT_FROM_EMAIL

'webmaster@localhost'

MEDIA_URL

'/media/'

DATETIME_FORMAT

'N j, Y, P'

TEMPLATE_DIRS

('C:\projects\share_stuff\templates',)

DISALLOWED_USER_AGENTS

()

ALLOWED_INCLUDE_ROOTS

()

LOGGING

{}

SHORT_DATE_FORMAT

'm/d/Y'

TEST_RUNNER

'django.test.runner.DiscoverRunner'

CACHE_MIDDLEWARE_KEY_PREFIX

u'****'

TIME_ZONE

'UTC'

FILE_UPLOAD_MAX_MEMORY_SIZE

2621440

EMAIL_BACKEND

'django.core.mail.backends.smtp.EmailBackend'

DEFAULT_TABLESPACE

''

TEMPLATE_CONTEXT_PROCESSORS

('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages')

SESSION_COOKIE_AGE

1209600

SETTINGS_MODULE

'share_stuff.settings'

USE_ETAGS

False

LANGUAGES_BIDI

('he', 'ar', 'fa', 'ur')

FILE_UPLOAD_TEMP_DIR

None

INTERNAL_IPS

()

STATIC_URL

'/static/'

EMAIL_PORT

25

USE_TZ

True

SHORT_DATETIME_FORMAT

'm/d/Y P'

PASSWORD_HASHERS

u'****'

ABSOLUTE_URL_OVERRIDES

{}

CACHE_MIDDLEWARE_SECONDS

600

CSRF_COOKIE_HTTPONLY

False

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')

EMAIL_HOST_USER

''

PROFANITIES_LIST

u'****'

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.

— Reply to this email directly or view it on GitHub https://github.com/Pat-Martinez/share_stuff/issues/2.

— Reply to this email directly or view it on GitHub https://github.com/Pat-Martinez/share_stuff/issues/2#issuecomment-54725155 .

Pat-Martinez commented 10 years ago

Hmm, don't see your pull request. Actually that's a good thing, because I got a chance to fix it...well partially fix it. Details below.

The change I made to views.py is in Red.

Example: User Sean1 is already a moderator of another group. When Sean is logged in and adds a group it works. However if Zeus1 (who is a member of a group but not a moderator of any groups) tries to create a group I get an error, which makes sense because he doesn't exist in the database as a moderator. I tried to use Moderator.objects.get_or_create(member=request.user.member) but that doesn't work for Sean1 or Zeus1. Any suggestions?

Also, want to do some coding tomorrow at the Lucky Lab?

def add_group(request): group_added = False

if request.method == "POST":
    print request.POST
    group_form = GroupForm(data=request.POST)

    if group_form.is_valid():
        # (commit= False) doesn't save data to database
        group = group_form.save(commit=False)
        group.moderator =

Moderator.objects.get(member=request.user.member)

        if 'group_picture' in request.FILES:
            group.photo = request.FILES['group_picture']

        group.save() # saves form data to database.
        group_added = True

    else:
        print group_form.errors

else:
    group_form = GroupForm()

return render(request, 'sharing/add_group.html', {'group_form':

group_form, 'group_added': group_added})

On Sat, Sep 6, 2014 at 1:09 PM, Ben Kulp notifications@github.com wrote:

Pretty sure I sent a pull request with a possible fix. :) On Sep 6, 2014 12:13 PM, "Pat Martinez" notifications@github.com wrote:

Dear bug catcher,

Thanks! I'll look into this.

Pat

On Mon, Sep 1, 2014 at 7:22 PM, Ben Kulp notifications@github.com wrote:

when attempting to create a group, I get an error saying that the logged in member must be a moderator.

Django Error report below:

ValueError at /sharing/add_group/

Cannot assign "": "Group.moderator" must be a "Moderator" instance.

Request Method: POST Request URL: http://127.0.0.1:8000/sharing/add_group/ Django Version: 1.6.6 Exception Type: ValueError Exception Value:

Cannot assign "": "Group.moderator" must be a "Moderator" instance.

Exception Location:

C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\db\models\fields\related.py

in set, line 339 Python Executable: C:\Users\Lauren.virtualenvs\share\Scripts\python.exe Python Version: 2.7.6 Python Path:

['C:\projects\share_stuff', 'C:\Windows\system32\python27.zip', 'C:\Python27\lib\site-packages\Orange\orng', 'C:\Users\Lauren.virtualenvs\share\DLLs', 'C:\Users\Lauren.virtualenvs\share\lib', 'C:\Users\Lauren.virtualenvs\share\lib\plat-win', 'C:\Users\Lauren.virtualenvs\share\lib\lib-tk', 'C:\Users\Lauren.virtualenvs\share\Scripts', 'c:\Python27\Lib', 'c:\Python27\DLLs', 'c:\Python27\Lib\lib-tk', 'C:\Users\Lauren.virtualenvs\share', 'C:\Users\Lauren.virtualenvs\share\lib\site-packages']

Server time: Mon, 1 Sep 2014 19:15:38 -0700 Traceback Switch to copy-and-paste view

C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\core\handlers\base.py

in get_response

response = wrapped_callback(request, _callback_args, *_callback_kwargs)

... ▶ Local vars

C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\contrib\auth\decorators.py

in _wrapped_view

return view_func(request, _args, *_kwargs)

... ▶ Local vars C:\projects\share_stuff\sharing\views.py in add_group

group.moderator = request.user.member

... ▶ Local vars

C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\db\models\fields\related.py

in set

self.field.name, self.field.rel.to._meta.object_name))

... ▶ Local vars

Request information GET

No GET data POST Variable Value csrfmiddlewaretoken

u'XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf'

name

u'Groupy'

submit

u'Create Group'

description

u'this is a group for people who like devo.'

FILES Variable Value group_picture

COOKIES Variable Value csrftoken

'XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf'

sessionid

'264ds3kfwowq8qeg1xd2ima7yw5m4fey'

META Variable Value TMP

'C:\Users\Lauren\AppData\Local\Temp'

COMPUTERNAME

'LAUREN-PC'

wsgi.multiprocess

False

RUN_MAIN

'true'

HTTP_REFERER

'http://127.0.0.1:8000/sharing/add_group/'

USERDOMAIN

'Lauren-PC'

wsgi.multithread

True

SERVER_PROTOCOL

'HTTP/1.1'

SERVER_SOFTWARE

'WSGIServer/0.1 Python/2.7.6'

PSMODULEPATH

'C:\Users\Lauren\Documents\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\'

SCRIPT_NAME

u''

COMMONPROGRAMFILES

'C:\Program Files (x86)\Common Files'

QUERY_STRING

''

PROCESSOR_IDENTIFIER

'Intel64 Family 6 Model 23 Stepping 10, GenuineIntel'

REQUEST_METHOD

'POST'

VBOX_MSI_INSTALL_PATH

'C:\Program Files\Oracle\VirtualBox\'

PROGRAMFILES

'C:\Program Files (x86)'

PROCESSOR_REVISION

'170a'

PATH

'C:\Users\Lauren.virtualenvs\share/Scripts;%SystemRoot%\system32\WindowsPowerShell\v1.0\;C:\Users\Lauren.virtualenvs\gui\Lib\site-packages\PyQt4;C:\Python27\Lib\site-packages\PyQt4\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program

Files\Dell\Dell Wireless WLAN Card;c:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\QuickTime\QTSystem\;c:\Python27\scripts\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\MySQL\MySQL Utilities 1.3.6\;C:\Program Files\MySQL\MySQL Server 5.6\bin;C:\HashiCorp\Vagrant\bin;C:\Program Files (x86)\Heroku\bin;C:\Program Files

(x86)\git\cmd;C:\RailsInstaller\Ruby1.9.3\bin;C:\Windows\system32\WindowsPowerShell\v1.0\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program

Files\Dell\Dell Wireless WLAN Card;c:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files

(x86)\QuickTime\QTSystem\;C:\Python27;C:\Users\Lauren\AppData\Roaming\npm'

QTJAVA

'C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip'

SYSTEMROOT

'C:\Windows'

PROGRAMFILES(X86)

'C:\Program Files (x86)'

CONTENT_LENGTH

'247637'

VIRTUAL_ENV

'C:\Users\Lauren.virtualenvs\share'

HTTP_USER_AGENT

'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0'

HTTP_CONNECTION

'keep-alive'

HTTP_COOKIE

'csrftoken=XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf; sessionid=264ds3kfwowq8qeg1xd2ima7yw5m4fey'

TEMP

'C:\Users\Lauren\AppData\Local\Temp'

REMOTE_ADDR

'127.0.0.1'

COMMONPROGRAMFILES(X86)

'C:\Program Files (x86)\Common Files'

PROCESSOR_ARCHITECTURE

'x86'

wsgi.url_scheme

'http'

ALLUSERSPROFILE

'C:\ProgramData'

SERVER_PORT

'8000'

LOCALAPPDATA

'C:\Users\Lauren\AppData\Local'

HOMEPATH

'\Users\Lauren'

PROCESSOR_LEVEL

'6'

PROGRAMW6432

'C:\Program Files'

USERNAME

'Lauren'

WORKON_HOME

'C:\Users\Lauren/.virtualenvs'

LOGONSERVER

'\LAUREN-PC'

COMSPEC

'C:\Windows\system32\cmd.exe'

PROGRAMDATA

'C:\ProgramData'

HTTP_ACCEPT

'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8'

PATH_INFO

u'/sharing/add_group/'

CLASSPATH

'.;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip'

CSRF_COOKIE

u'XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf'

wsgi.input

wsgi.errors

', mode 'w' at 0x020260D0>

HTTP_HOST

'127.0.0.1:8000'

SESSIONNAME

'Console'

PATHEXT

'.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'

ASL.LOG

'Destination=file'

FP_NO_HOST_CHECK

'NO'

WINDIR

'C:\Windows'

wsgi.file_wrapper

''

HTTP_ACCEPT_ENCODING

'gzip, deflate'

wsgi.version

(1, 0)

HOMEDRIVE

'C:'

APPDATA

'C:\Users\Lauren\AppData\Roaming'

SERVER_NAME

'Lauren-PC'

wsgi.run_once

False

REMOTE_HOST

''

SYSTEMDRIVE

'C:'

GATEWAY_INTERFACE

'CGI/1.1'

HTTP_ACCEPT_LANGUAGE

'en-US,en;q=0.5'

NUMBER_OF_PROCESSORS

'2'

HEROKUPATH

'C:\Program Files (x86)\Heroku'

DJANGO_SETTINGS_MODULE

'share_stuff.settings'

CONTENT_TYPE

'multipart/form-data; boundary=---------------------------27458734210002'

PROCESSOR_ARCHITEW6432

'AMD64'

COMMONPROGRAMW6432

'C:\Program Files\Common Files'

OS

'Windows_NT'

PUBLIC

'C:\Users\Public'

USERPROFILE

'C:\Users\Lauren'

Settings Using settings module share_stuff.settings Setting Value USE_L10N

True

USE_THOUSAND_SEPARATOR

False

CSRF_COOKIE_SECURE

False

LANGUAGE_CODE

'en-us'

ROOT_URLCONF

'share_stuff.urls'

MANAGERS

()

BASE_DIR

'C:\projects\share_stuff'

DEFAULT_CHARSET

'utf-8'

SESSION_SERIALIZER

'django.contrib.sessions.serializers.JSONSerializer'

STATIC_ROOT

None

ALLOWED_HOSTS

[]

MESSAGE_STORAGE

'django.contrib.messages.storage.fallback.FallbackStorage'

EMAIL_SUBJECT_PREFIX

'[Django] '

FILE_UPLOAD_PERMISSIONS

None

STATICFILES_FINDERS

('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder')

SESSION_CACHE_ALIAS

'default'

SESSION_COOKIE_DOMAIN

None

SESSION_COOKIE_NAME

'sessionid'

ADMIN_FOR

()

TIME_INPUT_FORMATS

('%H:%M:%S', '%H:%M:%S.%f', '%H:%M')

DATABASES

{'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.sqlite3', 'HOST': '', 'NAME': 'C:\projects\share_stuff\sharing.db', 'OPTIONS': {}, 'PASSWORD': u'****', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'UTC', 'USER': ''}}

SERVER_EMAIL

'root@localhost'

FILE_UPLOAD_HANDLERS

('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler')

DEFAULT_CONTENT_TYPE

'text/html'

APPEND_SLASH

True

LOCALE_PATHS

()

DATABASE_ROUTERS

[]

YEAR_MONTH_FORMAT

'F Y'

STATICFILES_STORAGE

'django.contrib.staticfiles.storage.StaticFilesStorage'

CACHES

{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}

SESSION_COOKIE_PATH

'/'

MIDDLEWARE_CLASSES

('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')

USE_I18N

True

THOUSAND_SEPARATOR

','

SECRET_KEY

u'****'

LANGUAGE_COOKIE_NAME

'django_language'

DEFAULT_INDEX_TABLESPACE

''

TRANSACTIONS_MANAGED

False

LOGGING_CONFIG

'django.utils.log.dictConfig'

SEND_BROKEN_LINK_EMAILS

False

TEMPLATE_LOADERS

('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader')

FIRST_DAY_OF_WEEK

0

WSGI_APPLICATION

'share_stuff.wsgi.application'

TEMPLATE_DEBUG

True

X_FRAME_OPTIONS

'SAMEORIGIN'

CSRF_COOKIE_NAME

'csrftoken'

FORCE_SCRIPT_NAME

None

USE_X_FORWARDED_HOST

False

SETTINGS_DIR

'C:\projects\share_stuff\share_stuff'

SIGNING_BACKEND

'django.core.signing.TimestampSigner'

SESSION_COOKIE_SECURE

False

CSRF_COOKIE_DOMAIN

None

FILE_CHARSET

'utf-8'

DEBUG

True

SESSION_FILE_PATH

None

DEFAULT_FILE_STORAGE

'django.core.files.storage.FileSystemStorage'

INSTALLED_APPS

('django.contrib.admin', 'django.contrib.admindocs', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'sharing')

LANGUAGES

(('af', 'Afrikaans'), ('ar', 'Arabic'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy-nl', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmal'), ('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'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese'))

COMMENTS_ALLOW_PROFANITIES

False

STATICFILES_DIRS

()

PREPEND_WWW

False

SECURE_PROXY_SSL_HEADER

None

SESSION_COOKIE_HTTPONLY

True

DEBUG_PROPAGATE_EXCEPTIONS

False

MONTH_DAY_FORMAT

'F j'

LOGIN_URL

'/sharing/sign_in/'

SESSION_EXPIRE_AT_BROWSER_CLOSE

False

TIME_FORMAT

'P'

AUTH_USER_MODEL

'auth.User'

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')

AUTHENTICATION_BACKENDS

('django.contrib.auth.backends.ModelBackend',)

EMAIL_HOST_PASSWORD

u'****'

TEMPLATE_PATH

'C:\projects\share_stuff\templates'

PASSWORD_RESET_TIMEOUT_DAYS

u'****'

CACHE_MIDDLEWARE_ALIAS

'default'

SESSION_SAVE_EVERY_REQUEST

False

NUMBER_GROUPING

0

SESSION_ENGINE

'django.contrib.sessions.backends.db'

CSRF_FAILURE_VIEW

'django.views.csrf.csrf_failure'

CSRF_COOKIE_PATH

'/'

LOGIN_REDIRECT_URL

'/accounts/profile/'

DECIMAL_SEPARATOR

'.'

IGNORABLE_404_URLS

()

PROJECT_PATH

'C:\projects\share_stuff'

TEMPLATE_STRING_IF_INVALID

''

LOGOUT_URL

'/accounts/logout/'

EMAIL_USE_TLS

False

FIXTURE_DIRS

()

EMAIL_HOST

'localhost'

DATE_FORMAT

'N j, Y'

MEDIA_ROOT

'C:\projects\share_stuff\media'

DEFAULT_EXCEPTION_REPORTER_FILTER

'django.views.debug.SafeExceptionReporterFilter'

ADMINS

()

FORMAT_MODULE_PATH

None

DEFAULT_FROM_EMAIL

'webmaster@localhost'

MEDIA_URL

'/media/'

DATETIME_FORMAT

'N j, Y, P'

TEMPLATE_DIRS

('C:\projects\share_stuff\templates',)

DISALLOWED_USER_AGENTS

()

ALLOWED_INCLUDE_ROOTS

()

LOGGING

{}

SHORT_DATE_FORMAT

'm/d/Y'

TEST_RUNNER

'django.test.runner.DiscoverRunner'

CACHE_MIDDLEWARE_KEY_PREFIX

u'****'

TIME_ZONE

'UTC'

FILE_UPLOAD_MAX_MEMORY_SIZE

2621440

EMAIL_BACKEND

'django.core.mail.backends.smtp.EmailBackend'

DEFAULT_TABLESPACE

''

TEMPLATE_CONTEXT_PROCESSORS

('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages')

SESSION_COOKIE_AGE

1209600

SETTINGS_MODULE

'share_stuff.settings'

USE_ETAGS

False

LANGUAGES_BIDI

('he', 'ar', 'fa', 'ur')

FILE_UPLOAD_TEMP_DIR

None

INTERNAL_IPS

()

STATIC_URL

'/static/'

EMAIL_PORT

25

USE_TZ

True

SHORT_DATETIME_FORMAT

'm/d/Y P'

PASSWORD_HASHERS

u'****'

ABSOLUTE_URL_OVERRIDES

{}

CACHE_MIDDLEWARE_SECONDS

600

CSRF_COOKIE_HTTPONLY

False

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')

EMAIL_HOST_USER

''

PROFANITIES_LIST

u'****'

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.

— Reply to this email directly or view it on GitHub https://github.com/Pat-Martinez/share_stuff/issues/2.

— Reply to this email directly or view it on GitHub < https://github.com/Pat-Martinez/share_stuff/issues/2#issuecomment-54725155>

.

— Reply to this email directly or view it on GitHub https://github.com/Pat-Martinez/share_stuff/issues/2#issuecomment-54726771 .

Pat-Martinez commented 10 years ago

Fists pumped in the air! I needed to get rid of the Boolean that's part of the tuple that is created by objects.get_or_create()

This fixes everything:

group.moderator = Moderator.objects.get_or_create(member=request.user.member)[0]

On Sun, Sep 7, 2014 at 12:38 PM, Pat Martinez PatMartinezMtn@gmail.com wrote:

Hmm, don't see your pull request. Actually that's a good thing, because I got a chance to fix it...well partially fix it. Details below.

The change I made to views.py is in Red.

Example: User Sean1 is already a moderator of another group. When Sean is logged in and adds a group it works. However if Zeus1 (who is a member of a group but not a moderator of any groups) tries to create a group I get an error, which makes sense because he doesn't exist in the database as a moderator. I tried to use Moderator.objects.get_or_create(member=request.user.member) but that doesn't work for Sean1 or Zeus1. Any suggestions?

Also, want to do some coding tomorrow at the Lucky Lab?

def add_group(request): group_added = False

if request.method == "POST":
    print request.POST
    group_form = GroupForm(data=request.POST)

    if group_form.is_valid():
        # (commit= False) doesn't save data to database
        group = group_form.save(commit=False)
        group.moderator =

Moderator.objects.get(member=request.user.member)

        if 'group_picture' in request.FILES:
            group.photo = request.FILES['group_picture']

        group.save() # saves form data to database.
        group_added = True

    else:
        print group_form.errors

else:
    group_form = GroupForm()

return render(request, 'sharing/add_group.html', {'group_form':

group_form, 'group_added': group_added})

On Sat, Sep 6, 2014 at 1:09 PM, Ben Kulp notifications@github.com wrote:

Pretty sure I sent a pull request with a possible fix. :) On Sep 6, 2014 12:13 PM, "Pat Martinez" notifications@github.com wrote:

Dear bug catcher,

Thanks! I'll look into this.

Pat

On Mon, Sep 1, 2014 at 7:22 PM, Ben Kulp notifications@github.com wrote:

when attempting to create a group, I get an error saying that the logged in member must be a moderator.

Django Error report below:

ValueError at /sharing/add_group/

Cannot assign "": "Group.moderator" must be a "Moderator" instance.

Request Method: POST Request URL: http://127.0.0.1:8000/sharing/add_group/ Django Version: 1.6.6 Exception Type: ValueError Exception Value:

Cannot assign "": "Group.moderator" must be a "Moderator" instance.

Exception Location:

C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\db\models\fields\related.py

in set, line 339 Python Executable: C:\Users\Lauren.virtualenvs\share\Scripts\python.exe Python Version: 2.7.6 Python Path:

['C:\projects\share_stuff', 'C:\Windows\system32\python27.zip', 'C:\Python27\lib\site-packages\Orange\orng', 'C:\Users\Lauren.virtualenvs\share\DLLs', 'C:\Users\Lauren.virtualenvs\share\lib', 'C:\Users\Lauren.virtualenvs\share\lib\plat-win', 'C:\Users\Lauren.virtualenvs\share\lib\lib-tk', 'C:\Users\Lauren.virtualenvs\share\Scripts', 'c:\Python27\Lib', 'c:\Python27\DLLs', 'c:\Python27\Lib\lib-tk', 'C:\Users\Lauren.virtualenvs\share', 'C:\Users\Lauren.virtualenvs\share\lib\site-packages']

Server time: Mon, 1 Sep 2014 19:15:38 -0700 Traceback Switch to copy-and-paste view

C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\core\handlers\base.py

in get_response

response = wrapped_callback(request, _callback_args, *_callback_kwargs)

... ▶ Local vars

C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\contrib\auth\decorators.py

in _wrapped_view

return view_func(request, _args, *_kwargs)

... ▶ Local vars C:\projects\share_stuff\sharing\views.py in add_group

group.moderator = request.user.member

... ▶ Local vars

C:\Users\Lauren.virtualenvs\share\lib\site-packages\django\db\models\fields\related.py

in set

self.field.name, self.field.rel.to._meta.object_name))

... ▶ Local vars

Request information GET

No GET data POST Variable Value csrfmiddlewaretoken

u'XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf'

name

u'Groupy'

submit

u'Create Group'

description

u'this is a group for people who like devo.'

FILES Variable Value group_picture

COOKIES Variable Value csrftoken

'XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf'

sessionid

'264ds3kfwowq8qeg1xd2ima7yw5m4fey'

META Variable Value TMP

'C:\Users\Lauren\AppData\Local\Temp'

COMPUTERNAME

'LAUREN-PC'

wsgi.multiprocess

False

RUN_MAIN

'true'

HTTP_REFERER

'http://127.0.0.1:8000/sharing/add_group/'

USERDOMAIN

'Lauren-PC'

wsgi.multithread

True

SERVER_PROTOCOL

'HTTP/1.1'

SERVER_SOFTWARE

'WSGIServer/0.1 Python/2.7.6'

PSMODULEPATH

'C:\Users\Lauren\Documents\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\'

SCRIPT_NAME

u''

COMMONPROGRAMFILES

'C:\Program Files (x86)\Common Files'

QUERY_STRING

''

PROCESSOR_IDENTIFIER

'Intel64 Family 6 Model 23 Stepping 10, GenuineIntel'

REQUEST_METHOD

'POST'

VBOX_MSI_INSTALL_PATH

'C:\Program Files\Oracle\VirtualBox\'

PROGRAMFILES

'C:\Program Files (x86)'

PROCESSOR_REVISION

'170a'

PATH

'C:\Users\Lauren.virtualenvs\share/Scripts;%SystemRoot%\system32\WindowsPowerShell\v1.0\;C:\Users\Lauren.virtualenvs\gui\Lib\site-packages\PyQt4;C:\Python27\Lib\site-packages\PyQt4\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program

Files\Dell\Dell Wireless WLAN Card;c:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\QuickTime\QTSystem\;c:\Python27\scripts\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\MySQL\MySQL Utilities 1.3.6\;C:\Program Files\MySQL\MySQL Server 5.6\bin;C:\HashiCorp\Vagrant\bin;C:\Program Files (x86)\Heroku\bin;C:\Program Files

(x86)\git\cmd;C:\RailsInstaller\Ruby1.9.3\bin;C:\Windows\system32\WindowsPowerShell\v1.0\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program

Files\Dell\Dell Wireless WLAN Card;c:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files

(x86)\QuickTime\QTSystem\;C:\Python27;C:\Users\Lauren\AppData\Roaming\npm'

QTJAVA

'C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip'

SYSTEMROOT

'C:\Windows'

PROGRAMFILES(X86)

'C:\Program Files (x86)'

CONTENT_LENGTH

'247637'

VIRTUAL_ENV

'C:\Users\Lauren.virtualenvs\share'

HTTP_USER_AGENT

'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0'

HTTP_CONNECTION

'keep-alive'

HTTP_COOKIE

'csrftoken=XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf; sessionid=264ds3kfwowq8qeg1xd2ima7yw5m4fey'

TEMP

'C:\Users\Lauren\AppData\Local\Temp'

REMOTE_ADDR

'127.0.0.1'

COMMONPROGRAMFILES(X86)

'C:\Program Files (x86)\Common Files'

PROCESSOR_ARCHITECTURE

'x86'

wsgi.url_scheme

'http'

ALLUSERSPROFILE

'C:\ProgramData'

SERVER_PORT

'8000'

LOCALAPPDATA

'C:\Users\Lauren\AppData\Local'

HOMEPATH

'\Users\Lauren'

PROCESSOR_LEVEL

'6'

PROGRAMW6432

'C:\Program Files'

USERNAME

'Lauren'

WORKON_HOME

'C:\Users\Lauren/.virtualenvs'

LOGONSERVER

'\LAUREN-PC'

COMSPEC

'C:\Windows\system32\cmd.exe'

PROGRAMDATA

'C:\ProgramData'

HTTP_ACCEPT

'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8'

PATH_INFO

u'/sharing/add_group/'

CLASSPATH

'.;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip'

CSRF_COOKIE

u'XVjUrmA9tPDdCvLnir6OBhrrfHoNHdKf'

wsgi.input

wsgi.errors

', mode 'w' at 0x020260D0>

HTTP_HOST

'127.0.0.1:8000'

SESSIONNAME

'Console'

PATHEXT

'.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'

ASL.LOG

'Destination=file'

FP_NO_HOST_CHECK

'NO'

WINDIR

'C:\Windows'

wsgi.file_wrapper

''

HTTP_ACCEPT_ENCODING

'gzip, deflate'

wsgi.version

(1, 0)

HOMEDRIVE

'C:'

APPDATA

'C:\Users\Lauren\AppData\Roaming'

SERVER_NAME

'Lauren-PC'

wsgi.run_once

False

REMOTE_HOST

''

SYSTEMDRIVE

'C:'

GATEWAY_INTERFACE

'CGI/1.1'

HTTP_ACCEPT_LANGUAGE

'en-US,en;q=0.5'

NUMBER_OF_PROCESSORS

'2'

HEROKUPATH

'C:\Program Files (x86)\Heroku'

DJANGO_SETTINGS_MODULE

'share_stuff.settings'

CONTENT_TYPE

'multipart/form-data; boundary=---------------------------27458734210002'

PROCESSOR_ARCHITEW6432

'AMD64'

COMMONPROGRAMW6432

'C:\Program Files\Common Files'

OS

'Windows_NT'

PUBLIC

'C:\Users\Public'

USERPROFILE

'C:\Users\Lauren'

Settings Using settings module share_stuff.settings Setting Value USE_L10N

True

USE_THOUSAND_SEPARATOR

False

CSRF_COOKIE_SECURE

False

LANGUAGE_CODE

'en-us'

ROOT_URLCONF

'share_stuff.urls'

MANAGERS

()

BASE_DIR

'C:\projects\share_stuff'

DEFAULT_CHARSET

'utf-8'

SESSION_SERIALIZER

'django.contrib.sessions.serializers.JSONSerializer'

STATIC_ROOT

None

ALLOWED_HOSTS

[]

MESSAGE_STORAGE

'django.contrib.messages.storage.fallback.FallbackStorage'

EMAIL_SUBJECT_PREFIX

'[Django] '

FILE_UPLOAD_PERMISSIONS

None

STATICFILES_FINDERS

('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder')

SESSION_CACHE_ALIAS

'default'

SESSION_COOKIE_DOMAIN

None

SESSION_COOKIE_NAME

'sessionid'

ADMIN_FOR

()

TIME_INPUT_FORMATS

('%H:%M:%S', '%H:%M:%S.%f', '%H:%M')

DATABASES

{'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.sqlite3', 'HOST': '', 'NAME': 'C:\projects\share_stuff\sharing.db', 'OPTIONS': {}, 'PASSWORD': u'****', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'UTC', 'USER': ''}}

SERVER_EMAIL

'root@localhost'

FILE_UPLOAD_HANDLERS

('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler')

DEFAULT_CONTENT_TYPE

'text/html'

APPEND_SLASH

True

LOCALE_PATHS

()

DATABASE_ROUTERS

[]

YEAR_MONTH_FORMAT

'F Y'

STATICFILES_STORAGE

'django.contrib.staticfiles.storage.StaticFilesStorage'

CACHES

{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}

SESSION_COOKIE_PATH

'/'

MIDDLEWARE_CLASSES

('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')

USE_I18N

True

THOUSAND_SEPARATOR

','

SECRET_KEY

u'****'

LANGUAGE_COOKIE_NAME

'django_language'

DEFAULT_INDEX_TABLESPACE

''

TRANSACTIONS_MANAGED

False

LOGGING_CONFIG

'django.utils.log.dictConfig'

SEND_BROKEN_LINK_EMAILS

False

TEMPLATE_LOADERS

('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader')

FIRST_DAY_OF_WEEK

0

WSGI_APPLICATION

'share_stuff.wsgi.application'

TEMPLATE_DEBUG

True

X_FRAME_OPTIONS

'SAMEORIGIN'

CSRF_COOKIE_NAME

'csrftoken'

FORCE_SCRIPT_NAME

None

USE_X_FORWARDED_HOST

False

SETTINGS_DIR

'C:\projects\share_stuff\share_stuff'

SIGNING_BACKEND

'django.core.signing.TimestampSigner'

SESSION_COOKIE_SECURE

False

CSRF_COOKIE_DOMAIN

None

FILE_CHARSET

'utf-8'

DEBUG

True

SESSION_FILE_PATH

None

DEFAULT_FILE_STORAGE

'django.core.files.storage.FileSystemStorage'

INSTALLED_APPS

('django.contrib.admin', 'django.contrib.admindocs', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'sharing')

LANGUAGES

(('af', 'Afrikaans'), ('ar', 'Arabic'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy-nl', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmal'), ('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'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese'))

COMMENTS_ALLOW_PROFANITIES

False

STATICFILES_DIRS

()

PREPEND_WWW

False

SECURE_PROXY_SSL_HEADER

None

SESSION_COOKIE_HTTPONLY

True

DEBUG_PROPAGATE_EXCEPTIONS

False

MONTH_DAY_FORMAT

'F j'

LOGIN_URL

'/sharing/sign_in/'

SESSION_EXPIRE_AT_BROWSER_CLOSE

False

TIME_FORMAT

'P'

AUTH_USER_MODEL

'auth.User'

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')

AUTHENTICATION_BACKENDS

('django.contrib.auth.backends.ModelBackend',)

EMAIL_HOST_PASSWORD

u'****'

TEMPLATE_PATH

'C:\projects\share_stuff\templates'

PASSWORD_RESET_TIMEOUT_DAYS

u'****'

CACHE_MIDDLEWARE_ALIAS

'default'

SESSION_SAVE_EVERY_REQUEST

False

NUMBER_GROUPING

0

SESSION_ENGINE

'django.contrib.sessions.backends.db'

CSRF_FAILURE_VIEW

'django.views.csrf.csrf_failure'

CSRF_COOKIE_PATH

'/'

LOGIN_REDIRECT_URL

'/accounts/profile/'

DECIMAL_SEPARATOR

'.'

IGNORABLE_404_URLS

()

PROJECT_PATH

'C:\projects\share_stuff'

TEMPLATE_STRING_IF_INVALID

''

LOGOUT_URL

'/accounts/logout/'

EMAIL_USE_TLS

False

FIXTURE_DIRS

()

EMAIL_HOST

'localhost'

DATE_FORMAT

'N j, Y'

MEDIA_ROOT

'C:\projects\share_stuff\media'

DEFAULT_EXCEPTION_REPORTER_FILTER

'django.views.debug.SafeExceptionReporterFilter'

ADMINS

()

FORMAT_MODULE_PATH

None

DEFAULT_FROM_EMAIL

'webmaster@localhost'

MEDIA_URL

'/media/'

DATETIME_FORMAT

'N j, Y, P'

TEMPLATE_DIRS

('C:\projects\share_stuff\templates',)

DISALLOWED_USER_AGENTS

()

ALLOWED_INCLUDE_ROOTS

()

LOGGING

{}

SHORT_DATE_FORMAT

'm/d/Y'

TEST_RUNNER

'django.test.runner.DiscoverRunner'

CACHE_MIDDLEWARE_KEY_PREFIX

u'****'

TIME_ZONE

'UTC'

FILE_UPLOAD_MAX_MEMORY_SIZE

2621440

EMAIL_BACKEND

'django.core.mail.backends.smtp.EmailBackend'

DEFAULT_TABLESPACE

''

TEMPLATE_CONTEXT_PROCESSORS

('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages')

SESSION_COOKIE_AGE

1209600

SETTINGS_MODULE

'share_stuff.settings'

USE_ETAGS

False

LANGUAGES_BIDI

('he', 'ar', 'fa', 'ur')

FILE_UPLOAD_TEMP_DIR

None

INTERNAL_IPS

()

STATIC_URL

'/static/'

EMAIL_PORT

25

USE_TZ

True

SHORT_DATETIME_FORMAT

'm/d/Y P'

PASSWORD_HASHERS

u'****'

ABSOLUTE_URL_OVERRIDES

{}

CACHE_MIDDLEWARE_SECONDS

600

CSRF_COOKIE_HTTPONLY

False

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')

EMAIL_HOST_USER

''

PROFANITIES_LIST

u'****'

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.

— Reply to this email directly or view it on GitHub https://github.com/Pat-Martinez/share_stuff/issues/2.

— Reply to this email directly or view it on GitHub < https://github.com/Pat-Martinez/share_stuff/issues/2#issuecomment-54725155>

.

— Reply to this email directly or view it on GitHub https://github.com/Pat-Martinez/share_stuff/issues/2#issuecomment-54726771 .