{ "info": { "author": "iwoca ltd", "author_email": "", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "============\nDjango Seven\n============\n\n.. image:: https://travis-ci.org/iwoca/django-seven.svg?branch=develop\n :target: https://travis-ci.org/iwoca/django-seven.svg\n\nCollection of code/tools to help for Django upgrading.\nThis package name is a reference to python package 'six' which was helping compatibility between python 2 and 3.\n\nThe idea of this package is to share some experience gained from a Django upgrade from 1.4 to 1.9 on a quite big project.\nHave a look at `Django Upgrade talk`_ for more details.\ndjango-seven will at the beginning contain compat module and deprecated rules logic.\n\n\nDeprecated rules\n================\n\nA Django management command ``check_deprecated_rules`` is available to check if your project is \"upgrade-compatible\".\n\nYou should first add ``django_seven.deprecated_rules`` to your ``INSTALLED_APPS``:\n\n\n::\n\n INSTALLED_APPS = [\n ...\n 'django_seven.deprecated_rules',\n ]\n\n\nThen you should define your current Django version and the version you want to upgrade to in your settings file:\n\n::\n\n SEVEN_CURRENT_DJANGO_VERSION = '1.4'\n SEVEN_FUTURE_DJANGO_VERSION = '1.9'\n\n\nThen launch the ``check_deprecated_rules`` management command for your project:\n\n::\n\n $ ./manage.py check_deprecated_rules\n\n ./core/models.py\n 1601: models.BooleanField has to be initialised with default parameter,\n as implicit default has changed between Django 1.4 (False) and 1.6 (None).\n L6: boolean_field = models.BooleanField()\n\n\nThis command will give you a list of non-respected rules, with useful informations to fix them:\n\n- The impacted file,\n- The rule number, with an explanation of the rule,\n- The line number, and the line copy.\n\nBy default, ``django-seven`` is defining some deprecated rules, but you can also define yours in settings file.\nYou should respect the rule fields:\n\n::\n\n DEPRECATED_RULES = [\n {\n 'name': 'deprecated_django_local_flavor_module',\n 'message': 'Deprecated django.contrib.localflavor module (now third-party lib). Use localflavor instead.',\n 'regex': r'.*django\\.contrib\\.localflavor.*',\n 'number': '1602',\n 'should_be_fixed_in': '1.6',\n },\n ]\n\nYou can also use the ``django-seven`` ones and add yours:\n\n::\n\n CUSTOM_RULES = [\n # Your custom rules\n ]\n\n from django_seven.deprecated_rules.rules import DEPRECATED_RULES as SV_DEPRECATED_RULES\n DEPRECATED_RULES = SV_DEPRECATED_RULES + CUSTOM_RULES\n\n\nYou can specify through settings which directories/files you want to exclude from the deprecated rules search:\n\n::\n\n SEVEN_EXCLUDED_DIRS = ['venv', '.git', 'frontend', 'static', 'docs']\n SEVEN_EXCLUDED_SUB_PATHS = ['migrations']\n SEVEN_EXCLUDED_SPECIFIC_FILE = ['my/specific/file.py']\n SEVEN_EXCLUDED_FILE_EXTENSIONS = ['.pyc']\n\n\n[UNDER HEAVY DEVELOPMENT / DESIGN CHOICES]\n\n.. _Django Upgrade talk: https://romgar.github.io/presentations/django_upgrade/", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/iwoca/django-seven/", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "django_seven", "package_url": "https://pypi.org/project/django_seven/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django_seven/", "project_urls": { "Homepage": "http://github.com/iwoca/django-seven/" }, "release_url": "https://pypi.org/project/django_seven/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "A Django app to help for Django upgrades.", "version": "0.1.1" }, "last_serial": 2245351, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "bb9e7edf30c405967587bb34b51ebc48", "sha256": "460d6275a931c35975ba2d99b669c45a65991cf8b6e1bf444ea5d67e3f75ce0f" }, "downloads": -1, "filename": "django_seven-0.1.tar.gz", "has_sig": false, "md5_digest": "bb9e7edf30c405967587bb34b51ebc48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14354, "upload_time": "2016-07-20T21:20:26", "url": "https://files.pythonhosted.org/packages/63/70/08fb5db47d78e4e772eb4c991d97087632e0f0a34dc828f551fbc8cb6ad8/django_seven-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "a9791d2d637a4332ddc529a484839744", "sha256": "55b0d32a522bc559094ecb0e291c02ad90dc48bd13d1bf0e77629bb9e2af616d" }, "downloads": -1, "filename": "django_seven-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a9791d2d637a4332ddc529a484839744", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15656, "upload_time": "2016-07-26T19:42:04", "url": "https://files.pythonhosted.org/packages/da/ee/1efa9244ad4e967052232a919271b5ec1339b21a56cbd0d33b1dfd6eb8ec/django_seven-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a9791d2d637a4332ddc529a484839744", "sha256": "55b0d32a522bc559094ecb0e291c02ad90dc48bd13d1bf0e77629bb9e2af616d" }, "downloads": -1, "filename": "django_seven-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a9791d2d637a4332ddc529a484839744", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15656, "upload_time": "2016-07-26T19:42:04", "url": "https://files.pythonhosted.org/packages/da/ee/1efa9244ad4e967052232a919271b5ec1339b21a56cbd0d33b1dfd6eb8ec/django_seven-0.1.1.tar.gz" } ] }