DEV Community

Cover image for Part 2- An in-depth video tutorial on deploying a Django application with static file serving
Shobi
Shobi

Posted on

1 3

Part 2- An in-depth video tutorial on deploying a Django application with static file serving

Django is the most popular Python-based web framework for a while now. Django is powerful, robust, full of capabilities and surrounded by a supportive community.

In this video, we are going to take a look into how to set up static file serving in our app, such as CSS, javascript, images etc... in our simple Django application. which we built and deployed in Part 1 of the series

Static files on Django should be served by nginx directly rather than our Django app. So you need to add a few lines to your nginx configuration, to tell where your static files are. I have tried to explain things neatly in this video. feel free to as any doubts.

Let me know the suggestions, thoughts & the doubts in the comments. Subscribe to the channel & Share this with your friends & colleagues

Link to sample application repo with static files already setup: https://github.com/ShobiExplains/AwsDemo/releases/tag/v0.0.2

Nginx Configuration for reference: https://github.com/ShobiExplains/AwsDemo/blob/master/django.conf

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Heroku

This site is powered by Heroku

Heroku was created by developers, for developers. Get started today and find out why Heroku has been the platform of choice for brands like DEV for over a decade.

Sign Up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay