Re: ORM from the command line

2020-04-09 Thread Tim Johnson
Thank you too Adam. Great stuff! On 4/9/20 7:43 AM, Adam Mičuda wrote: Hi, you can also write simple python script and run it in Django context via https://django-extensions.readthedocs.io/en/latest/runscript.html from `django-extensions` package. Best regards. Adam čt 9. 4. 2020 v 17:14

Re: ORM from the command line

2020-04-09 Thread Adam Mičuda
Hi, you can also write simple python script and run it in Django context via https://django-extensions.readthedocs.io/en/latest/runscript.html from `django-extensions` package. Best regards. Adam čt 9. 4. 2020 v 17:14 odesílatel Tim Johnson napsal: > Thank you Andréas. I have come across that t

Re: ORM from the command line

2020-04-09 Thread Tim Johnson
Thank you Andréas. I have come across that too, after my OT. This is definitely what I was looking for. cheers On 4/9/20 2:05 AM, Andréas Kühne wrote: Hi Tim, What you probably should do is use a custom command on the manage.py command interface. You till then get access to all of djangos go

Re: ORM from the command line

2020-04-09 Thread Andréas Kühne
Hi Tim, What you probably should do is use a custom command on the manage.py command interface. You till then get access to all of djangos goodness - and it can be run from the command line. See here: https://docs.djangoproject.com/en/3.0/howto/custom-management-commands/ This is how I would han

ORM from the command line

2020-04-08 Thread Tim Johnson
using django.VERSION (2, 1, 5, 'final', 0) with python 3.7.2 on ubuntu 16.04 I have a need for a "Housekeeping" application. It's usage would be to 1) connect to a database, either mysql, mariadb or postgres 2) truncate two tables and repopulate them based on an arbitrary data structure such