Tag: django

Managing Django Static Files on Heroku

Deploying and running Django apps on Heroku is really a no-brainer, except for one thing — serving static files via collectstatic. I run collectstatic as usual, using heroku run command just like how I did it for syncdb. It worked but I’m getting 404 error when serving static files. It turns out that running collectstatic via […]

Django “Global” Template Variable

Depending on the project you are working on, you might want to access one or more template variables across all your templates like the User object. If you are making news or blog project, one example would be navigation bar item, say a category list. You might be tempted to pass the category list from […]