Dump existing data:
python3 manage.py dumpdata > datadump.json
Change settings.py to Postgres backend.
Make sure you can connect on PostgreSQL. Then:
/* | |
MongoDB: Find by regular expression and run regex replace on results | |
*/ | |
db.test.find({"url": { $regex: 'http:\/\/' }}).forEach(function(doc) { | |
doc.url = doc.url.replace(/http:\/\/www\.url\.com/g, 'http://another.url.com'); | |
db.test.save(doc); | |
}); |
""" | |
Usage: | |
Make sure that redis is running on localhost (or adjust the url) | |
Install uvicorn or some other asgi server https://asgi.readthedocs.io/en/latest/implementations.html | |
pip install -u uvicorn | |
Install dependencies |