>
> If I pull out the contents out of nektra_coinfabrik/nektra_coinfabrik
> into /nektra_coinfabrik it somehow works but the admin is broken (cannot
> login, no styles).
>

That's because the path is wrong. Gunicorn is trying to import
`./nektra_coinfabrik/wsgi.py` from the current directory, but the correct
relative path is `./nektra_coinfabrik/nektra_coinfabrik/wsgi.py`. However,
simply changing the line to
`nektra_coinfabrik.nektra_coinfabrik.wsgi:application` probably wont work
because the outer nektra_coinfabrik directory is probably not a python
package and regardless your application probably depends on the package
directory being added to the python path. So I would try adding the to your
gunicorn flags
`--pythonpath="/home/david/nektra_coinfabrik/nektra_coinfabrik,"`.

As for the admin being broken, you're probably not doing anything to serve
static assets. The django development server does this by default but
you'll have to come up with your own solution in production. The ideal way
is to serve them with your production server (e.g., nginx, apache, etc.)
but the python package dj-static is probably sufficient to start with.

On Fri, Sep 16, 2016 at 3:21 PM, <dznek...@gmail.com> wrote:

> Hi,
>
> I'm trying to run mezzanine on gunicorn, but cannot configure the
> gunicorn.conf file correctly, I tried to change the path to .sock and to
> wsgi:application without success.
>
> I get the error "ImportError: No module named wsgi". Gunicorn does't find
> the wsgi file.
>
> Development server works fine with nginx for static files.
>
> My file structure was created with the mezzanine-project command. It's a
> multi-tenancy project.
>
> If I pull out the contents out of nektra_coinfabrik/nektra_coinfabrik
> into /nektra_coinfabrik it somehow works but the admin is broken (cannot
> login, no styles).
>
> Is there a way to configure the gunicorn.conf so I don't have to change my
> file structure?
>
> Find attached files.
>
> Thanks!
>
> David
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to