{ "info": { "author": "Ivan Gromov", "author_email": "ivan.gromov@redsolution.ru", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Natural Language :: English", "Natural Language :: Russian", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Site Management" ], "description": "====================\ndjango-server-config\n====================\n\n- Adds management command to make configs for your project.\n Now it can generate config for lighttpd, logrotate, monit and deploy scripts.\n- Automatically recognizes media directories in 3-party applications and takes them into account.\n\nInstallation:\n=============\n\nIn settings.py:\n---------------\n\n1. Put ``config`` to your ``INSTALLED_APPS``.\n\n2. Set domain names for your project ::\n\n CONFIG_SITES = ['www.project-name.com', ]\n\n3. Domains for which you want redirects to your site ::\n\n CONFIG_REDIRECTS = ['project-name.com', ]\n\n4. Serving static files\n\n Set path to media for unusual 3-party application ::\n\n CONFIG_APP_MEDIA = {\n 'application-name': [\n ('media-root', 'media-url', ),\n ]\n }\n\n Media folders with same name as application modulde will be added automatically.\n For example, in ``tinymce`` module media files ::\n\n tinymce/\n media/\n tinymce/\n js/tinymce.js\n css/style.css\n \n will be available at url::\n\n /media/tinymce/js/tinymce.js\n /media/tinymce/css/style.js\n\n**Stop! Aren't Django staticfiles do that?**\n\nYes, they do. But django-servre-config is older than staticfiles and does same job. This feature will is deprecated and will not be supported since 0.2.x release. We recommend to use Django contrib application ``django.contrib.statifiles``. Read below about how to do it.\n\nIn urls.py:\n-----------\n\n5. If you use ``django-server-config`` for serving static media, add following code to the urls.py for serve static files in debug mode. Add it BEFORE ``django.views.static.serve`` ::\n\n if settings.DEBUG:\n urlpatterns += patterns('', (r'^', include('config.urls')))\n\n\nIn buildout.cfg:\n----------------\n\n6. If you are using zc.buildout, you can add to your parts ``make-config`` to make config files automaticaly::\n\n [make-config]\n recipe = iw.recipe.cmd\n on_install = true\n on_update = true\n cmds = sudo rm -f bin/init.d bin/lighttpd bin/logrotate bin/monit bin/*.py\n bin/django make_config init.d > bin/init.d\n bin/django make_config lighttpd > bin/lighttpd\n bin/django make_config logrotate > bin/logrotate\n bin/django make_config monit > bin/monit\n # Enable backups with duply & duplicity (http://duplicity.nongnu.org)\n bin/django make_config duply_conf > bin/duply_conf\n bin/django make_config duply_pre > bin/duply_pre\n bin/django make_config duply_post > bin/duply_post\n bin/django make_config duply_exclude > bin/duply_exclude \n\n # Collect static automaticaly\n sudo rm -Rf static\n bin/django collectstatic -l ---noinput\n sudo chown www-data:www-data -R static\n \n bin/django make_config install.py > bin/install.py\n bin/django make_config uninstall.py > bin/uninstall.py\n bin/django make_config enable.py > bin/enable.py\n bin/django make_config disable.py > bin/disable.py\n \n sudo chown root:root bin/*\n sudo chmod ug=rw,o=r bin/*\n sudo chmod ug=rwx,o=rx bin/init.d bin/django bin/buildout\n echo Configs were saved to \"bin/\"\n\n**Without bulidout**\n\nIf you are not using zc.buildlout, you can add to repository shell script with commands above, it will give same effect.\n\n\nStaticfiles support\n====================\n\nSince 0.1.1 server-config supports ``django.contrib.staticfiles`` and ``staticfiles`` apps. If one of them present in ``INSTALLED_APPS``, config for webserver will be generated with appropriate rewrite rule.\n\nIf ``staticfiles`` is used there is no need to include ``config.urls`` in ``urlconf.py``. On the other hand, probably you will want to include ``staticfiles_urlpatterns()`` from staticfiles app (see: `django documentation `_ about it) ::\n\n from django.contrib.staticfiles.urls import staticfiles_urlpatterns\n urlpatterns += staticfiles_urlpatterns()\n\nDuply/Duplicity backups\n=======================\n\nDjango-server-config can automatically create backups configuration files.\nIt supports `duply `_ (`duplicity `_) configuration scheme.\nDuplicity is backup system written in python and using rsync algorithm and Duply is bash configuration wrapper for Duplicity.\n\nBackup settings\n----------------\n\n**Security Note**\n\nTo start using backups you should specify path to main configuration file for duply. Django-server-config expects file in ``*.ini`` format. This file \ncan contains secret passwords, so file supposed to be located somewhere in ``/etc/duply/conf.ini`` and belongs to root (superuser).\n\nBACKUP_DUPLY_CONFIG\n Path to duply configuration file\nBACKUP_TEMP_DIR\n Temp directory, where database backups will be located. Database dumps will be deleted from file system after each backup session. Default value: ``'/var/backups/postgres'``\n\n**Only PostgreSQL database backups are supported!**\n\nDuply configuration file\n-------------------------\n\nIt is quite simple to configure duply.\nYou can create duply initial config simply from command line:::\n\n duply create\n\nThen look at ~/.duply//conf and follow comments.\n\nMoreover, you can use ours config template::\n\n [duply]\n GPG_PW='**********'\n TARGET='s3+http://**********@com.mycompany.server/'\n SOURCE='/'\n MAX_AGE=1M\n MAX_FULL_BACKUPS=5\n MAX_FULLBKP_AGE=1W\n VOLSIZE=50\n DUPL_PARAMS=\"$DUPL_PARAMS --full-if-older-than $MAX_FULLBKP_AGE --volsize $VOLSIZE \"\n\nThis template encrypts backups with GPG and uplaod to AmazonS3 bucket ``com.mycompany.server``.\n\nPay attention to the ``TAGET`` option. Django-server-config will **automatiocally** add project_name to ``TARGET``. E.g. rendered config will contain value::\n\n TARGET = s3+http://**********@com.mycompany.server/\n\nConsider trailing slash in ``*.ini`` config, django-server-config adds only ``myproject`` without slash.\n\nHistory\n========\n\n* 0.1.0 - Initial commit\n* 0.1.1 - Staticfiles support added\n* 0.1.2 - Duply backups support\n* 0.1.3 - Emergency lighttpd config fix (staticfiles didn't work), don't use v0.1.1!\n - Fixed work without staticfiles\n\n\nClassifiers:\n-------------\n\n`Utilities`_\n\n.. _`Utilities`: http://www.redsolutioncms.org/classifiers/utilities", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "django config lighttpd apache monit", "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "django-server-config", "package_url": "https://pypi.org/project/django-server-config/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-server-config/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/django-server-config/0.1.3/", "requires_dist": null, "requires_python": null, "summary": "Useful for deploy server installation. \nAdds management command to make configs for your project. \nAutomatically recognizes media directories in 3-party applications", "version": "0.1.3" }, "last_serial": 790576, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "a2f62e0cdb7d829f1d1a9b02a120e999", "sha256": "eacc2db62b5ccf3da4777e23a77cb6cc8c0dc64a3827b10adc3c62305da954be" }, "downloads": -1, "filename": "django-server-config-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a2f62e0cdb7d829f1d1a9b02a120e999", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13880, "upload_time": "2011-07-27T14:20:38", "url": "https://files.pythonhosted.org/packages/cb/76/cc55d5f7f882bf949bd3595d4a77c1f8293133faf775cf37a57b10d6b89a/django-server-config-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "2e1609f983a39da57edce9f9d55f1987", "sha256": "5bcebd9c585e738c9c656d654809362b27b5d711b84c601e3dd1c8fa34543c0d" }, "downloads": -1, "filename": "django-server-config-0.1.2.tar.gz", "has_sig": false, "md5_digest": "2e1609f983a39da57edce9f9d55f1987", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16734, "upload_time": "2011-07-28T15:20:29", "url": "https://files.pythonhosted.org/packages/f0/b3/3ec4b2aff0b8ae6817ce060c930ebf8af119751a9eeab57d29b68c3aa4b2/django-server-config-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "2b273ec75897e31cb97e0c4b88bbc70d", "sha256": "d66bf3ec68d93fdcdfa64f71deee6dfb1d6e6d60b6c4fe4867061b3dfdc656bb" }, "downloads": -1, "filename": "django-server-config-0.1.3.tar.gz", "has_sig": false, "md5_digest": "2b273ec75897e31cb97e0c4b88bbc70d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12005, "upload_time": "2011-09-06T06:25:55", "url": "https://files.pythonhosted.org/packages/65/46/290a01c32806e697e533795d1223128f0b6ba37dcf26fa4b50b205f92ad7/django-server-config-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2b273ec75897e31cb97e0c4b88bbc70d", "sha256": "d66bf3ec68d93fdcdfa64f71deee6dfb1d6e6d60b6c4fe4867061b3dfdc656bb" }, "downloads": -1, "filename": "django-server-config-0.1.3.tar.gz", "has_sig": false, "md5_digest": "2b273ec75897e31cb97e0c4b88bbc70d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12005, "upload_time": "2011-09-06T06:25:55", "url": "https://files.pythonhosted.org/packages/65/46/290a01c32806e697e533795d1223128f0b6ba37dcf26fa4b50b205f92ad7/django-server-config-0.1.3.tar.gz" } ] }