I added this to my urls.py:
import sys, os
try:
admin.autodiscover()
except:
e = sys.exc_info()[0]
print >> sys.stderr, e
and got this in the apache log -
[core:notice] [pid 19280] AH00052: child pid 19284 exit signal Segmentation fault (11)
The site loads correctly except for the admin part. I get the admin login page and can login as superuser, but none of the tables are visible and I get the error message "You don't have permission to edit anything."
In the apache log for the site (not the top level apache log) I get this with an django exception (see below). Not sure what it means.
[Wed Jan 29 08:48:00.796858 2014] [authz_core:debug] [pid 23573] mod_authz_core.c(802): [client 192.168.25.150:60286] AH01626: authorization result of Require all granted: granted [Wed Jan 29 08:48:00.796992 2014] [authz_core:debug] [pid 23573] mod_authz_core.c(802): [client 192.168.25.150:60286] AH01626: authorization result of <RequireAny>: granted [Wed Jan 29 08:48:00.797266 2014] [authz_core:debug] [pid 23573] mod_authz_core.c(802): [client 192.168.25.150:60286] AH01626: authorization result of Require all granted: granted [Wed Jan 29 08:48:00.797290 2014] [authz_core:debug] [pid 23573] mod_authz_core.c(802): [client 192.168.25.150:60286] AH01626: authorization result of <RequireAny>: granted [Wed Jan 29 08:48:00.820475 2014] [:info] [pid 23572] mod_wsgi (pid=23572): Create interpreter 'beagle:7000|/mom'.
[Wed Jan 29 08:48:00.823940 2014] [:info] [pid 23572] mod_wsgi (pid=23572): Adding '/var/www/mom/' to path.
[Wed Jan 29 08:48:00.825088 2014] [:info] [pid 23572] mod_wsgi (pid=23572): Adding '/var/www/mom/inventory/' to path.
[Wed Jan 29 08:48:00.826026 2014] [:info] [pid 23572] mod_wsgi (pid=23572): Adding '/var/www/mom/inventory_project/' to path.
[Wed Jan 29 08:48:00.827011 2014] [:info] [pid 23572] mod_wsgi (pid=23572): Adding '/var/lib/django-venv/site-packages/' to path.
[Wed Jan 29 08:48:00.828701 2014] [:info] [pid 23572] [client 192.168.25.150:16823] mod_wsgi (pid=23572, process='mom', application='beagle:7000|/mom'): Loading WSGI script '/var/www/mom/inventory_project/wsgi.py'. [Wed Jan 29 08:48:01.663370 2014] [:error] [pid 23572] <class 'django.core.exceptions.ImproperlyConfigured'>
[Wed Jan 29 08:48:01.853667 2014] [deflate:debug] [pid 23573] mod_deflate.c(764): [client 192.168.25.150:60286] AH01384: Zlib: Compressed 4574 to 948 : URL /mom/admin/ [Wed Jan 29 08:48:02.315233 2014] [authz_core:debug] [pid 23573] mod_authz_core.c(802): [client 192.168.25.150:60286] AH01626: authorization result of Require all granted: granted [Wed Jan 29 08:48:02.315602 2014] [authz_core:debug] [pid 23573] mod_authz_core.c(802): [client 192.168.25.150:60286] AH01626: authorization result of <RequireAny>: granted [Wed Jan 29 08:48:02.315869 2014] [core:info] [pid 23573] [client 192.168.25.150:60286] AH00128: File does not exist: /var/www/favicon.ico [Wed Jan 29 08:48:02.552416 2014] [:info] [pid 23635] mod_wsgi (pid=23635): Attach interpreter ''.
[Wed Jan 29 08:48:02.553199 2014] [:info] [pid 23635] mod_wsgi (pid=23635): Adding '/var/www/mom/' to path.
[Wed Jan 29 08:48:02.554206 2014] [:info] [pid 23635] mod_wsgi (pid=23635): Adding '/var/www/mom/inventory/' to path.
[Wed Jan 29 08:48:02.555206 2014] [:info] [pid 23635] mod_wsgi (pid=23635): Adding '/var/www/mom/inventory_project/' to path.
[Wed Jan 29 08:48:02.556151 2014] [:info] [pid 23635] mod_wsgi (pid=23635): Adding '/var/lib/django-venv/site-packages/' to path.
[Wed Jan 29 08:48:05.496267 2014] [authz_core:debug] [pid 23573] mod_authz_core.c(802): [client 192.168.25.150:60286] AH01626: authorization result of Require all granted: granted [Wed Jan 29 08:48:05.496361 2014] [authz_core:debug] [pid 23573] mod_authz_core.c(802): [client 192.168.25.150:60286] AH01626: authorization result of <RequireAny>: granted [Wed Jan 29 08:48:05.496474 2014] [authz_core:debug] [pid 23573] mod_authz_core.c(802): [client 192.168.25.150:60286] AH01626: authorization result of Require all granted: granted [Wed Jan 29 08:48:05.496493 2014] [authz_core:debug] [pid 23573] mod_authz_core.c(802): [client 192.168.25.150:60286] AH01626: authorization result of <RequireAny>: granted [Wed Jan 29 08:48:05.521001 2014] [:info] [pid 23571] mod_wsgi (pid=23571): Create interpreter 'beagle:7000|/mom'.
[Wed Jan 29 08:48:05.524888 2014] [:info] [pid 23571] mod_wsgi (pid=23571): Adding '/var/www/mom/' to path.
[Wed Jan 29 08:48:05.525911 2014] [:info] [pid 23571] mod_wsgi (pid=23571): Adding '/var/www/mom/inventory/' to path.
[Wed Jan 29 08:48:05.526883 2014] [:info] [pid 23571] mod_wsgi (pid=23571): Adding '/var/www/mom/inventory_project/' to path.
[Wed Jan 29 08:48:05.528751 2014] [:info] [pid 23571] mod_wsgi (pid=23571): Adding '/var/lib/django-venv/site-packages/' to path.
[Wed Jan 29 08:48:05.530493 2014] [:info] [pid 23571] [client 192.168.25.150:16823] mod_wsgi (pid=23571, process='mom', application='beagle:7000|/mom'): Loading WSGI script '/var/www/mom/inventory_project/wsgi.py'. [Wed Jan 29 08:48:06.330505 2014] [:error] [pid 23571] <class 'django.core.exceptions.ImproperlyConfigured'>
[Wed Jan 29 08:48:06.665242 2014] [deflate:debug] [pid 23573] mod_deflate.c(764): [client 192.168.25.150:60286] AH01384: Zlib: Compressed 8575 to 1622 : URL /mom/inventory/ [Wed Jan 29 08:48:07.176850 2014] [authz_core:debug] [pid 23573] mod_authz_core.c(802): [client 192.168.25.150:60286] AH01626: authorization result of Require all granted: granted [Wed Jan 29 08:48:07.176945 2014] [authz_core:debug] [pid 23573] mod_authz_core.c(802): [client 192.168.25.150:60286] AH01626: authorization result of <RequireAny>: granted [Wed Jan 29 08:48:07.177011 2014] [core:info] [pid 23573] [client 192.168.25.150:60286] AH00128: File does not exist: /var/www/favicon.ico [Wed Jan 29 08:48:07.556573 2014] [:info] [pid 23655] mod_wsgi (pid=23655): Attach interpreter ''.
[Wed Jan 29 08:48:07.557411 2014] [:info] [pid 23655] mod_wsgi (pid=23655): Adding '/var/www/mom/' to path.
[Wed Jan 29 08:48:07.558362 2014] [:info] [pid 23655] mod_wsgi (pid=23655): Adding '/var/www/mom/inventory/' to path.
[Wed Jan 29 08:48:07.559354 2014] [:info] [pid 23655] mod_wsgi (pid=23655): Adding '/var/www/mom/inventory_project/' to path.
[Wed Jan 29 08:48:07.560297 2014] [:info] [pid 23655] mod_wsgi (pid=23655): Adding '/var/lib/django-venv/site-packages/' to path.
If I remove the try/except block and run with admin.autodiscover(), then I get this error:
The included urlconf inventory_project.urls doesn't have any patterns in it
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at
http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CAEqej2P0NagSKVNDfbj5mK7hb_nXAL0t8kKfx2GhsZqQJVYJEw%40mail.gmail.com.
For more options, visit
https://groups.google.com/groups/opt_out.
No comments:
Post a Comment