Question

I have overrided the Django's Flatpages application and write my own Flatpages application. Django Oscar project is importing Flatpage Model with get_model method.

FlatPage = get_model('flatpages', 'FlatPage')

when i run development server

python manage.py runserver 0.0.0.0:80

it imports my Flatpage application but when i use uwsgi-nginx server it imports Django's own flatpage application.

It is also same, importing Django's Flatpage when i do not use nginx and use gunciorn.

gunicorn dhr.wsgi:application -b 0.0.0.0:80

Any ideas?

Was it helpful?

Solution

The problem is most likely a path issue. Add a debugging statement that prints out the result of os.getcwd() and sys.path. Try making your path under uwsgi / gunicorn more similar to development.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top