{ "info": { "author": "Pablo Saavedra", "author_email": "pablo.saavedra@treitos.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Framework :: Django", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Introduction\n-------------------------------------------------------------------------------\nRMS (Rule Management System) is a Django app which allow manage several data\nrules in oreder to server then by locale.\n\nInstallation\n-------------------------------------------------------------------------------\n\n\nGetting Django\n==============\n\nPrerequirements\n~~~~~~~~~~~~~~\n\nTip.\n Execute next commands as root. Note that some of the following intrucctions \n are based on YUM. For any other packages manager you should use equivalent \n commmands.\n \n- Base packages needed::\n\n yum install gcc python-devel # in order to compile PIL (Python Image Library)\n yum install python-simplejson.i686\n yum install python-setuptools.noarch\n\n\n-Getting PiP (Python package Index)::\n\n # http://www.pip-installer.org/en/latest/index.html\n curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python\n\n\n- Installing Django::\n\n pip install Django\n\n\n\nGetting RMS Django application\n==============================\n\n- Get a clone of RMS Git repository. \n- Go into local git repository.\n- Install RMS application::\n\n python setup.py install\n \n\n\n\n\n\n\n\nGetting a Django project enviroment for the RMS Django application\n==================================================================\n \n\n\nStarting a Django project enviroment for the RMS Django application\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nExecute as `root` in order to start a Django project::\n\n adduser django\n mkdir /var/local/django\n chown django:django /var/local/django\n su django\n cd /var/local/django\n django-admin.py startproject www_rms\n\n\n\n\nSetting RMS Django application\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n\n- Extra settings availables in `settings.py`::\n\n HTTP_CACHE_CONTROL = 'max-age=600, must-revalidate'\n\n See more about on http://www.web-caching.com/mnot_tutorial/how.html\n\n\n- In `/var/local/django/www_rms/` dir, edit `settings.py` as follow::\n\t\t\n\t\t# Django settings for www_rms project.\n\t\t\n\t\tDEBUG = True\n\t\tTEMPLATE_DEBUG = DEBUG\n\t\t\n\t\tADMINS = (\n\t\t # ('Your Name', 'your_email@example.com'),\n\t\t)\n\t\t\n\t\tMANAGERS = ADMINS\n\t\t\n\t\timport os \n\t\tPROJECT_DIR = os.path.abspath(os.path.dirname(__file__))\n\t\t\n\t\t\n\t\tDATABASES = {\n\t\t 'default': {\n\t\t 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.\n\t\t 'NAME': os.path.join(PROJECT_DIR, 'www_rms.db'), # Or path to database file if using sqlite3.\n\t\t 'USER': '', # Not used with sqlite3.\n\t\t 'PASSWORD': '', # Not used with sqlite3.\n\t\t 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.\n\t\t 'PORT': '', # Set to empty string for default. Not used with sqlite3.\n\t\t }\n\t\t}\n\t\t\n\t\t# Local time zone for this installation. Choices can be found here:\n\t\t# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name\n\t\t# although not all choices may be available on all operating systems.\n\t\t# On Unix systems, a value of None will cause Django to use the same\n\t\t# timezone as the operating system.\n\t\t# If running in a Windows environment this must be set to the same as your\n\t\t# system time zone.\n\t\tTIME_ZONE = 'America/Chicago'\n\t\t\n\t\t# http://www.web-caching.com/mnot_tutorial/how.html\n\t\tHTTP_CACHE_CONTROL = 'max-age=600, must-revalidate'\n\t\t\n\t\t# Language code for this installation. All choices can be found here:\n\t\t# http://www.i18nguy.com/unicode/language-identifiers.html\n\t\tLANGUAGE_CODE = 'en-us'\n\t\t\n\t\tDEFAULT_CHARSET = \"utf-8\"\n\t\t\n\t\tSITE_ID = 1\n\t\t\n\t\t# If you set this to False, Django will make some optimizations so as not\n\t\t# to load the internationalization machinery.\n\t\tUSE_I18N = True\n\t\t\n\t\t# If you set this to False, Django will not format dates, numbers and\n\t\t# calendars according to the current locale\n\t\tUSE_L10N = True\n\t\t\n\t\t# Absolute filesystem path to the directory that will hold user-uploaded files.\n\t\t# Example: \"/home/media/media.lawrence.com/media/\"\n\t\tMEDIA_ROOT = '/var/local/django/www_rms/media/'\n\t\t# MEDIA_ROOT = ''\n\t\t\n\t\t# URL that handles the media served from MEDIA_ROOT. Make sure to use a\n\t\t# trailing slash.\n\t\t# Examples: \"http://media.lawrence.com/media/\", \"http://example.com/media/\"\n\t\tMEDIA_URL = '/media/'\n\t\t\n\t\t# Absolute path to the directory static files should be collected to.\n\t\t# Don't put anything in this directory yourself; store your static files\n\t\t# in apps' \"static/\" subdirectories and in STATICFILES_DIRS.\n\t\t# Example: \"/home/media/media.lawrence.com/static/\"\n\t\tSTATIC_ROOT = '/var/local/django/www_rms/static/'\n\t\t\n\t\t# URL prefix for static files.\n\t\t# Example: \"http://media.lawrence.com/static/\"\n\t\tSTATIC_URL = '/static/'\n\t\t\n\t\t# URL prefix for admin static files -- CSS, JavaScript and images.\n\t\t# Make sure to use a trailing slash.\n\t\t# Examples: \"http://foo.com/static/admin/\", \"/static/admin/\".\n\t\tADMIN_MEDIA_PREFIX = '/static/admin/'\n\t\t\n\t\t# Additional locations of static files\n\t\tSTATICFILES_DIRS = (\n\t\t # Put strings here, like \"/home/html/static\" or \"C:/www/django/static\".\n\t\t # Always use forward slashes, even on Windows.\n\t\t # Don't forget to use absolute paths, not relative paths.\n\t\t # \"/usr/share/pyshared/feincms/static/\",\n\t\t)\n\t\t\n\t\t# List of finder classes that know how to find static files in\n\t\t# various locations.\n\t\tSTATICFILES_FINDERS = (\n\t\t 'django.contrib.staticfiles.finders.FileSystemFinder',\n\t\t 'django.contrib.staticfiles.finders.AppDirectoriesFinder',\n\t\t# 'django.contrib.staticfiles.finders.DefaultStorageFinder',\n\t\t)\n\t\t\n\t\t# Make this unique, and don't share it with anybody.\n\t\tSECRET_KEY = '#yj5q&wq@7g)+5a93pey97ae-ru4p#e-3m)vjjko#ggqjz(^_a'\n\t\t\n\t\t# List of callables that know how to import templates from various sources.\n\t\tTEMPLATE_LOADERS = (\n\t\t 'django.template.loaders.filesystem.Loader',\n\t\t 'django.template.loaders.app_directories.Loader',\n\t\t# 'django.template.loaders.eggs.Loader',\n\t\t)\n\t\t\n\t\tMIDDLEWARE_CLASSES = (\n\t\t 'django.middleware.common.CommonMiddleware',\n\t\t 'django.contrib.sessions.middleware.SessionMiddleware',\n\t\t 'django.middleware.csrf.CsrfViewMiddleware',\n\t\t 'django.contrib.auth.middleware.AuthenticationMiddleware',\n\t\t 'django.contrib.messages.middleware.MessageMiddleware',\n\t\t)\n\t\t\n\t\tROOT_URLCONF = 'www_rms.urls'\n\t\t\n\t\tTEMPLATE_DIRS = (\n\t\t # Put strings here, like \"/home/html/django_templates\" or \"C:/www/django/templates\".\n\t\t # Always use forward slashes, even on Windows.\n\t\t # Don't forget to use absolute paths, not relative paths.\n\t\t # \"/var/local/django/www_rms/templates\",\n\t\t)\n\t\t\n\t\tINSTALLED_APPS = (\n\t\t 'django.contrib.auth',\n\t\t 'django.contrib.contenttypes',\n\t\t 'django.contrib.sessions',\n\t\t 'django.contrib.sites',\n\t\t 'django.contrib.messages',\n\t\t 'django.contrib.staticfiles',\n\t\t # Uncomment the next line to enable the admin:\n\t\t 'django.contrib.admin',\n\t\t # Uncomment the next line to enable admin documentation:\n\t\t # 'django.contrib.admindocs',\n\t\t 'rms',\n\t\t)\n\t\t\n\t\t# A sample logging configuration. The only tangible logging\n\t\t# performed by this configuration is to send an email to\n\t\t# the site admins on every HTTP 500 error.\n\t\t# See http://docs.djangoproject.com/en/dev/topics/logging for\n\t\t# more details on how to customize your logging configuration.\n\t\tLOGGING = {\n\t\t 'version': 1,\n\t\t 'disable_existing_loggers': False,\n\t\t 'handlers': {\n\t\t 'mail_admins': {\n\t\t 'level': 'ERROR',\n\t\t 'class': 'django.utils.log.AdminEmailHandler'\n\t\t }\n\t\t },\n\t\t 'loggers': {\n\t\t 'django.request': {\n\t\t 'handlers': ['mail_admins'],\n\t\t 'level': 'ERROR',\n\t\t 'propagate': True,\n\t\t },\n\t\t }\n\t\t}\n\t\t \n\t\t\n\n- In `/var/local/django/www_rms/` dir, execute::\n\n python manage.py syncdb\n # Follow steps showed by the wizard\n\n- In `/var/local/django/www_rms/` dir,edit `rules.py` as follow::\n\n from django.conf.urls.defaults import patterns, include, url \n from django.conf import settings\n from django.contrib import admin\n \n admin.autodiscover()\n\n urlpatterns = patterns('',\n url(r'^admin/', include(admin.site.urls)),\n url(r'', include('rms.urls')),\n )\n\n\n # if settings.DEBUG:\n if DEBUG:\n urlpatterns += patterns('',\n (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),\n )\n\n\n\nImporting rules from a file with old format \n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- In `/var/local/django/www_rms/` dir, execute:: \n \n cp <>/r-importer.py .\n\n- Put the file with old format rules in `/var/local/django/www_rms/`.\n- Rename file with old rules to `rules.json`\n- Execute `python r-importer.py` command\n \n \n \n \nConfiguring Nginx\n==================\n\nPrerequirements\n~~~~~~~~~~~~~~\n\n- Install Nginx::\n\n yum install nginx\n\n- Install Flup (Random assortment of WSGI servers)::\n\n pip install flup\n\nLaunch RMS Django project as a FastCGI service\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Change to executable the `manage.py` file::\n\n chmod +x /var/local/django/www_rms/manage.py\n \n- Add folling line to `/etc/rc.local`::\n\n su django -c \"/var/local/django/www_rms/manage.py runfcgi \\\n host=127.0.0.1 port=8002 outlog=/dev/null errlog=/dev/null\"\n \n- Read more about this in Django website::\n\n w3m https://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/\n\nSetting Nginx\n~~~~~~~~~~~~\n\nIn `/etc/nginx/conf.d/` dir, add `rms.conf` file as following;:\n\n server {\n\n listen 80;\n \n access_log /var/log/nginx/www_rms.access.log;\n\n location / {\n # host and port to fastcgi server\n fastcgi_pass 127.0.0.1:8002;\n fastcgi_param SERVER_NAME $server_name;\n fastcgi_param SERVER_PORT $server_port;\n fastcgi_param SERVER_PROTOCOL $server_protocol;\n fastcgi_param PATH_INFO $fastcgi_script_name;\n fastcgi_param REQUEST_METHOD $request_method;\n fastcgi_param QUERY_STRING $query_string;\n fastcgi_param CONTENT_TYPE $content_type;\n fastcgi_param CONTENT_LENGTH $content_length;\n\n fastcgi_param REMOTE_ADDR $remote_addr;\n fastcgi_param X-Real-IP $remote_addr;\n fastcgi_param X-Forwarded-For $remote_addr;\n\n fastcgi_pass_header Authorization;\n fastcgi_intercept_errors off;\n \n allow all;\n\n }\n\n location /static/rms/ {\n alias /usr/lib/python2.6/site-packages/django_rms-0.0.0-py2.6.egg/rms/static/rms/;\n break;\n }\n\n location /static/admin/ {\n alias /usr/lib/python2.6/site-packages/django/contrib/admin/media/;\n break;\n }\n\n }\n\n- Restart Nginx service::\n\n service nginx restart\n\n\n- Check if the site is running::\n\n w3m http://localhost:80/admin/\n\n\n\n\nRepository\n-------------------------------------------------------------------------------\n \n * Empty*\n\nReferences\n-------------------------------------------------------------------------------\n *Empty*", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/psaavedra/django-rms/zipball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/psaavedra/django-rms", "keywords": "rule manager django rms", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-rms", "package_url": "https://pypi.org/project/django-rms/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-rms/", "project_urls": { "Download": "https://github.com/psaavedra/django-rms/zipball/master", "Homepage": "http://github.com/psaavedra/django-rms" }, "release_url": "https://pypi.org/project/django-rms/0.0.0/", "requires_dist": null, "requires_python": null, "summary": "Django Rule Management System app", "version": "0.0.0" }, "last_serial": 790507, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "b4d9b1a5ff2393240d70ba0f826dca1b", "sha256": "d1b26c44808da31b67651da74dd6dc6f37a978d5015fb0fea8809b895c653bdc" }, "downloads": -1, "filename": "django-rms-0.0.0.tar.gz", "has_sig": false, "md5_digest": "b4d9b1a5ff2393240d70ba0f826dca1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 88347, "upload_time": "2012-03-17T13:53:39", "url": "https://files.pythonhosted.org/packages/5c/b5/1a23cf8b6d17f321f101e5ad4ab07f330e759fe97f0f6b7a8f9393bb0a66/django-rms-0.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b4d9b1a5ff2393240d70ba0f826dca1b", "sha256": "d1b26c44808da31b67651da74dd6dc6f37a978d5015fb0fea8809b895c653bdc" }, "downloads": -1, "filename": "django-rms-0.0.0.tar.gz", "has_sig": false, "md5_digest": "b4d9b1a5ff2393240d70ba0f826dca1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 88347, "upload_time": "2012-03-17T13:53:39", "url": "https://files.pythonhosted.org/packages/5c/b5/1a23cf8b6d17f321f101e5ad4ab07f330e759fe97f0f6b7a8f9393bb0a66/django-rms-0.0.0.tar.gz" } ] }