Changeset 8057 for mauRepo/MolesManager


Ignore:
Timestamp:
11/01/12 10:36:17 (8 years ago)
Author:
mnagni
Message:

relocated the wsgi.py
updated the configuration
added a dependency (existing but missing from the requirements.txt) from psycop2

Location:
mauRepo/MolesManager/trunk
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/resources/MolesManager_wsgi.conf

    r8052 r8057  
    1 <!-- 
    2 WSGIScriptAlias / /path/to/mysite.com/mysite/wsgi.py 
    3 WSGIPythonPath /path/to/mysite.com 
    4 WSGIPythonPath /path/to/your/venv/lib/python2.X/site-packages 
    5 --> 
    6 WSGIScriptAlias / #PATH_TO_DJANGO_PROJECT/wsgi.py 
    7 WSGIPythonPath #PATH_TO_PROJECT 
    8 WSGIPythonPath #PATH_TO_VE_PROJECT_SITE_PACKAGES/site-packages 
     1<VirtualHost *:80> 
     2    ErrorLog /var/log/apache2/PROJECT_NAME_PARError.log 
    93 
     4        # Possible values include: debug, info, notice, warn, error, crit, 
     5        # alert, emerg. 
     6        LogLevel warn 
    107 
    11 <!-- 
    12 <Directory /path/to/mysite.com/mysite> 
    13 --> 
    14 <Directory #PATH_TO_DJANGO_PROJECT> 
    15 <Files wsgi.py> 
    16 Order deny,allow 
    17 Allow from all 
    18 </Files> 
    19 </Directory> 
     8    CustomLog /var/log/apache2/PROJECT_NAME_PAR.log combined 
     9 
     10    WSGIScriptAlias /cov PATH_TO_PROJECT_WSGI/wsgi.py 
     11 
     12    <Directory PATH_TO_DJANGO_PROJECT> 
     13        Order allow,deny 
     14        Allow from all 
     15    </Directory> 
     16</VirtualHost> 
  • mauRepo/MolesManager/trunk/resources/requirements.txt

    r8052 r8057  
    11django==1.3.1 
    22SQLAlchemy==0.7.2 
     3psycopg2==2-2.4.4 
  • mauRepo/MolesManager/trunk/resources/wsgi.py

    r8042 r8057  
    1 ''' 
    2 Created on 22 Dec 2011 
     1import sys 
     2import site 
     3import os 
    34 
    4 @author: mnagni 
    5 ''' 
    6 import os 
    7 os.environ['DJANGO_SETTINGS_MODULE'] = 'MolesManager.settings' 
     5#this is the path to the virtualenv python site-package dir 
     6vepath = 'VEPATH_PAR' 
     7#this is the path to dir parent to the django project  
     8projectPath = 'PATH_TO_DJANGO_PROJECT' 
    89 
    9 # This application object is used by the development server 
    10 # as well as any WSGI server configured to use this file. 
    11 from django.core.handlers.wsgi import WSGIHandler 
    12 application = WSGIHandler() 
     10#this is the project's name 
     11projectName = 'PROJECT_NAME_PAR' 
     12 
     13 
     14# add the site-packages of our virtualenv as a site dir 
     15site.addsitedir(vepath) 
     16 
     17# add the app's directory to the PYTHONPATH 
     18sys.path.append(projectPath) 
     19sys.path.append(projectPath + '/' + projectName) 
     20 
     21os.environ['DJANGO_SETTINGS_MODULE'] = 'PROJECT_NAME_PAR.settings' 
     22 
     23import django.core.handlers.wsgi 
     24application = django.core.handlers.wsgi.WSGIHandler() 
     25 
  • mauRepo/MolesManager/trunk/src/MolesManager/settings.py

    r8054 r8057  
    142142            'level': 'ERROR', 
    143143            'class': 'django.utils.log.AdminEmailHandler' 
    144         }, 
    145         'mmlog':{ 
    146             'level':'DEBUG', 
    147             'class':'logging.FileHandler', 
    148             'filename': os.path.join(SITE_ROOT, 'MolesManager.log') 
    149144        } 
    150145    }, 
     
    153148            'handlers': ['mail_admins'], 
    154149            'level': 'ERROR', 
    155             'propagate': True, 
    156         }, 
    157         'myproject.custom': { 
    158             'handlers': ['mmlog'], 
    159             'level': 'DEBUG', 
    160150            'propagate': True, 
    161151        } 
Note: See TracChangeset for help on using the changeset viewer.