django-planet

Feed: Django on Matt Layman

Recent content in Django on Matt Layman

Blog Matt Layman
RSS 2.0 Feed Django on Matt Layman
web https://www.mattlayman.com/tags/django/
Last Update11.20.2024
Posts336

Configurama - Building SaaS #36

Oct. 30, 2019 » Django on Matt Layman » [Archived Version]

In this episode, we turned our attention to handling settings and configuration. We discussed different techniques for handling settings, looked at available tools, and started integrating one of the tools into the project. The initial discussion in the stream focused on different ways of doing settings. I talked about what I view as a difference between configuration (mostly static stuff) and settings (dynamic parts of the app). I also discussed where to get settings from.

Read More

Deploying WhiteNoise - Building SaaS #35

Oct. 23, 2019 » Django on Matt Layman » [Archived Version]

In this episode, we updated Continuous Integration, Nginx, and the Ansible deployment tasks to use WhiteNoise. With all the changes in place, we tested things out to verify that WhiteNoise served up the CSS, JS, and image files. We started with Circle CI. First, I fixed the JS assets cache because the cache key never changed and Circle did not save fresh assets each build. After completing the assets cache, I created a new cache that stored all the static files after running collectstatic.

Read More

Bring in the WhiteNoise, Bring in Da Funk - Building SaaS #34

Oct. 2, 2019 » Django on Matt Layman » [Archived Version]

In this episode, we added WhiteNoise to the app as a tool for handling static assets. This lets us move away from depending on Nginx for the task and gives shiny new features like Brotli support. We installed WhiteNoise into the requirements.in file and used pip-tools to generate a new requirements.txt. whitenoise[brotli]==4.1.4 Once WhiteNoise was installed, it needed two primary settings changes. Add a new middleware. Change the STATICFILES_STORAGE. MIDDLEWARE = [ .

Read More

Webpack and collectstatic in CI - Building SaaS #28

July 25, 2019 » Django on Matt Layman » [Archived Version]

In this episode, we updated Continuous Integration (CI) to run webpack and the Django collectstatic command. This is part of the ongoing effort to simplify deployment by moving work to CI.

Read More

Connecting Shiv Apps with Ansible - Building SaaS #26

July 4, 2019 » Django on Matt Layman » [Archived Version]

In this episode, we finished connecting the Django Shiv app into Ansible. This required messing with file permissions and copying settings files to their proper place.

Read More

It's Permissions, Dummy! - Building SaaS #25

June 27, 2019 » Django on Matt Layman » [Archived Version]

In this episode, we got into a static files problem that caused a template to fail to load from the Shiv app. After some serious spelunking through the Django code and deep debugging, we found the file permission error that was the source of the problem.

Read More

In the Guts of a Shiv App - Building SaaS #24

June 20, 2019 » Django on Matt Layman » [Archived Version]

In this episode, we got our hands dirty with the Django Shiv app that we build to work out issues with finding templates and other settings problems.

Read More

Making a Shiv App - Building SaaS #20

April 25, 2019 » Django on Matt Layman » [Archived Version]

In this episode, we took our Python package from the previous episode and bundled it together with the Python dependencies using a tool called Shiv from LinkedIn.

Read More

Completing Account Deactivation on Building SaaS with Python and Django

April 18, 2019 » Django on Matt Layman » [Archived Version]

In the latest episode of Building SaaS with Python and Django, we completed the account deactivation workflow of the Django app. This included: Canceling the subscription with Stripe. Marking the user as inactive. Sending the user to a friendly page to indicate that their account is deactivated. The recording is available on YouTube and the full transcript is below.

Read More

Pip-tools and App Packaging - Building SaaS #19

April 18, 2019 » Django on Matt Layman » [Archived Version]

In this episode, we started by improving our requirements.txt handling with pip-tools. Then we cleaned things up and began turning the app into a Python package.

Read More