Oh, of course

Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
File "/home/basti/Dokumente/websites/virtualenv/local/lib/python2.7/site-packages/Django-1.6.1-py2.7.egg/django/contrib/staticfiles/handlers.py", line 68, in __call__ return super(StaticFilesHandler, self).__call__(environ, start_response) File "/home/basti/Dokumente/websites/virtualenv/local/lib/python2.7/site-packages/Django-1.6.1-py2.7.egg/django/core/handlers/wsgi.py", line 206, in __call__
    response = self.get_response(request)
File "/home/basti/Dokumente/websites/virtualenv/src/mezzanine/mezzanine/core/management/commands/runserver.py", line 15, in get_response
    return serve(request, path, document_root=settings.STATIC_ROOT)
File "/home/basti/Dokumente/websites/virtualenv/local/lib/python2.7/site-packages/Django-1.6.1-py2.7.egg/django/views/static.py", line 55, in serve
    raise Http404(_('"%(path)s" does not exist') % {'path': fullpath})
Http404: "media/car_images/hirn25_1.png" ist nicht vorhanden
[04/Feb/2014 18:06:57] "GET /static/media/car_images/hirn25_1.png HTTP/1.1" 500 59

Here you can see the given url is /static/media/, but it's looking for /media/
My settings are like this:

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/";
STATIC_URL = "/static/"

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
# STATIC_ROOT = os.path.join(PROJECT_ROOT, STATIC_URL.strip("/"))

STATICFILES_DIRS = (
    os.path.join(PROJECT_ROOT, "static"),
)

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/";, "http://example.com/media/";
MEDIA_URL = STATIC_URL + "media/"

# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = os.path.join(PROJECT_ROOT, *MEDIA_URL.strip("/").split("/"))

What's wrong here?

Am 04.02.2014 18:05, schrieb Josh Cartmell:
Is a traceback displayed in the terminal that is running the dev server? I've seen errors like that when an error occurred and then Django created another error trying to produce the debug error page.


On Tue, Feb 4, 2014 at 5:56 AM, Sebastian Clemens <[email protected] <mailto:[email protected]>> wrote:

    Hey,

    I'm using Ubuntu 13.10 and build sites on the development server
    (manage.py runserver), but it doesn't serve media files. I tried
    it with STATICFILES_DIR, but that changed nothing. On my productiv
    Debian 6 Server, everything works perfect. But locally I just get
    an "A server error occurred. Please contact the administrator."

    What else can I try to solve this?
-- You received this message because you are subscribed to the Google
    Groups "Mezzanine Users" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to [email protected]
    <mailto:mezzanine-users%[email protected]>.
    For more options, visit https://groups.google.com/groups/opt_out.


--
You received this message because you are subscribed to a topic in the Google Groups "Mezzanine Users" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/mezzanine-users/SnSEsx0g3lo/unsubscribe. To unsubscribe from this group and all its topics, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Mezzanine 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to