This forum is no longer active. Please post your questions to our new community site

Newbie: django admin

Subscribe to Newbie: django admin 6 post(s), 4 voice(s)

Avatar codingJoe 1 post

Hi all,

Newbie question: I am using bitnami django stack to teach myself django. I am working through the django tutorial at (Polls/Choices). My problem is in part 2 of the django tutorial where we setup the admin interface.

The good news is that I can see the Poll/Choice data. I can log into admin and see the Poll/Choice data.

The bad news is that the page is text only. It looks like hell compared to the images in the tutorial. It is almost as if there is a css file and images missing.

Since apache the on bitnami is more complicated than what the django tutorial uses, I have no idea where the static files belong to properly fix this. Where should I put a css file to fix this admin interface? Do these belong under my project? Or somewhere in the bitnami stack?

Please advise.


Avatar Beltrán Rueda Administrator 3,714 post(s)


BitNami Django Stack configures Apache with mod_wgsi. I hope this helps you…

Avatar workmaster2n 1 post

I read the article you linked to, but I’m a little confused what the problem/solution is.


Avatar Beltrán Rueda Administrator 3,714 post(s)

It is a performance improvement. Copied from the Django docs:

“Django developers mostly concern themselves with the dynamic parts of web applications – the views and templates that render anew for each request. But web applications have other parts: the static files (images, CSS, Javascript, etc.) that are needed to render a complete web page.

For small projects, this isn’t a big deal, because you can just keep the static files somewhere your web server can find it. However, in bigger projects – especially those comprised of multiple apps – dealing with the multiple sets of static files provided by each application starts to get tricky."

Avatar andrey.lartsev 2 post(s)

I have had the same problem with deployment OSQA application on top of DjangoStack appliance.
The admin interface media files (CSS/JS/imaged) are located at the following path on VA /opt/bitnami/apps/django/lib/python2.6/site-packages/django/contrib/admin/media/
With the default OSQA contribution CSS/JS/image files are expected at the path /admin_media/ like "/admin_media/css/base.css* etc
So that my issue was resolved with adding following Apache rule to the config file /opt/bitnami/apps/django/django.conf

Alias /admin_media/ /opt/bitnami/apps/django/lib/python2.6/site-packages/django/contrib/admin/media/

<Directory /opt/bitnami/apps/django/lib/python2.6/site-packages/django/contrib/admin/media/>
Order allow,deny
Allow from all

Take a look at HTML what generated by your Django project/application and find the virtual path where it expected to find CSS files and write an according rule to the django.conf file.

Avatar Beltrán Rueda Administrator 3,714 post(s)

Thanks for sharing this.