404 Issues

54 views
Skip to first unread message

James Hargreaves

unread,
May 3, 2012, 5:54:50 AM5/3/12
to django...@googlegroups.com
Hello,

I have created a website using Django CMS:


When I visit a URL on this site that does not exist in Django CMS I get a 500 error - eg:


I was expecting a 404 error. Before you say it I don't think this is caused by Django CMS since if I set DEBUG = TRUE in settings.py I get a page not found (404) error as expected. I have the following static files in my template directory:

lrwxrwxrwx 1 jay www-data   10 Apr 11 06:40 403.html -> error.html
lrwxrwxrwx 1 jay www-data   10 May  3 09:24 404.html -> error.html
lrwxrwxrwx 1 jay www-data   10 Apr 11 06:40 500.html -> error.html
-rw-r----- 1 jay www-data  863 Apr 11 20:53 error.html                                                                  

The contents of error.html file is output with the 500 error, which implies that the 500.html symbolic link is working. Why is the 404.html file being ignored? I have tried replacing the symbolic link with a static file but to no avail.

Unfortunately I don't have logging enabled for this site - I'm going to rectify that ASAP but in the meantime can anyone point me in the right direction?

Thanks
James

kooliah

unread,
May 3, 2012, 8:42:13 AM5/3/12
to django...@googlegroups.com
I need to import an already running database into a satchmo store.
I started to make an ER graph, as a reference for the fields mapping, by
myself, but if someone had already done it, i'd like to save time.

Thanks to all

Kooliah

Guddu

unread,
May 3, 2012, 9:04:31 AM5/3/12
to Django users
You could use something like ER Master http://ermaster.sourceforge.net/
or Aqua Studio to generate the Graph.

On May 3, 8:42 am, kooliah <kool...@djeve.sites.djangohosting.ch>
wrote:

Daniel Sokolowski

unread,
May 3, 2012, 9:48:08 AM5/3/12
to django...@googlegroups.com
django_extensions app has a model graphing option I used successfully in
the past - https://github.com/django-extensions/django-extensions

Example output I found
http://brianglass.files.wordpress.com/2009/11/sheepology.png
--
Daniel Sokolowski
Web Engineer
Danols Web Engineering
http://webdesign.danols.com/

Tom Evans

unread,
May 4, 2012, 7:28:38 AM5/4/12
to django...@googlegroups.com
Showing the contents of the error email that Django sends to
settings.ADMINS when settings.DEBUG is false would be a start.
Typically you will get a 500 error instead of a 404 when your 404
template causes an error to occur during rendering.

I would very much doubt that symlinks would affect this at all.

Cheers

Tom

James Hargreaves

unread,
May 4, 2012, 8:11:04 AM5/4/12
to django...@googlegroups.com
Thanks for your response Tom.

I didn't have the emails enabled until now! The email content is below and this has helped me figure out the problem.

Some time ago I defined a custom 404 handler (application.views.handler404) which I have since removed but I forgot to remove the definition from urls.py!

Thanks for your help Tom :)

Traceback (most recent call last):

 File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 149, in get_response
   callback, param_dict = resolver.resolve404()

 File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py", line 300, in resolve404
   return self._resolve_special('404')

 File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py", line 297, in _resolve_special
   raise ViewDoesNotExist("Tried %s. Error was: %s" % (callback, str(e)))

ViewDoesNotExist: Tried application.views.handler404. Error was: 'module' object has no attribute 'handler404'


Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.




--
a: 1 Oak Cottage, Town Lane, Mobberley, WA16 7HJ
t: 01565 873 019 | 07899 872 306
e: james.ha...@gmail.com
Reply all
Reply to author
Forward
0 new messages