[Django]-New Project is not recognize by the Bitnami Django Stack server

2👍

You have to modify 2 file in the apache server

/opt/bitnami/apache2/conf/bitnami/bitnami-apps-prefix.conf

you will see somehitng like this:

# Bitnami applications installed in a prefix URL

Include "/opt/bitnami/apps/django/django_projects/Project/conf/httpd-prefix.conf"

there you have to include the path of the httpd-prefix.conf that you create in your project.

Include "/opt/bitnami/apps/django/django_projects/YourProject/conf/httpd-prefix.conf"

Change YourProject for the name of your proyect and you have to delete the “include” that points to Project, otherwise you have to config:

/opt/bitnami/apps/django/django_projects/Project/conf/bitnami-apps-vhosts.conf

for multiple sites.

Final file look like this:

# Bitnami applications installed in a prefix URL

Include "/opt/bitnami/apps/django/django_projects/Host/conf/httpd-prefix.conf"

In the file:

/opt/bitnami/apps/django/django_projects/YourProject/conf/httpd-app.conf

add this:

Alias /static "/opt/bitnami/apps/django/lib/python2.7/site-packages/Django-1.8.7-py2.7.egg/django/contrib/admin/static"
WSGIScriptAlias / '/opt/bitnami/apps/django/django_projects/YourProject/YourProject/wsgi.py'

Then

If you installed BitNami Django stack as root or if you are using a virtual machine or cloud image, use sudo for installing the requirements and start the server:

$ cd mysite
$ sudo pip install -r requirements.txt

*/ Config your Database in settings.py */ https://wiki.bitnami.com/Components/Django

$ python manage.py syncdb
$ sudo /opt/bitnami/ctlscript.sh restart apache

Here more info:

https://www.youtube.com/watch?v=6kknDPGYr3I

https://community.bitnami.com/t/installing-pinax-on-djangostack-virtual-machine/3286/7

👤unixeo

1👍

As per the Bitnami Django Link which you’ve shared,

There’s no step for including the app name in INSTALLED_APP in settings.py.

You must register the app name, else the URL which you’ve configured as Controller will not be utilized.

I hope this will fix for you.

Solution

1👍

Bitnami developer here.

The issue is related with python path.
For UNIX, you should add these lines at the beginning of
httpd-app.conf file:

WSGIDaemonProcess wsgi-djangostack processes=2 threads=15 display-name=%{GROUP} python-path=/Path-to-the-project/

And then, restart Apache.

In your case (Windows), you should add this line add the end of you installdir\apache2\conf\httpd.conf:

WSGIPythonPath "C:/Users/JuanPablo/Bitnami Django Stack projects/SevenERP"

And restar Apache.

I hope it helps

Leave a comment