Ticket #12 (new defect)

Opened 11 months ago

Last modified 11 months ago

Don't work script: add_random_product_catalog.py

Reported by: dixon Owned by: alex
Priority: major Milestone:
Component: admin Version:
Keywords: script Cc:

Description

I have some problem with add_random_product_catalog.py

dixon@appserver ~/dev/demo.djwarehouse.org/djw/custom/bin $ ./add_random_product_catalog.py
Traceback (most recent call last):
  File "./add_random_product_catalog.py", line 5, in <module>
    from django.contrib.sites.models import Site
  File "/usr/lib64/python2.5/site-packages/django/contrib/sites/models.py", line 1, in <module>
    from django.db import models
  File "/usr/lib64/python2.5/site-packages/django/db/__init__.py", line 10, in <module>
    if not settings.DATABASE_ENGINE:
  File "/usr/lib64/python2.5/site-packages/django/conf/__init__.py", line 28, in __getattr__
    self._import_settings()
  File "/usr/lib64/python2.5/site-packages/django/conf/__init__.py", line 57, in _import_settings
    raise ImportError("Settings cannot be imported, because environment variable %s is undefined." % ENVIRONMENT_VARIABLE)
ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
dixon@appserver ~/dev/demo.djwarehouse.org/djw/custom/bin $     

Change History

Changed 11 months ago by alex

  • owner changed from alex@… to dixon@…

pls try this:

 cd /dev/demo.djwarehouse.org/djw/custom/bin
 . set-project-env
 ./add_random_product_catalog.py

does it help?

Changed 11 months ago by dixon

  • owner changed from dixon@… to alex

No.

dixon@appserver ~/dev/demo.djwarehouse.org/djw/custom/bin $ cp example-set-project-env set-project-env
dixon@appserver ~/dev/demo.djwarehouse.org/djw/custom/bin $ ./add_random_product_catalog.py
Traceback (most recent call last):

Do I need edit this file?

Note: See TracTickets for help on using tickets.