ialbert/biostar-central — Issue #66: Deleting nested comments causes server error
Author: keithj
Created: 2011-12-16 18:57:10+00:00
State: open

I made some nested comments by replying to myself, then deleted then. Deleting leaf comments seemed okay, but when I deleted a parent, I got this error.

DoesNotExist at /destroy/post/2023/

Post matching query does not exist.

Request Method:	POST
Request URL:	http://test.biostars.org/destroy/post/2023/
Django Version:	1.3.1
Exception Type:	DoesNotExist
Exception Value:

Post matching query does not exist.

Exception Location:	/home/ialbert10/webapps/biostar_testing/lib/python2.7/django/db/models/query.py in get, line 349
Python Executable:	/usr/local/bin/python
Python Version:	2.7.1
Python Path:

['/home/ialbert10/webapps/biostar_testing',
'/home/ialbert10/webapps/biostar_testing/lib/python2.7',
'/usr/local/lib/python27.zip',
'/usr/local/lib/python2.7',
'/usr/local/lib/python2.7/plat-linux2',
'/usr/local/lib/python2.7/lib-tk',
'/usr/local/lib/python2.7/lib-old',
'/usr/local/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/site-packages',
'/usr/local/lib/python2.7/site-packages/PIL',
'/home/ialbert10/webapps/biostar_testing/biostar-central',
'/home/ialbert10/webapps/biostar_testing/biostar-central/conf',
'/home/ialbert10/webapps/biostar_testing/biostar-central/libs',
'/home/ialbert10/webapps/biostar_testing/biostar-central/libs/libraries.zip',
'/home/ialbert10/webapps/biostar_testing/biostar-central/libs',
'/home/ialbert10/webapps/biostar_testing/biostar-central/libs/libraries.zip']

Server time:	Fri, 16 Dec 2011 12:50:13 -0600
Traceback Switch back to interactive view

* /home/ialbert10/webapps/biostar_testing/lib/python2.7/django/core/handlers/base.py in get_response
104.

for middleware_method in self._view_middleware:

105.

response = middleware_method(request, callback, callback_args, callback_kwargs)

106.

if response:

107.

break

108.

109.

if response is None:

110.

try:

111.

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

...
112.

except Exception, e:

113.

# If the view raised an exception, run it through exception

114.

# middleware, and if the exception middleware returns a

115.

# response, use that. Otherwise, reraise the exception.

116.

for middleware_method in self._exception_middleware:

117.

response = middleware_method(request, e)

▶ Local vars
Variable	Value
exceptions

e

DoesNotExist('Post matching query does not exist.',)

callback_args

()

receivers

[(, None)]

middleware_method

>

self

settings

request

,
POST:,
COOKIES:{'csrftoken': 'e0d9af9d4bd76d1b1c5cd4cde062f190',
'sessionid': 'c8e2c205a6911dc78800842ce72a98e6'},
META:{'CONTENT_LENGTH': '0',
'CONTENT_TYPE': 'application/x-www-form-urlencoded; charset=UTF-8',
'CSRF_COOKIE': 'e0d9af9d4bd76d1b1c5cd4cde062f190',
'DOCUMENT_ROOT': '/usr/local/apache2/htdocs',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'application/json, text/javascript, */*; q=0.01',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
'HTTP_ACCEPT_LANGUAGE': 'en-gb,en;q=0.5',
'HTTP_CACHE_CONTROL': 'no-cache',
'HTTP_CONNECTION': 'close',
'HTTP_COOKIE': 'csrftoken=e0d9af9d4bd76d1b1c5cd4cde062f190; sessionid=c8e2c205a6911dc78800842ce72a98e6',
'HTTP_DNT': '1',
'HTTP_HOST': 'test.biostars.org',
'HTTP_PRAGMA': 'no-cache',
'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7; en-GB; rv:1.9.2.24) Gecko/20111103 Firefox/3.6.24',
'HTTP_X_CSRFTOKEN': 'e0d9af9d4bd76d1b1c5cd4cde062f190',
'HTTP_X_FORWARDED_FOR': '78.143.195.139',
'HTTP_X_FORWARDED_HOST': 'test.biostars.org',
'HTTP_X_FORWARDED_SERVER': 'test.biostars.org',
'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
'PATH_INFO': u'/destroy/post/2023/',
'PATH_TRANSLATED': '/home/ialbert10/webapps/biostar_testing/biostar-central/conf/biostar_test.wsgi/destroy/post/2023/',
'QUERY_STRING': '',
'REMOTE_ADDR': '127.0.0.1',
'REMOTE_PORT': '56440',
'REQUEST_METHOD': 'POST',
'REQUEST_URI': '/destroy/post/2023/',
'SCRIPT_FILENAME': '/home/ialbert10/webapps/biostar_testing/biostar-central/conf/biostar_test.wsgi',
'SCRIPT_NAME': u'',
'SERVER_ADDR': '127.0.0.1',
'SERVER_ADMIN': '[no address given]',
'SERVER_NAME': 'test.biostars.org',
'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.0',
'SERVER_SIGNATURE': '',
'SERVER_SOFTWARE': 'Apache/2.2.17 (Unix) mod_wsgi/3.3 Python/2.7.1',
'mod_wsgi.application_group': 'web192.webfaction.com|',
'mod_wsgi.callable_object': 'application',
'mod_wsgi.handler_script': '',
'mod_wsgi.input_chunked': '0',
'mod_wsgi.listener_host': '',
'mod_wsgi.listener_port': '46930',
'mod_wsgi.process_group': 'biostar_testing',
'mod_wsgi.request_handler': 'wsgi-script',
'mod_wsgi.script_reloading': '1',
'mod_wsgi.version': (3, 3),
'wsgi.errors': ,
'wsgi.file_wrapper': ,
'wsgi.input': ,
'wsgi.multiprocess': True,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 1)}>

callback

resolver

urlresolvers

callback_kwargs

{'pid': u'2023'}

response

None

urlconf

'main.urls'

* /home/ialbert10/webapps/biostar_testing/lib/python2.7/django/contrib/auth/decorators.py in _wrapped_view
16.

that takes the user object and returns True if the user passes.

17.

"""

18.

19.

def decorator(view_func):

20.

@wraps(view_func, assigned=available_attrs(view_func))

21.

def _wrapped_view(request, *args, **kwargs):

22.

if test_func(request.user):

23.

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

...
24.

path = request.build_absolute_uri()

25.

# If the login url is the same scheme and net location then just

26.

# use the path as the "next" url.

27.

login_scheme, login_netloc = urlparse.urlparse(login_url or

28.

settings.LOGIN_URL)[:2]

29.

current_scheme, current_netloc = urlparse.urlparse(path)[:2]

▶ Local vars
Variable	Value
test_func

at 0x9396e2c>

login_url

None

args

()

request

,
POST:,
COOKIES:{'csrftoken': 'e0d9af9d4bd76d1b1c5cd4cde062f190',
'sessionid': 'c8e2c205a6911dc78800842ce72a98e6'},
META:{'CONTENT_LENGTH': '0',
'CONTENT_TYPE': 'application/x-www-form-urlencoded; charset=UTF-8',
'CSRF_COOKIE': 'e0d9af9d4bd76d1b1c5cd4cde062f190',
'DOCUMENT_ROOT': '/usr/local/apache2/htdocs',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'application/json, text/javascript, */*; q=0.01',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
'HTTP_ACCEPT_LANGUAGE': 'en-gb,en;q=0.5',
'HTTP_CACHE_CONTROL': 'no-cache',
'HTTP_CONNECTION': 'close',
'HTTP_COOKIE': 'csrftoken=e0d9af9d4bd76d1b1c5cd4cde062f190; sessionid=c8e2c205a6911dc78800842ce72a98e6',
'HTTP_DNT': '1',
'HTTP_HOST': 'test.biostars.org',
'HTTP_PRAGMA': 'no-cache',
'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7; en-GB; rv:1.9.2.24) Gecko/20111103 Firefox/3.6.24',
'HTTP_X_CSRFTOKEN': 'e0d9af9d4bd76d1b1c5cd4cde062f190',
'HTTP_X_FORWARDED_FOR': '78.143.195.139',
'HTTP_X_FORWARDED_HOST': 'test.biostars.org',
'HTTP_X_FORWARDED_SERVER': 'test.biostars.org',
'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
'PATH_INFO': u'/destroy/post/2023/',
'PATH_TRANSLATED': '/home/ialbert10/webapps/biostar_testing/biostar-central/conf/biostar_test.wsgi/destroy/post/2023/',
'QUERY_STRING': '',
'REMOTE_ADDR': '127.0.0.1',
'REMOTE_PORT': '56440',
'REQUEST_METHOD': 'POST',
'REQUEST_URI': '/destroy/post/2023/',
'SCRIPT_FILENAME': '/home/ialbert10/webapps/biostar_testing/biostar-central/conf/biostar_test.wsgi',
'SCRIPT_NAME': u'',
'SERVER_ADDR': '127.0.0.1',
'SERVER_ADMIN': '[no address given]',
'SERVER_NAME': 'test.biostars.org',
'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.0',
'SERVER_SIGNATURE': '',
'SERVER_SOFTWARE': 'Apache/2.2.17 (Unix) mod_wsgi/3.3 Python/2.7.1',
'mod_wsgi.application_group': 'web192.webfaction.com|',
'mod_wsgi.callable_object': 'application',
'mod_wsgi.handler_script': '',
'mod_wsgi.input_chunked': '0',
'mod_wsgi.listener_host': '',
'mod_wsgi.listener_port': '46930',
'mod_wsgi.process_group': 'biostar_testing',
'mod_wsgi.request_handler': 'wsgi-script',
'mod_wsgi.script_reloading': '1',
'mod_wsgi.version': (3, 3),
'wsgi.errors': ,
'wsgi.file_wrapper': ,
'wsgi.input': ,
'wsgi.multiprocess': True,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 1)}>

kwargs

{'pid': u'2023'}

redirect_field_name

'/openid/login/'

view_func

* /home/ialbert10/webapps/biostar_testing/biostar-central/main/server/action.py in destroy_post
137.

post = models.Post.objects.get(id=pid)

138.

139.

# for now only comments may be destroyed

140.

assert post.type == POST_COMMENT

141.

if not auth.authorize_post_edit(user=moderator, post=post, strict=False):

142.

return html.json_response({'status':'error', 'msg':'You do not have permission to delete this post.'})

143.

144.

post.delete()

...
145.

return html.json_response({'status':'success', 'msg':'post deleted'})

▶ Local vars
Variable	Value
moderator

request

,
POST:,
COOKIES:{'csrftoken': 'e0d9af9d4bd76d1b1c5cd4cde062f190',
'sessionid': 'c8e2c205a6911dc78800842ce72a98e6'},
META:{'CONTENT_LENGTH': '0',
'CONTENT_TYPE': 'application/x-www-form-urlencoded; charset=UTF-8',
'CSRF_COOKIE': 'e0d9af9d4bd76d1b1c5cd4cde062f190',
'DOCUMENT_ROOT': '/usr/local/apache2/htdocs',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'application/json, text/javascript, */*; q=0.01',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
'HTTP_ACCEPT_LANGUAGE': 'en-gb,en;q=0.5',
'HTTP_CACHE_CONTROL': 'no-cache',
'HTTP_CONNECTION': 'close',
'HTTP_COOKIE': 'csrftoken=e0d9af9d4bd76d1b1c5cd4cde062f190; sessionid=c8e2c205a6911dc78800842ce72a98e6',
'HTTP_DNT': '1',
'HTTP_HOST': 'test.biostars.org',
'HTTP_PRAGMA': 'no-cache',
'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7; en-GB; rv:1.9.2.24) Gecko/20111103 Firefox/3.6.24',
'HTTP_X_CSRFTOKEN': 'e0d9af9d4bd76d1b1c5cd4cde062f190',
'HTTP_X_FORWARDED_FOR': '78.143.195.139',
'HTTP_X_FORWARDED_HOST': 'test.biostars.org',
'HTTP_X_FORWARDED_SERVER': 'test.biostars.org',
'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
'PATH_INFO': u'/destroy/post/2023/',
'PATH_TRANSLATED': '/home/ialbert10/webapps/biostar_testing/biostar-central/conf/biostar_test.wsgi/destroy/post/2023/',
'QUERY_STRING': '',
'REMOTE_ADDR': '127.0.0.1',
'REMOTE_PORT': '56440',
'REQUEST_METHOD': 'POST',
'REQUEST_URI': '/destroy/post/2023/',
'SCRIPT_FILENAME': '/home/ialbert10/webapps/biostar_testing/biostar-central/conf/biostar_test.wsgi',
'SCRIPT_NAME': u'',
'SERVER_ADDR': '127.0.0.1',
'SERVER_ADMIN': '[no address given]',
'SERVER_NAME': 'test.biostars.org',
'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.0',
'SERVER_SIGNATURE': '',
'SERVER_SOFTWARE': 'Apache/2.2.17 (Unix) mod_wsgi/3.3 Python/2.7.1',
'mod_wsgi.application_group': 'web192.webfaction.com|',
'mod_wsgi.callable_object': 'application',
'mod_wsgi.handler_script': '',
'mod_wsgi.input_chunked': '0',
'mod_wsgi.listener_host': '',
'mod_wsgi.listener_port': '46930',
'mod_wsgi.process_group': 'biostar_testing',
'mod_wsgi.request_handler': 'wsgi-script',
'mod_wsgi.script_reloading': '1',
'mod_wsgi.version': (3, 3),
'wsgi.errors': ,
'wsgi.file_wrapper': ,
'wsgi.input': ,
'wsgi.multiprocess': True,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'http',
'wsgi.version': (1, 1)}>

post

pid

u'2023'

* /home/ialbert10/webapps/biostar_testing/lib/python2.7/django/db/models/base.py in delete
574.

575.

def delete(self, using=None):

576.

using = using or router.db_for_write(self.__class__, instance=self)

577.

assert self._get_pk_val() is not None, "%s object can't be deleted because its %s attribute is set to None." % (self._meta.object_name, self._meta.pk.attname)

578.

579.

collector = Collector(using=using)

580.

collector.collect([self])

581.

collector.delete()

...
582.

583.

delete.alters_data = True

584.

585.

def _get_FIELD_display(self, field):

586.

value = getattr(self, field.attname)

587.

return force_unicode(dict(field.flatchoices).get(value, value), strings_only=True)

▶ Local vars
Variable	Value
using

'default'

self

collector

* /home/ialbert10/webapps/biostar_testing/lib/python2.7/django/db/models/deletion.py in decorated
56.

def decorated(self, *args, **kwargs):

57.

if not transaction.is_managed(using=self.using):

58.

transaction.enter_transaction_management(using=self.using)

59.

forced_managed = True

60.

else:

61.

forced_managed = False

62.

try:

63.

func(self, *args, **kwargs)

...
64.

if forced_managed:

65.

transaction.commit(using=self.using)

66.

else:

67.

transaction.commit_unless_managed(using=self.using)

68.

finally:

69.

if forced_managed:

▶ Local vars
Variable	Value
self

kwargs

{}

func

args

()

forced_managed

True

* /home/ialbert10/webapps/biostar_testing/lib/python2.7/django/db/models/deletion.py in delete
253.

pk_list = [obj.pk for obj in instances]

254.

query.delete_batch(pk_list, self.using)

255.

256.

# send post_delete signals

257.

for model, obj in self.instances_with_model():

258.

if not model._meta.auto_created:

259.

signals.post_delete.send(

260.

sender=model, instance=obj, using=self.using

...
261.

)

262.

263.

# update collected instances

264.

for model, instances_for_fieldvalues in self.field_updates.iteritems():

265.

for (field, value), instances in instances_for_fieldvalues.iteritems():

266.

for obj in instances:

▶ Local vars
Variable	Value
batches

{: set([,
,
])}

obj

field

self

instances

[, , ]

pk_list

[2025, 2024, 2023]

query

model

* /home/ialbert10/webapps/biostar_testing/lib/python2.7/django/dispatch/dispatcher.py in send
165.

Returns a list of tuple pairs [(receiver, response), ... ].

166.

"""

167.

responses = []

168.

if not self.receivers:

169.

return responses

170.

171.

for receiver in self._live_receivers(_make_id(sender)):

172.

response = receiver(signal=self, sender=sender, **named)

...
173.

responses.append((receiver, response))

174.

return responses

175.

176.

def send_robust(self, sender, **named):

177.

"""

178.

Send signal from sender to all connected receivers catching errors.

▶ Local vars
Variable	Value
self

named

{'instance': , 'using': 'default'}

sender

responses

[]

receiver

* /home/ialbert10/webapps/biostar_testing/biostar-central/main/server/models.py in unapply_instance
499.

def apply_instance(sender, instance, created, raw, *args, **kwargs):

500.

"Applies changes from an instance with an apply() method"

501.

if created and not raw: # Raw is true when importing from fixtures, in which case votes are already applied

502.

instance.apply(+1)

503.

504.

def unapply_instance(sender, instance, *args, **kwargs):

505.

"Unapplies an instance when it is deleted"

506.

instance.apply(-1)

...
507.

508.

for model in MODELS_WITH_APPLY:

509.

signals.post_save.connect(apply_instance, sender=model)

510.

signals.post_delete.connect(unapply_instance, sender=model)

511.

512.

def make_uuid():

▶ Local vars
Variable	Value
instance

args

()

sender

kwargs

{'signal': ,
'using': 'default'}

* /home/ialbert10/webapps/biostar_testing/biostar-central/main/server/models.py in apply
253.

254.

def get_tag_names(self):

255.

"Returns the post's tag values as a list of tag names"

256.

names = [ n.lower() for n in self.tag_val.split(' ') ]

257.

return map(unicode, names)

258.

259.

def apply(self, dir):

260.

is_answer = self.parent and self.type == POST_ANSWER

...
261.

is_comment = self.parent and self.type == POST_COMMENT

262.

if is_answer:

263.

self.parent.answer_count += dir

264.

self.parent.save()

265.

if is_comment:

266.

self.parent.comment_count += dir

▶ Local vars
Variable	Value
self

dir

-1

* /home/ialbert10/webapps/biostar_testing/lib/python2.7/django/db/models/fields/related.py in __get__
308.

# If the related manager indicates that it should be used for

309.

# related fields, respect that.

310.

rel_mgr = self.field.rel.to._default_manager

311.

db = router.db_for_read(self.field.rel.to, instance=instance)

312.

if getattr(rel_mgr, 'use_for_related_fields', False):

313.

rel_obj = rel_mgr.using(db).get(**params)

314.

else:

315.

rel_obj = QuerySet(self.field.rel.to).using(db).get(**params)

...
316.

setattr(instance, cache_name, rel_obj)

317.

return rel_obj

318.

319.

def __set__(self, instance, value):

320.

if instance is None:

321.

raise AttributeError("%s must be accessed via instance" % self._field.name)

▶ Local vars
Variable	Value
val

2024

instance

other_field

self

db

'default'

instance_type

params

{'id__exact': 2024}

rel_mgr

cache_name

'_parent_cache'

* /home/ialbert10/webapps/biostar_testing/lib/python2.7/django/db/models/query.py in get
342.

if self.query.can_filter():

343.

clone = clone.order_by()

344.

num = len(clone)

345.

if num == 1:

346.

return clone._result_cache[0]

347.

if not num:

348.

raise self.model.DoesNotExist("%s matching query does not exist."

349.

% self.model._meta.object_name)

...
350.

raise self.model.MultipleObjectsReturned("get() returned more than one %s -- it returned %s! Lookup parameters were %s"

351.

% (self.model._meta.object_name, num, kwargs))

352.

353.

def create(self, **kwargs):

354.

"""

355.

Creates a new object with the given kwargs, saving it to the database

▶ Local vars
Variable	Value
clone

[]

num

0

self

[, , , , , , , , , , , , , , , , , , , , '...(remaining elements truncated)...']

args

()

kwargs

{'id__exact': 2024}

Environment: Request Method: POST Request URL: http://test.biostars.org/destroy/post/2023/ Django Version: 1.3.1 Python Version: 2.7.1 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'django.contrib.markup', 'django.contrib.messages', 'django.contrib.admin', 'django.contrib.admindocs', 'main.server', 'django_openid_auth', 'mptt'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'main.middleware.LastVisit', 'main.middleware.PermissionsMiddleware') Traceback: File "/home/ialbert10/webapps/biostar_testing/lib/python2.7/django/core/handlers/base.py" in get_response 111. response = callback(request, *callback_args, **callback_kwargs) File "/home/ialbert10/webapps/biostar_testing/lib/python2.7/django/contrib/auth/decorators.py" in _wrapped_view 23. return view_func(request, *args, **kwargs) File "/home/ialbert10/webapps/biostar_testing/biostar-central/main/server/action.py" in destroy_post 144. post.delete() File "/home/ialbert10/webapps/biostar_testing/lib/python2.7/django/db/models/base.py" in delete 581. collector.delete() File "/home/ialbert10/webapps/biostar_testing/lib/python2.7/django/db/models/deletion.py" in decorated 63. func(self, *args, **kwargs) File "/home/ialbert10/webapps/biostar_testing/lib/python2.7/django/db/models/deletion.py" in delete 260. sender=model, instance=obj, using=self.using File "/home/ialbert10/webapps/biostar_testing/lib/python2.7/django/dispatch/dispatcher.py" in send 172. response = receiver(signal=self, sender=sender, **named) File "/home/ialbert10/webapps/biostar_testing/biostar-central/main/server/models.py" in unapply_instance 506. instance.apply(-1) File "/home/ialbert10/webapps/biostar_testing/biostar-central/main/server/models.py" in apply 260. is_answer = self.parent and self.type == POST_ANSWER File "/home/ialbert10/webapps/biostar_testing/lib/python2.7/django/db/models/fields/related.py" in __get__ 315. rel_obj = QuerySet(self.field.rel.to).using(db).get(**params) File "/home/ialbert10/webapps/biostar_testing/lib/python2.7/django/db/models/query.py" in get 349. % self.model._meta.object_name) Exception Type: DoesNotExist at /destroy/post/2023/ Exception Value: Post matching query does not exist.

Request information
GET

No GET data
POST

No POST data
FILES

No FILES data
COOKIES
Variable	Value
csrftoken

'e0d9af9d4bd76d1b1c5cd4cde062f190'

sessionid

'c8e2c205a6911dc78800842ce72a98e6'

META
Variable	Value
mod_wsgi.listener_port

'46930'

HTTP_X_FORWARDED_SERVER

'test.biostars.org'

HTTP_COOKIE

'csrftoken=e0d9af9d4bd76d1b1c5cd4cde062f190; sessionid=c8e2c205a6911dc78800842ce72a98e6'

HTTP_X_FORWARDED_HOST

'test.biostars.org'

mod_wsgi.handler_script

''

SERVER_SOFTWARE

'Apache/2.2.17 (Unix) mod_wsgi/3.3 Python/2.7.1'

SCRIPT_NAME

u''

HTTP_X_CSRFTOKEN

'e0d9af9d4bd76d1b1c5cd4cde062f190'

SERVER_SIGNATURE

''

REQUEST_METHOD

'POST'

PATH_INFO

u'/destroy/post/2023/'

SERVER_PROTOCOL

'HTTP/1.0'

QUERY_STRING

''

CONTENT_LENGTH

'0'

HTTP_ACCEPT_CHARSET

'ISO-8859-1,utf-8;q=0.7,*;q=0.7'

HTTP_USER_AGENT

'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7; en-GB; rv:1.9.2.24) Gecko/20111103 Firefox/3.6.24'

HTTP_CONNECTION

'close'

SERVER_NAME

'test.biostars.org'

REMOTE_ADDR

'127.0.0.1'

mod_wsgi.request_handler

'wsgi-script'

wsgi.url_scheme

'http'

PATH_TRANSLATED

'/home/ialbert10/webapps/biostar_testing/biostar-central/conf/biostar_test.wsgi/destroy/post/2023/'

SERVER_PORT

'80'

wsgi.multiprocess

True

mod_wsgi.input_chunked

'0'

SERVER_ADDR

'127.0.0.1'

DOCUMENT_ROOT

'/usr/local/apache2/htdocs'

mod_wsgi.process_group

'biostar_testing'

HTTP_PRAGMA

'no-cache'

HTTP_X_REQUESTED_WITH

'XMLHttpRequest'

SCRIPT_FILENAME

'/home/ialbert10/webapps/biostar_testing/biostar-central/conf/biostar_test.wsgi'

SERVER_ADMIN

'[no address given]'

wsgi.input

HTTP_DNT

'1'

HTTP_HOST

'test.biostars.org'

wsgi.multithread

True

mod_wsgi.callable_object

'application'

HTTP_CACHE_CONTROL

'no-cache'

REQUEST_URI

'/destroy/post/2023/'

HTTP_ACCEPT

'application/json, text/javascript, */*; q=0.01'

mod_wsgi.listener_host

''

wsgi.version

(1, 1)

GATEWAY_INTERFACE

'CGI/1.1'

HTTP_X_FORWARDED_FOR

'78.143.195.139'

wsgi.errors

REMOTE_PORT

'56440'

HTTP_ACCEPT_LANGUAGE

'en-gb,en;q=0.5'

mod_wsgi.version

(3, 3)

wsgi.run_once

False

CONTENT_TYPE

'application/x-www-form-urlencoded; charset=UTF-8'

mod_wsgi.application_group

'web192.webfaction.com|'

mod_wsgi.script_reloading

'1'

wsgi.file_wrapper

'*** MISSING ***'

CSRF_COOKIE

'e0d9af9d4bd76d1b1c5cd4cde062f190'

HTTP_ACCEPT_ENCODING

'gzip,deflate'

Settings
Using settings module pg_testing
Setting	Value
YEAR_MONTH_FORMAT

'F Y'

USE_L10N

True

TIME_ZONE

'America/Chicago'

LANGUAGE_CODE

'en-us'

ROOT_URLCONF

'main.urls'

MANAGERS

(('Istvan Albert', 'istvan.albert@gmail.com'),)

DEFAULT_CHARSET

'utf-8'

STATIC_ROOT

'/home/ialbert10/webapps/static_testing'

TEST_DATABASE_CHARSET

None

USE_THOUSAND_SEPARATOR

False

MESSAGE_STORAGE

'django.contrib.messages.storage.user_messages.LegacyFallbackStorage'

DATABASE_HOST

''

EMAIL_SUBJECT_PREFIX

'[Django] '

SEND_BROKEN_LINK_EMAILS

False

URL_VALIDATOR_USER_AGENT

'Django/1.3.1 (http://www.djangoproject.com)'

STATICFILES_FINDERS

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

SESSION_COOKIE_DOMAIN

None

SESSION_COOKIE_NAME

'sessionid'

ADMIN_FOR

()

TIME_INPUT_FORMATS

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

DATABASES

{'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2',
'HOST': 'web192',
'NAME': 'ialbert10_biostar_test',
'OPTIONS': {},
'PASSWORD': '********************',
'PORT': '',
'TEST_CHARSET': None,
'TEST_COLLATION': None,
'TEST_MIRROR': None,
'TEST_NAME': None,
'TIME_ZONE': 'America/Chicago',
'USER': 'ialbert10_biostar_test'}}

TEST_DATABASE_NAME

None

FILE_UPLOAD_PERMISSIONS

None

FILE_UPLOAD_HANDLERS

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

DEFAULT_CONTENT_TYPE

'text/html'

APPEND_SLASH

True

FIRST_DAY_OF_WEEK

0

DATABASE_ROUTERS

[]

WHOOSH_INDEX

'/home/ialbert10/webapps/biostar_testing/biostar-central/main/db/index'

STATICFILES_STORAGE

'django.contrib.staticfiles.storage.StaticFilesStorage'

CACHES

{'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
'LOCATION': 'unique-snowflake'}}

DATABASE_DIR

'/home/ialbert10/webapps/biostar_testing/biostar-central/main/db'

TEMPLATE_DIR

'/home/ialbert10/webapps/biostar_testing/biostar-central/main/templates'

SERVER_EMAIL

'root@localhost'

SESSION_COOKIE_PATH

'/'

IGNORABLE_404_ENDS

('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php')

MIDDLEWARE_CLASSES

('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'main.middleware.LastVisit',
'main.middleware.PermissionsMiddleware')

USE_I18N

True

ALLOW_MIGRATION

True

SECRET_KEY

'********************'

LANGUAGE_COOKIE_NAME

'django_language'

FILE_UPLOAD_TEMP_DIR

None

TRANSACTIONS_MANAGED

False

LOGGING_CONFIG

'django.utils.log.dictConfig'

TEMPLATE_LOADERS

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

NEWBIE_MAX_POSTS_PER_DAY

3

TEMPLATE_DEBUG

True

AUTHENTICATION_BACKENDS

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

TEST_DATABASE_COLLATION

None

FORCE_SCRIPT_NAME

None

USE_X_FORWARDED_HOST

False

STATIC_DIR

'/home/ialbert10/webapps/biostar_testing/biostar-central/main/static'

SESSION_COOKIE_SECURE

False

HOME_DIR

'/home/ialbert10/webapps/biostar_testing/biostar-central/main'

__CURR_DIR

'/home/ialbert10/webapps/biostar_testing/biostar-central/conf'

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.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'django.contrib.markup',
'django.contrib.messages',
'django.contrib.admin',
'django.contrib.admindocs',
'main.server',
'django_openid_auth',
'mptt']

LANGUAGES

(('ar', 'Arabic'),
('az', 'Azerbaijani'),
('bg', 'Bulgarian'),
('bn', 'Bengali'),
('bs', 'Bosnian'),
('ca', 'Catalan'),
('cs', 'Czech'),
('cy', 'Welsh'),
('da', 'Danish'),
('de', 'German'),
('el', 'Greek'),
('en', 'English'),
('en-gb', 'British English'),
('es', 'Spanish'),
('es-ar', 'Argentinian Spanish'),
('es-mx', 'Mexican Spanish'),
('es-ni', 'Nicaraguan 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'),
('id', 'Indonesian'),
('is', 'Icelandic'),
('it', 'Italian'),
('ja', 'Japanese'),
('ka', 'Georgian'),
('km', 'Khmer'),
('kn', 'Kannada'),
('ko', 'Korean'),
('lt', 'Lithuanian'),
('lv', 'Latvian'),
('mk', 'Macedonian'),
('ml', 'Malayalam'),
('mn', 'Mongolian'),
('nl', 'Dutch'),
('no', 'Norwegian'),
('nb', 'Norwegian Bokmal'),
('nn', 'Norwegian Nynorsk'),
('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'),
('ta', 'Tamil'),
('te', 'Telugu'),
('th', 'Thai'),
('tr', 'Turkish'),
('uk', 'Ukrainian'),
('ur', 'Urdu'),
('vi', 'Vietnamese'),
('zh-cn', 'Simplified Chinese'),
('zh-tw', 'Traditional Chinese'))

DATABASE_ENGINE

''

DATABASE_NAME

'ialbert10_biostar_test'

COMMENTS_FIRST_FEW

0

PREPEND_WWW

False

MINIMUM_REPUTATION

0

SESSION_COOKIE_HTTPONLY

False

DATABASE_PORT

''

DEBUG_PROPAGATE_EXCEPTIONS

False

OPENID_UPDATE_DETAILS_FROM_SREG

True

MONTH_DAY_FORMAT

'F j'

LOGIN_URL

'/openid/login/'

SESSION_EXPIRE_AT_BROWSER_CLOSE

False

PASSWORD_RESET_TIMEOUT_DAYS

'********************'

TIME_FORMAT

'P'

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

CSRF_COOKIE_NAME

'csrftoken'

EMAIL_HOST_PASSWORD

'********************'

AUTH_PROFILE_MODULE

'server.UserProfile'

CACHE_MIDDLEWARE_ALIAS

'default'

SESSION_SAVE_EVERY_REQUEST

False

ADMIN_MEDIA_PREFIX

'/static/admin/'

NUMBER_GROUPING

0

SESSION_ENGINE

'django.contrib.sessions.backends.db'

CSRF_FAILURE_VIEW

'django.views.csrf.csrf_failure'

COMMENTS_SKETCHY_USERS_GROUP

None

LOGIN_REDIRECT_URL

'/'

LOGGING

{'disable_existing_loggers': False,
'formatters': {'simple': {'format': '%(levelname)s\t%(name)s\t%(funcName)s\t%(asctime)s \t%(message)s'}},
'handlers': {'console': {'class': 'logging.StreamHandler',
'formatter': 'simple',
'level': 'DEBUG'}},
'loggers': {'main.server.auth': {'handlers': ['console'], 'level': 'INFO'},
'main.server.models': {'handlers': ['console'], 'level': 'INFO'},
'main.server.views': {'handlers': ['console'], 'level': 'INFO'}},
'version': 1}

CACHE_MIDDLEWARE_KEY_PREFIX

''

SITE_ID

1

LOCALE_PATHS

()

TEMPLATE_STRING_IF_INVALID

'*** MISSING ***'

COMMENTS_ALLOW_PROFANITIES

False

LOGOUT_URL

'/accounts/logout/'

EMAIL_USE_TLS

False

TEMPLATE_DIRS

('/home/ialbert10/webapps/biostar_testing/biostar-central/main/templates',)

FIXTURE_DIRS

()

EMAIL_HOST

'localhost'

DATE_FORMAT

'N j, Y'

MEDIA_ROOT

'/media/'

ADMINS

(('Istvan Albert', 'istvan.albert@gmail.com'),)

FORMAT_MODULE_PATH

None

DEFAULT_FROM_EMAIL

'webmaster@localhost'

THOUSAND_SEPARATOR

','

STATICFILES_DIRS

('/home/ialbert10/webapps/biostar_testing/biostar-central/main/static',)

MEDIA_URL

'/home/ialbert10/webapps/static_testing'

DATETIME_FORMAT

'N j, Y, P'

IGNORABLE_404_STARTS

('/cgi-bin/', '/_vti_bin', '/_vti_inf')

GIT_REVISION

'unknown'

DISALLOWED_USER_AGENTS

()

ALLOWED_INCLUDE_ROOTS

()

DECIMAL_SEPARATOR

'.'

SHORT_DATE_FORMAT

'm/d/Y'

DATABASE_USER

''

TEST_RUNNER

'server.tests.runner.BiostarTest'

OPENID_CREATE_USERS

True

OPENID_USE_AS_ADMIN_LOGIN

True

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.request',
'django.core.context_processors.static',
'django.contrib.messages.context_processors.messages',
'main.context.extras',
'main.context.popular_tags')

A

EXPORT_DIR

'/home/ialbert10/webapps/static_testing'

SESSION_COOKIE_AGE

1209600

SETTINGS_MODULE

'pg_testing'

USE_ETAGS

False

LANGUAGES_BIDI

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

DEFAULT_INDEX_TABLESPACE

''

INTERNAL_IPS

('127.0.0.1',)

STATIC_URL

'/static/'

EMAIL_PORT

25

SHORT_DATETIME_FORMAT

'm/d/Y P'

ABSOLUTE_URL_OVERRIDES

{}

DATABASE_OPTIONS

{}

CACHE_MIDDLEWARE_SECONDS

600

BANNED_IPS

()

DATETIME_INPUT_FORMATS

('%Y-%m-%d %H:%M:%S',
'%Y-%m-%d %H:%M',
'%Y-%m-%d',
'%m/%d/%Y %H:%M:%S',
'%m/%d/%Y %H:%M',
'%m/%d/%Y',
'%m/%d/%y %H:%M:%S',
'%m/%d/%y %H:%M',
'%m/%d/%y')

DATABASE_PASSWORD

'********************'

COMMENTS_MODERATORS_GROUP

None

PROFANITIES_LIST

'********************'

EMAIL_HOST_USER

''

COMMENTS_BANNED_USERS_GROUP

None