Question

I have a django-grappelli site running on Apache 2.2 using mod_wsgi 3.3 as middleware. And I am having two problems

When I try to delete a registry entry, it just do not make anything... Also, the popup windows are not opening. It opens on the same page. Can somebody help me?

These problems are happening only on the production site (deployed on Apache)

The configurations I am using are the following:

  • Operating system: Windows 7 professional Edition
  • Apache version: 2.2
  • Django version: 1.4.2
  • Grappelli version: 2.4.2
  • Python version: 2.7
  • WSGI vversion: 3.3 win32 for python 2.7

    ==========================================

    httpd.conf:

    WSGIScriptAlias / "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/OdontoWeb/default.wsgi"


    Order deny,allow Allow from all

    Alias /grappelli "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/OdontoWeb/grappelli"

    Order allow,deny Allow from all

    SetHandler None

    ==========================================

    .htaccess:

    RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /site.wsgi/$1 [QSA,PT,L]

    ==========================================

Was it helpful?

Solution

I solve the problem.

CAUSE: When deploying the projectI was placing the folders "admin", "Grappelli" and "templates" in the project root, and setting the variable STATIC_URL on the source "settings.py" with the value '/'.

Then some javascripts could not be accessed.

SOLUTION: To solve the problem, I set the variable STATIC_URL with the value '/static/' and put the three folders within a folder called static in the production version. Hence, all functions started to operate. :D

P.S.: I also edited httpd.conf with these config:

Alias /static "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/OdontoWeb/static"

<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/OdontoWeb/static">
    Order allow,deny
    Allow from all
</Directory>

<Location "/static">
    SetHandler None
</Location>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top