Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8853973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:46:36+00:00 2026-06-14T13:46:36+00:00

After doing the python manage.py collectstatic I found out that I can access everything

  • 0

After doing the python manage.py collectstatic I found out that I can access everything in static/css but not in static/admin. To be very clear:

  1. I go to: http://mysite.com/static/admin/css/login.css and fails
  2. Manually move the folder static/admin to static/css
  3. I go to: http://mysite.com/static/css/admin/css/login.css and works!

Notice the change from /static/admin/css/ to /static/css/admin/css/ in the URLS. This means that this doesn’t solve the problem because the templates continue pointing to the first URL.

I know, serving static admin files has been asked 100 times in stackoverflow but I still cannot make it work (and I am not alone for the comments I have read). It seems nobody has mention this weird problem of accessing the static/css folder and static/anyother_folder.

Some extra details:

There is no errors in the collectstatic, there is no problems with the application css’s. This is what I have in my settings.py):

MEDIA_ROOT = join(PROJECT_ROOT,'../media')
MEDIA_URL = '/media/'
STATIC_ROOT = join(PROJECT_ROOT,'../static')
STATIC_URL = '/static/'

I also have tried the deprecated ADMIN_MEDIA_PREFIX without any result.

ADMIN_MEDIA_PREFIX = '/static/admin/'

My nginx configuration is simple and clear.

location /static {
    alias /home/the_home/where_the_static_is/static/;
}
location /media {
    alias /home/the_home/where_the_media_is/media/;
}

I am using the last version of Django (1.4.2).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:46:38+00:00Added an answer on June 14, 2026 at 1:46 pm

    Puff. So, here it was. I had another folder in nginx redirecting the /static/admin/ to the Django installation in the virtual environment. In the organization, we use a virtual machine template that pre-configure our Django projects. So, revisiting the nginx configuration I found this:

    location /static/admin {
       alias /path/to/virtualenvs/my_virtualenv/path_to_the_static_admin;
    }
    

    Apparently this worked for Django 1.3 but the path changed at some point.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After doing lot of research in Google, I found this program: #include <stdio.h> int
Learning django & python. Just set up a new site after doing the tutorial.
I am writing a python script that will be doing some processing on text
I'm doing a little python plasmoid that deals with remote resources. Here's the code
I am doing this through django $ python manage.py shell from django.contrib.auth.models import User
Say that I have the Python code: someString = file(filename.jpg).read() How can I replicate
In python I'm doing a os.system('chmod o+w filename.png') command so I can overwrite the
New to python-can someone tell me what I am doing wrong? I need to
After doing a set , when i try to get a object from memcached,
After doing the following test: for( i = 0; i < 3000000; i++ )

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.