mirror of
https://github.com/barkeser2002/offline-db.git
synced 2026-09-25 03:40:05 +03:00
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Senpai-YoloBot <41898282+github-actions[bot]@users.noreply.github.com>
12 lines
492 B
Python
12 lines
492 B
Python
import os
|
|
for root, _, files in os.walk('users/migrations'):
|
|
for file in files:
|
|
if file.endswith('.py'):
|
|
path = os.path.join(root, file)
|
|
with open(path, 'r') as f:
|
|
content = f.read()
|
|
if 'users.models.UsernameValidator' in content:
|
|
content = content.replace('users.models.UsernameValidator', 'django.core.validators.RegexValidator')
|
|
with open(path, 'w') as f:
|
|
f.write(content)
|