Forums

Lost Admin Styling With New Domain

I recently purchased my own domain name and associated it with an existing app (following these directions: https://www.pythonanywhere.com/wiki/OwnDomains).

Everything on the public site looks fine, but my admin site has lost all its styling.

Is there an extra step I need to tell my admin where to find it's styling? I'm not sure how the admin finds this stuff on its own.

Did you copy across that static file mappings when you associated the domain name with the app?

Yes, I did. To be honest, I don't understand the wsgi file. Is there some value I should check to be certain it is correct?

In the source for my admin page I see this: <script type="text/javascript">window.admin_media_prefix = "http://www.pine\u002Dterest.com/static/admin/";</script>

My domain is www.pine-terest.com. Do I need to escape the hyphen somehow?

I'm using Django 1.3.

Looking at the static file mappings for that domain, it looks like you're missing some. /static/admin/ should map to /usr/local/lib/python2.7/dist-packages/django/contrib/admin/media

Thanks for the help you two.

I was able to fix this by using the "static files" form on the Web tab for my app: https://www.pythonanywhere.com/wiki/StaticFiles

Excellent, glad you got it working!