-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
=
committed
Aug 2, 2024
1 parent
fdf4501
commit f8fc404
Showing
6 changed files
with
96 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 5.0.7 on 2024-08-02 19:52 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('auctions', '0136_alter_lot_banned_alter_lot_partial_refund_percent'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='userlabelprefs', | ||
name='preset', | ||
field=models.CharField(choices=[('sm', 'Small (Avery 5160)'), ('lg', 'Large (Avery 18262)'), ('thermal_sm', 'Thermal 3"x2"'), ('custom', 'Custom')], default='lg', max_length=20, verbose_name='Label size'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
update_file() { | ||
local file="$1" | ||
local search="$2" | ||
local replace="$3" | ||
local additional="$4" | ||
|
||
if grep -qF "$search" "$file"; then | ||
sed -ri "/$search/,+$additional c $replace" "$file" | ||
else | ||
echo "Unable to find the text $search in $file, update python_file_hack.sh" | ||
exit 1 | ||
fi | ||
} | ||
|
||
# this is a hack to overwrite Django's broken TZ stuff that causes errors (500 page) to fail. See https://code.djangoproject.com/ticket/33674 | ||
FILE="/usr/local/lib/python3.11/site-packages/django/templatetags/tz.py" | ||
SEARCH=" with timezone.override(self.tz.resolve(context)):" | ||
REPLACE="\ try:\n with timezone.override(self.tz.resolve(context)):\n output = self.nodelist.render(context)\n return output\n except:\n return self.nodelist.render(context)" | ||
update_file "$FILE" "$SEARCH" "$REPLACE" "2" | ||
|
||
|
||
# Reportlab causes certain label settings to throw an error | ||
# https://github.com/virantha/pypdfocr/issues/80 | ||
FILE="/usr/local/lib/python3.11/site-packages/reportlab/platypus/paragraph.py" | ||
SEARCH=" if availWidth<_FUZZ:" | ||
REPLACE="\ # removed\n" | ||
update_file "$FILE" "$SEARCH" "$REPLACE" "2" | ||
|