Categories
Database Development

Replace a sequential set of numbers with special character

I have a varchar(200) column that contains entries such as, ABC123124_A12312 ABC123_A1212 ABC123124_B12312 AC123124_AD12312 A12312_123 etc.. I want to replace a sequence of numbers with a single * so that I can group the distinct non-numeric patterns in the table. The result for this set would be ABC*_A* ABC*_B* AC*_AD* A*_* I have written the […]

Categories
Development Heroku

Example for customizing the ignored pattern list in Django’s collectstatic

Like other questions here, I want to ignore my .scss files when running collectstatic. But because I’m using Heroku, which runs a collectstatic automatically, I would rather customize collectstatic‘s ignore pattern list rather than change the management command. Django 2.2 provides a way to do this, as documented below: The default ignored pattern list, [‘CVS’, […]