Closed burlexpo closed 8 years ago
Ugh.
Um... this is really not at all a supported use case. The way the Act gets put together, the admin is just not a good tool for this. There's several components that get built when you use the correct form. We never, ever, ever designed /admin to do what you are trying to do.
As an alternative - I suggest this:
NOTE: This will completely screw with ticketing. Chances are good that an act this way will block the performer from future ticket submissions, to fix that you need to grant the performer's email a free act submission ticket. Not sure if that's something you can do with BPT...?
I'm moving this out of bug. This is actually the Admin working the way it basically works. The annoying error message is worth reviewing... but I can't bug fix this.
If you want a way for a site owner to create acts for other people, that's a use case we should actually design, rather than hack on the fly.
Fair enough. Closing.
To save myself some time and hassle, I went to create a generic act for each of the returning winners using through http://burlesque-expo.com/admin/gbe/act/add
I entered an act name and description, indicated that it was submitted and selected, chose a performer from the dropdown list, indicated the conference year.
Hit "Save" and got a "Server Error (500)" at http://burlesque-expo.com/admin/gbe/act/add/?_changelist_filters=conference__id__exact%3D2
And then we started getting these emails from the site:
Begin Email Body
Traceback (most recent call last):
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/core/handlers/base.py", line 112, in get_response response = wrapped_callback(request, _callback_args, *_callback_kwargs)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/contrib/admin/options.py", line 465, in wrapper return self.admin_site.admin_view(view)(_args, *_kwargs)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/utils/decorators.py", line 99, in _wrapped_view response = view_func(request, _args, *_kwargs)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/views/decorators/cache.py", line 52, in _wrapped_view_func response = view_func(request, _args, *_kwargs)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/contrib/admin/sites.py", line 198, in inner return view(request, _args, *_kwargs)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/utils/decorators.py", line 29, in _wrapper return bound_func(_args, *_kwargs)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/utils/decorators.py", line 99, in _wrapped_view response = view_func(request, _args, *_kwargs)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/utils/decorators.py", line 25, in bound_func return func(self, _args2, *_kwargs2)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/db/transaction.py", line 371, in inner return func(_args, *_kwargs)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/contrib/admin/options.py", line 1164, in add_view self.save_model(request, new_object, form, False)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/contrib/admin/options.py", line 893, in save_model obj.save()
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/db/models/base.py", line 545, in save force_update=force_update, update_fields=update_fields)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/db/models/base.py", line 573, in save_base updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/db/models/base.py", line 654, in _save_table result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/db/models/base.py", line 687, in _do_insert using=using, raw=raw)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/db/models/manager.py", line 232, in _insert return insert_query(self.model, objs, fields, **kwargs)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/db/models/query.py", line 1514, in insert_query return query.get_compiler(using=using).execute_sql(return_id)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/db/models/sql/compiler.py", line 903, in execute_sql cursor.execute(sql, params)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/db/backends/util.py", line 53, in execute return self.cursor.execute(sql, params)
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/db/backends/mysql/base.py", line 129, in execute six.reraise(utils.IntegrityError, utils.IntegrityError(*tuple(e.args)), sys.exc_info()[2])
File "/home/gbelive/webapps/gbelive/lib/python2.7/django/db/backends/mysql/base.py", line 124, in execute return self.cursor.execute(query, args)
File "/usr/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute self.errorhandler(self, exc, value)
File "/usr/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue
IntegrityError: (1048, "Column 'tech_id' cannot be null")
<WSGIRequest path:/admin/gbe/act/add/, GET:<QueryDict: {u'_changelist_filters': [u'conferenceidexact=2']}>, POST:<QueryDict: {u'conference': [u'2'], u'performer': [u'231'], u'shows_preferences': [u''], u'description': [u''], u'title': [u'Sailor St. Clair - RR'], u'other_performance': [u''], u'video_choice': [u''], u'submitted': [u'on'], u'tech': [u''], u'why_you': [u''], u'video_link': [u''], u'csrfmiddlewaretoken': [u'tmEl783jsOmeZwyMl0V1fuHxyN80NdDF'], u'accepted': [u'3'], u'_addanother': [u'Save and add another'], u'initial-conference': [u'2']}>, COOKIES:{'csrftoken': 'tmEl783jsOmeZwyMl0V1fuHxyN80NdDF', 'django_language': 'en-us', 'sessionid': 'xxva8h8k5xbn2lpicyafhvlqze65o825'}, META:{'CONTENT_LENGTH': '1597', 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryRsu2SKMXOba1Z06v', u'CSRF_COOKIE': u'tmEl783jsOmeZwyMl0V1fuHxyN80NdDF', 'DOCUMENT_ROOT': '/usr/local/apache2/htdocs', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/_;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip, deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_CONNECTION': 'close', 'HTTP_COOKIE': 'django_language=en-us; sessionid=xxva8h8k5xbn2lpicyafhvlqze65o825; csrftoken=tmEl783jsOmeZwyMl0V1fuHxyN80NdDF', 'HTTP_FORWARDED_REQUEST_URI': '/admin/gbe/act/add/?_changelist_filters=conferenceidexact%3D2', 'HTTP_HOST': 'burlesque-expo.com', 'HTTP_HTTPS': 'off', 'HTTP_HTTP_X_FORWARDED_PROTO': 'http', 'HTTP_ORIGIN': 'http://burlesque-expo.com', 'HTTP_REFERER': 'http://burlesque-expo.com/admin/gbe/act/add/?_changelist_filters=conference__id__exact%3D2', 'HTTP_UPGRADE_INSECURE_REQUESTS': '1', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36', 'HTTP_X_FORWARDED_FOR': '73.16.153.57', 'HTTP_X_FORWARDED_HOST': 'burlesque-expo.com', 'HTTP_X_FORWARDED_PROTO': 'http', 'HTTP_X_FORWARDED_SERVER': 'burlesque-expo.com', 'HTTP_X_FORWARDED_SSL': 'off', 'PATH_INFO': u'/admin/gbe/act/add/', 'PATH_TRANSLATED': '/home/gbelive/webapps/gbelive/expo/expo/wsgi.py/admin/gbe/act/add/', 'QUERY_STRING': '_changelist_filters=conferenceidexact%3D2', 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '45903', 'REQUEST_METHOD': 'POST', 'REQUEST_URI': '/admin/gbe/act/add/?_changelist_filters=conferenceidexact%3D2', 'SCRIPT_FILENAME': '/home/gbelive/webapps/gbelive/expo/expo/wsgi.py', 'SCRIPT_NAME': u'', 'SERVER_ADDR': '127.0.0.1', 'SERVER_ADMIN': '[no address given]', 'SERVER_NAME': 'burlesque-expo.com', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.0', 'SERVER_SIGNATURE': '', 'SERVER_SOFTWARE': 'Apache/2.2.25 (Unix) mod_wsgi/3.5 Python/2.7.9', 'mod_wsgi.application_group': 'web489.webfaction.com|', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.enable_sendfile': '0', 'mod_wsgi.handler_script': '', 'mod_wsgi.input_chunked': '0', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '14983', 'mod_wsgi.process_group': 'gbelive', 'mod_wsgi.queue_start': '1451755513086506', 'mod_wsgi.request_handler': 'wsgi-script', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (3, 5), 'wsgi.errors': <mod_wsgi.Log object at 0x7fd967354670>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7fd966fb7f30>, 'wsgi.input': <mod_wsgi.Input object at 0x7fd967354a70>, 'wsgi.multiprocess': True, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>