{ "info": { "author": "Tim Santor", "author_email": "tsantor@xstudios.agency", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "Django Fabric Tasks\n===================\n\nAuthor: Tim Santor tsantor@xstudios.agency\n\nOverview\n========\n\nThese generic tasks are for use on internal X Studios Django projects.\nThese tasks pair perfectly with our `Cookiecutter\nDjango `__\nstarter project.\n\nProject Structure\n=================\n\nIn order to make these tasks reusable without a ton of parameters, etc.\na portion of these commands assume a local/remote project structure as\nfollows:\n\n::\n\n my-project/ # Top-level project dir (any name)\n \u251c\u2500\u2500 fabfile.py # Our fabfile\n \u251c\u2500\u2500 logs/ # Contains our application/server logs\n \u251c\u2500\u2500 manage.py\n \u251c\u2500\u2500 media/ # Contains our media files (user uploads)\n \u251c\u2500\u2500 requirements.txt # Our `pip freeze > requirements.txt` file\n \u251c\u2500\u2500 app/ # Contains our app and its modules\n \u2514\u2500\u2500 static_collection/ # Contains our collected static files\n\n Note: We setup all our Django projects in the same manner for\n consistency and start from this\n `cookiecutter `__\n tempate.\n\n Note: ``media`` and ``static_collection`` (or whatever you wish to\n name them) are assumed to live on the same physical server as the\n Django project. This is because we typically do not serve\n media/static files from Amazon S3 or another solution.\n\nInstallation\n============\n\nTo install Django Fabric Tasks, simply run the following within your\nvirtualenv:\n\n::\n\n pip install django-fabtasks\n\nCreate fabfile.py\n=================\n\nIn your project root, create ``fabfile.py`` with the following contents:\n\n::\n\n import os\n\n # 3rd Party\n from fabric.api import *\n from contextlib import contextmanager\n\n import fabtasks.development as dev\n import fabtasks.production as prod\n from fabtasks.context import virtualenv\n\n # -----------------------------------------------------------------------------\n # Config\n # -----------------------------------------------------------------------------\n\n # Base env config\n env.colorize_errors = True\n env.package_name = 'PACKAGE_NAME'\n env.repository = 'REPO_URL'\n env.db_user = 'DB_USER'\n env.db_name = 'DB_NAME'\n env.virtualenv_dir = 'VIRTUALENV_DIR'\n env.activate = '/root/.virtualenvs/VIRTUALENV_DIR/bin/activate'\n env.apache_restart_command = 'apache_restart'\n\n # Local env\n env.local_group = 'staff'\n env.local_project_root = os.getcwd()\n env.local_static_root = os.path.join(os.getcwd(), 'static_collection', '')\n env.local_media_root = os.path.join(os.getcwd(), 'media', '')\n\n\n @task\n def production():\n \"\"\"Production env overrides\"\"\"\n env.hosts = ['xstudiosdev.com']\n env.user = 'root'\n env.group = 'apache'\n env.domain = 'DOMAIN'\n env.project_root = '/var/www/vhosts/{domain}'.format(**env)\n env.static_root = '/var/www/vhosts/{domain}/static_collection/'.format(**env)\n env.media_root = '/var/www/vhosts/{domain}/media/'.format(**env)\n\n\n # Set the default environment\n production()\n\n # -----------------------------------------------------------------------------\n # Project specific\n # -----------------------------------------------------------------------------\n\n # Your code goes here\n\nFeatures\n========\n\nDo a quick ``fab -l`` and behold the commands at your fingertips:\n\n::\n\n dev.install Install from scratch (eg - after pull for first time)\n dev.reset Reset project after breaking change\n dev.sync Sync project with latest master\n dev.db.copy_mysql Perform a local MySQL dump and import it on the remote machine\n dev.db.createsuperuser Create superuser\n dev.db.dump_mysql Perform a MySQL dump of the database\n dev.db.import_mysql Perform a MySQL import of the database\n dev.db.makemigrations Make migrations\n dev.db.migrate Apply migrations\n dev.db.reset Reset database\n dev.files.collect_static Collect static files\n dev.files.copy_media Copy local media files to remote server\n dev.files.copy_static Copy local static files to remote server\n dev.files.delete_media Delete all media files but preserve directories\n dev.files.delete_pyc Delete pyc files\n dev.files.delete_unused Delete unused media files that are not referenced in the database\n dev.files.fix_permissions Ensure proper permissions on project folders\n dev.git.pull_master Git pull origin master\n dev.setup.clear_logs Clear debug logs\n dev.setup.create_local_settings Create default local settings file\n dev.setup.create_logs Create logs dir and log files\n dev.setup.create_media_dir Create media dir\n dev.setup.create_virtualenv Create and active a virtual environment\n dev.setup.pip_install_requirements Install pip requirements from requirements.txt\n dev.setup.pip_update Upgrade pip\n dev.setup.pip_update_packages Update outdated pip packages (Be careful!)\n prod.deploy Deploy latest commit\n prod.install Install from scratch (eg - after pull for first time)\n prod.db.copy_mysql Perform a remote MySQL dump and import it on the local machine\n prod.db.createsuperuser Create superuser\n prod.db.dump_mysql Perform a MySQL dump of the database\n prod.db.import_mysql Perform a MySQL import of the database\n prod.db.migrate Apply migrations\n prod.db.reset Reset database\n prod.files.collect_static Collect static files\n prod.files.copy_media Copy remote media files to local\n prod.files.copy_static Copy remote static files to local\n prod.files.delete_pyc Delete pyc files\n prod.files.delete_unused Delete unused media files\n prod.files.fix_permissions Ensure proper permissions on project folders\n prod.git.pull_master Git pull origin master\n prod.services.apache_restart Restart apache\n prod.setup.clear_logs Clear debug logs\n prod.setup.create_logs Create logs dir and log files\n prod.setup.create_media_dir Create media dir\n prod.setup.pip_install_requirements Install pip requirements from requirements.txt\n prod.setup.pip_update Upgrade pip\n\nDocumentation\n=============\n\nDocumentation is available\n`here `__.\n\nIssues\n======\n\nIf you experience any issues, please create an\n`issue `__ on\nBitbucket.\n\nNot Exactly What You Want?\n==========================\n\nThis is what I want. *It might not be what you want.* If you have\ndifferences in your preferred setup, I encourage you to fork this to\ncreate your own version. Or create your own; it doesn't strictly have to\nbe a fork.\n\n\nHistory\n=======\n\nAll notable changes to this project will be documented in this file.\nThis project adheres to `Semantic Versioning `__.\n\n0.1.0 (2015-08-17)\n------------------\n\n- First release on PyPI.\n\n0.1.1 (2015-09-01)\n------------------\n\n- Updated production deploy with collect static.\n\n0.1.2 (2015-10-05)\n------------------\n\n- Removed problematic local settings auto setup on dev.install", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/tsantor/django-fabtasks", "keywords": "django-fabtasks", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-fabtasks", "package_url": "https://pypi.org/project/django-fabtasks/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-fabtasks/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/tsantor/django-fabtasks" }, "release_url": "https://pypi.org/project/django-fabtasks/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Common Fabric tasks for use in Django development/deployments", "version": "0.1.2" }, "last_serial": 1753218, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "403fe7155591ac3a562eacc253acadb5", "sha256": "0196ed8e101b9d0bdc46be91961f250673cd9c6d9f8664ef2c887571c71ddca5" }, "downloads": -1, "filename": "django_fabtasks-0.1.0-py2.7.egg", "has_sig": false, "md5_digest": "403fe7155591ac3a562eacc253acadb5", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 11610, "upload_time": "2015-08-24T21:12:22", "url": "https://files.pythonhosted.org/packages/c8/6a/8071a70c1f2bbf5797b365d6014a8d100a90ac42633896afe10c2389954c/django_fabtasks-0.1.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "f7e67fd015a299a991ef12c55c61f1df", "sha256": "d257806522b37b94e3cea8bf1a7207423dc6a25143d125a5e7a81517b14bda6f" }, "downloads": -1, "filename": "django_fabtasks-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f7e67fd015a299a991ef12c55c61f1df", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 15479, "upload_time": "2015-08-24T21:12:15", "url": "https://files.pythonhosted.org/packages/0b/2a/0b6d2c0f9563a30cde1e9eafa907147760ed18dc8feb4fd8636b737dca26/django_fabtasks-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3d38400681a47e08fc036d60529bd210", "sha256": "6c2c27193b28a10201c45848c9851df687b06d936fb1c2969640dc9de854ef96" }, "downloads": -1, "filename": "django-fabtasks-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3d38400681a47e08fc036d60529bd210", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9391, "upload_time": "2015-08-24T21:12:09", "url": "https://files.pythonhosted.org/packages/db/cc/c802f4038ead1f7a400ed6d39bf4553d7458f5db9e300ed378e6227adfd8/django-fabtasks-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d3d09f69f089e35cfca4f275b22e6d7f", "sha256": "2fe043736837cff3c251c818e0d8ddfe48136ba4d572e751478e6ec80fda7a19" }, "downloads": -1, "filename": "django_fabtasks-0.1.1-py2.7.egg", "has_sig": false, "md5_digest": "d3d09f69f089e35cfca4f275b22e6d7f", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 11669, "upload_time": "2015-09-02T02:21:31", "url": "https://files.pythonhosted.org/packages/8d/04/37106601083a6f2f96755b41060a3e1709b12f057a1bd7348c331a0f42f2/django_fabtasks-0.1.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "0904f8658afc716c9a382d2143c82a06", "sha256": "316210b38921ade64bbc189df8768053a80c3000d892a6947b12eeac4371715d" }, "downloads": -1, "filename": "django_fabtasks-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0904f8658afc716c9a382d2143c82a06", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 15542, "upload_time": "2015-09-02T02:21:28", "url": "https://files.pythonhosted.org/packages/e5/4d/5ee33484d8328bb7286e2739add0e1610bfa51ee920261197e2c24fee357/django_fabtasks-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cc754bf9b7b747741edfd0edac86c70b", "sha256": "3808cdd888217fc0d73b38b6f4895d959db80145d72e51d5ca8328f71b36272a" }, "downloads": -1, "filename": "django-fabtasks-0.1.1.tar.gz", "has_sig": false, "md5_digest": "cc754bf9b7b747741edfd0edac86c70b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9508, "upload_time": "2015-09-02T02:21:24", "url": "https://files.pythonhosted.org/packages/7c/7a/094fd7255e2d9a6657425982ba6cc2b55b65189fe41516a2b3dd3f6b1f14/django-fabtasks-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "d9da2d953aa9c6069b9789bc42d60480", "sha256": "e33e6208777ad034164283a79d4620ce916f96a056fb768978f5f7ebd653fd62" }, "downloads": -1, "filename": "django_fabtasks-0.1.2-py2.7.egg", "has_sig": false, "md5_digest": "d9da2d953aa9c6069b9789bc42d60480", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 11798, "upload_time": "2015-10-05T19:17:22", "url": "https://files.pythonhosted.org/packages/65/bc/03c5e3fbfe5142223e9d68bf3b49440df8e0e6f645ea3a21c821f03a569f/django_fabtasks-0.1.2-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "8d1e05fc7f837c274f8afb44ffa92656", "sha256": "7596a79416634a639aa4919df4e6cca682bc1b427bef427bd4e0f3cd9c29ada0" }, "downloads": -1, "filename": "django_fabtasks-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8d1e05fc7f837c274f8afb44ffa92656", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 15762, "upload_time": "2015-10-05T19:17:17", "url": "https://files.pythonhosted.org/packages/18/9d/564f9c7fd9f86467f9df67758d68e55e3fec7aff6c404c3f83b7547620fc/django_fabtasks-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5652b341bd16d3b0caff65472e8e26d6", "sha256": "80003dffdd6ca393f172b0ddac63069c15876ed77867c411e2690360c651cb98" }, "downloads": -1, "filename": "django-fabtasks-0.1.2.tar.gz", "has_sig": false, "md5_digest": "5652b341bd16d3b0caff65472e8e26d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9667, "upload_time": "2015-10-05T19:17:13", "url": "https://files.pythonhosted.org/packages/79/0a/1fe0bae1b2542dd6be45ab1131cf0abebc5133723934b83d1ce152f03418/django-fabtasks-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d9da2d953aa9c6069b9789bc42d60480", "sha256": "e33e6208777ad034164283a79d4620ce916f96a056fb768978f5f7ebd653fd62" }, "downloads": -1, "filename": "django_fabtasks-0.1.2-py2.7.egg", "has_sig": false, "md5_digest": "d9da2d953aa9c6069b9789bc42d60480", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 11798, "upload_time": "2015-10-05T19:17:22", "url": "https://files.pythonhosted.org/packages/65/bc/03c5e3fbfe5142223e9d68bf3b49440df8e0e6f645ea3a21c821f03a569f/django_fabtasks-0.1.2-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "8d1e05fc7f837c274f8afb44ffa92656", "sha256": "7596a79416634a639aa4919df4e6cca682bc1b427bef427bd4e0f3cd9c29ada0" }, "downloads": -1, "filename": "django_fabtasks-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8d1e05fc7f837c274f8afb44ffa92656", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 15762, "upload_time": "2015-10-05T19:17:17", "url": "https://files.pythonhosted.org/packages/18/9d/564f9c7fd9f86467f9df67758d68e55e3fec7aff6c404c3f83b7547620fc/django_fabtasks-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5652b341bd16d3b0caff65472e8e26d6", "sha256": "80003dffdd6ca393f172b0ddac63069c15876ed77867c411e2690360c651cb98" }, "downloads": -1, "filename": "django-fabtasks-0.1.2.tar.gz", "has_sig": false, "md5_digest": "5652b341bd16d3b0caff65472e8e26d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9667, "upload_time": "2015-10-05T19:17:13", "url": "https://files.pythonhosted.org/packages/79/0a/1fe0bae1b2542dd6be45ab1131cf0abebc5133723934b83d1ce152f03418/django-fabtasks-0.1.2.tar.gz" } ] }