Peter Rowell schrieb:
> Are you asking how to run a standalone Django script? If so, the
> following gives you a fully initialized Django environment.
>
>
No, I want to run a python script if a database table gets created. The
static sql/mymodel.sql files are not enough for my case.
I found th
Are you asking how to run a standalone Django script? If so, the
following gives you a fully initialized Django environment.
standalone_script.py
#!/usr/bin/env python
from django.core.management import setup_environ
import settings
setup_environ(settings)
# Your python/Django cod
Hi,
how can I insert initial data from a script? Static SQL files don't work
for my case.
Background: I need to load some SQL (tsearch2 (postgresql)) if the
database version
is smaller than 8.3 ...
Thomas
--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler
3 matches
Mail list logo