localflavor.txt 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. ==========================
  2. The "local flavor" add-ons
  3. ==========================
  4. Historically, Django has shipped with ``django.contrib.localflavor`` --
  5. assorted pieces of code that are useful for particular countries or cultures.
  6. This code is now distributed separately from Django, for easier maintenance
  7. and to trim the size of Django's codebase.
  8. See the official documentation for more information:
  9. https://django-localflavor.readthedocs.org/
  10. .. _localflavor-packages:
  11. Code is hosted on github at https://github.com/django/django-localflavor.
  12. .. _localflavor-how-to-migrate:
  13. How to migrate
  14. ==============
  15. If you've used the old ``django.contrib.localflavor`` package or one of the
  16. temporary ``django-localflavor-*`` releases, follow these two easy steps to
  17. update your code:
  18. 1. Install the third-party ``django-localflavor`` package from PyPI.
  19. 2. Change your app's import statements to reference the new package.
  20. For example, change this::
  21. from django.contrib.localflavor.fr.forms import FRPhoneNumberField
  22. ...to this::
  23. from localflavor.fr.forms import FRPhoneNumberField
  24. The code in the new package is the same (it was copied directly from Django),
  25. so you don't have to worry about backwards compatibility in terms of
  26. functionality. Only the imports have changed.
  27. .. _localflavor-deprecation-policy:
  28. Deprecation policy
  29. ==================
  30. In Django 1.5, importing from ``django.contrib.localflavor`` will result in a
  31. ``DeprecationWarning``. This means your code will still work, but you should
  32. change it as soon as possible.
  33. In Django 1.6, importing from ``django.contrib.localflavor`` will no longer
  34. work.