Thanks to Andrew's help to get this sorted out. I'm re-telling the solution
here for documentation purposes. Here is how you run a manage.py command
using django-admin.py for an installed opus project.
Assumptions:
the web server runs as user 'apache'
Opus is installed at: /home/bmbouter/src/opus/
The project is deployed at: /var/lib/opus/base/testmigrate/
sudo -u apache env
PYTHONPATH=/home/bmbouter/src/opus/:/var/lib/opus/base/testmigrate/
DJANGO_SETTINGS_MODULE=settings
OPUS_SETTINGS_FILE=/var/lib/opus/base/testmigrate/opussettings.json
django-admin.py shell
Brian
On Mon, Oct 11, 2010 at 1:33 PM, Brian Bouterse <bmbouter(a)gmail.com> wrote:
I tried doing that and it still failed. I have tried:
env PYTHONPATH=/var/lib/opus/base/:/home/bmbouter/src/opus/opus/
django-admin.py --settings=testmigrate.settings shell
AND
env PYTHONPATH=/var/lib/opus/base/:/home/bmbouter/src/opus/opus/
django-admin.py --settings='testmigrate.settings' shell
Unfortunately I still get an:
Unknown command: '--settings=testmigrate.settings'
Brian
On Mon, Oct 11, 2010 at 1:02 PM, Andrew Brown <brownan(a)gmail.com> wrote:
> Make sure python path is set to include both the path to the settings and
> the path to the opus package. Make sure the env var for the opus settings
> path is set. Errors are very misleading, I've had a lot of trouble myself.
> -A
>
> On Mon, Oct 11, 2010 at 12:25 PM, Brian Bouterse <bmbouter(a)gmail.com>wrote:
>
>> I am trying to do something like 'python manage.py dbshell' but
can't
>> seem to do it with an Opus managed project. How do I do this?
>>
>> I already read the 'django-admin help' yet it does not give any clues.
>>
>> I tried several variants of the following: 'django-admin.py
>> --settings=settings'
>>
>> yet all I get is: Unknown command: '--settings'
>>
>> Does anyone know how to do this?
>>
>> Brian
>>
>> --
>> Brian Bouterse
>> ITng Services
>>
>> _______________________________________________
>> Opus-devel mailing list
>> Opus-devel(a)lists.fedorahosted.org
>>
https://fedorahosted.org/mailman/listinfo/opus-devel
>>
>>
>
> _______________________________________________
> Opus-devel mailing list
> Opus-devel(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/opus-devel
>
>
--
Brian Bouterse
ITng Services
--
Brian Bouterse
ITng Services