No, it isn't a matter of browser cache.
Let's narrow the problem focusing on the linux machine only where there's myapp and the apache2 server.
If I run my app via "python manage.py runserver
192.168.100.100:8000" it all works correctly:
"GET /warehouse/warehouse/invoice/ HTTP/1.1" 200 2145
"GET /warehouse/jsi18n/ HTTP/1.1" 200 2005
"GET /warehouse/warehouse/invoice/5/ HTTP/1.1" 200 22551
"GET /warehouse/warehouse/items/?t=code&_popup=1 HTTP/1.1" 200 21793
and the correct select popup window's shown.
Whilst, *** using the same settings.py file ***, and Apache2 (see the enabled-site conf file below) in production I get a change popup window only and a nasty
/?e=1 appears at the and of the http called page.
Please help, I'm really stranded here.
Thanks a lot
Vittorio
=====================================
#settings.py
import os
ABSOLUTE_PATH='%s/' % os.path.abspath(os.path.dirname(locals.__name__)).replace('\\','/')
DEBUG = True
ALLOWED_HOSTS=['*']
ADMINS = (
('Amministratore', '
wa...@gmail.com'),
)
EMAIL_USE_TLS = True
EMAIL_HOST = '
smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = '
wa...@gmail.com'
EMAIL_HOST_PASSWORD = 'AbsolutelyFake99'
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',#, 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'warehouse', # Or path to database file if using sqlite3.
'USER': 'mycompany', # Not used with sqlite3.
'PASSWORD': 'mycompany', # Not used with sqlite3.
'HOST': '127.0.0.1', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
},
'noematica': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'noematica', # Or path to database file if using sqlite3.
'USER': 'mycompany', # Not used with sqlite3.
'PASSWORD': 'mycompany', # Not used with sqlite3.
'HOST': '127.0.0.1', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
},
}
TIME_ZONE = 'Europe/Rome'
LANGUAGE_CODE = 'it-it'
DECIMAL_SEPARATOR=','
THOUSAND_SEPARATOR='.'
SITE_ID = 1
USE_I18N = True
USE_L10N = True
USE_TZ = True
MEDIA_ROOT=''
MEDIA_URL = '/media/'
STATIC_ROOT = ''
STATIC_URL = '/static/'
STATICFILES_DIRS = (
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)
SECRET_KEY = 'b(%_qs2$sk3_ht&+@9+6=%t1ff$ey@f9$rrydsqw&r$-z)xbk%*'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
)
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '
127.0.0.1:11211',
}
}
MIDDLEWARE_CLASSES = (
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.gzip.GZipMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
)
ROOT_URLCONF = 'mywh.urls'
WSGI_APPLICATION = 'mywh.wsgi.application'
TEMPLATE_DIRS = (
'/home/wh/mywh/mywh/templates',
)
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs',# 'south',
'warehouse',
'noematica',
)
DATABASE_ROUTERS = ['warehouse.DBRouter.DBRouter']
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',
'propagate': True,
},
}
}
================================================
#enabled-sites/django.conf
Listen 8000
WSGIScriptAlias / /home/wh/mywh/django.wsgi
WSGIPythonPath /home/wh/mywh
<VirtualHost
192.168.1.19:8000>
LogLevel warn
DocumentRoot /home/wh/mywh/mywh
AliasMatch ^/([^/]*\.css) /home/wh/mywh/mywh/static/
AliasMatch ^/itemslist/(.*)\.png$ /home/wh/mywh/mywh/media/$1.png
AliasMatch ^/([^/]*\.png) /home/wh/mywh/mywh/media/
Alias /media/ /home/wh/mywh/mywh/media/
Alias /static/ /home/wh/mywh/mywh/static/
Alias /templates/ /home/wh/mywh/mywh/templates/
<Directory /home/wh/mywh/mywh/static>
Order deny,allow
Allow from all
Require all granted
</Directory>
<Directory /home/wh/mywh/mywh/media>
Order deny,allow
Allow from all
Require all granted
</Directory>
<Directory /home/wh/mywh/mywh/templates>
Order deny,allow
Allow from all
Require all granted
</Directory>
ServerAdmin webmaster@localhost
....
<Directory /home/wh/mywh/>
<Files django.wsgi>
Order deny,allow
Allow from all
Require all granted
</Files>
</Directory>
</VirtualHost>