This is probably a STATIC_URL issue. Check to make sure it is set correctly
and that you've run manage.py collectatatic and that apache, etc. is set to
serve those files directly. The dev server does some funny magic behind the
scenes to get these files served up.

-James
On Mar 25, 2013 2:12 PM, "Tim Cook" <[email protected]> wrote:

> Hi All,
>
> I have a Django app running behind Apache according to the WSGI
> instructions:
> https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/
>
> I modified my project IAW Two Scoops of Django instructions so that I
> have separate settings files and different directories.  (see layout
> below).
> Everything works as expected (without Apache) on the development machine.
>
> I copied the entire project tree to the machine that will eventually
> be the production server.  I am still using the dev.py settings file
> on this machine though, just to reduce the number of possible places
> for errors. So, it seems that all the paths 'should be' correct still.
>
> The only thing I changed in the settings is the user for the new
> machine and Postgres database.
> The only thing I changed in wsgi.py is the path to the settings file.
> It is now mlhim.settings.dev  (see tree below).
>
> I haven't created any views or changed anything in urls.py, yet.
> Except to uncomment the line to use the admin interface.
>
> So on my development machine using just django, the admin interface
> looks fine.  However, on the copy that is running behind Apache, I get
> very plain looking pages w/o any CSS
>
> The Apache error.log has these types of entries:
> "GET /static/admin/css/base.css HTTP/1.1" 404
> "GET /static/admin/css/dashboard.css HTTP/1.1" 404
> "GET /static/admin/js/actions.js HTTP/1.1" 404
>
> Problem is, I can't figure out what to change to correct this.
> Especially since it works without Apache.
>
> All help is appreciated.
>
> Thanks,
> Tim
>
>
>
>
> I am using unipath.Path and my directory settings (in base.py) look like
> this:
>
> #Setup relative project paths
> PROJECT_DIR = Path(__file__).ancestor(3)
>
> # filesystem path to the directories.
> MEDIA_ROOT = PROJECT_DIR.child('media')
> STATIC_ROOT = PROJECT_DIR.child('static')
> STATICFILES_DIRS = (PROJECT_DIR.child('assets'),)
> TEMPLATE_DIRS = (
> PROJECT_DIR.child('templates'),)
>
> The directory tree looks like this:
>
> mlhim
>      ccdgen  (app directory)
>                 migrations  (south)
>                 admin.py
>                 models.py
>                 tests.py
>                 views.py
>      docs
>      mlhim
>            settings
>                       base.py
>                       dev.py
>                       test.py
>                       live.py
>            __init__.py
>           urls.py
>           wsgi.py
>      requirements
>      static
>      templates
>      manage.py
>
>
> --
> ============================================
> Timothy Cook, MSc           +55 21 94711995
> MLHIM http://www.mlhim.org
> Like Us on FB: https://www.facebook.com/mlhim2
> Circle us on G+: http://goo.gl/44EV5
> Google Scholar: http://goo.gl/MMZ1o
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to