[Django]-Hosting Admin Media Locally During Development

1👍

If you’re running Grappelli, you can set the admin media when using runserver by specifying the command line argument --adminmedia. Here is an example:

python manage.py runserver --adminmedia=/path/to/grappelli/media

Where /path/to/grappelli/media is the complete path to your Grappelli installation’s media directory.

0👍

You don’t need to specifically serve the admin media while using the development server – this should happen automatically.

0👍

  • I think it is simpler to just symlink in your local system to the django admin media, the same directory that you use in production, than to subject to a lot of if PRODUCTION within settings.

  • As Daniel rightly pointed out, django serves admin media by default. Anymore configuration is not required. So the problem is perhaps something different. Try chmod 777 on the templates directory, It may fix the problems.

👤lprsd

Leave a comment