From 87fed9444033533ad7105c4b1e4ffc5d7854a2c6 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 22 Mar 2015 11:46:07 +0100 Subject: [PATCH] Fixed #23814 -- Pointed localflavor documentation to external package Edited localflavor doc to point to the external package documentation, leaving just the 'How to migrate' section in Django. --- docs/ref/models/fields.txt | 9 +++++---- docs/topics/localflavor.txt | 39 ++----------------------------------- 2 files changed, 7 insertions(+), 41 deletions(-) diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 9fd9bd7fa3..0b411cf729 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -12,10 +12,11 @@ This document contains all the API references of :class:`Field` including the .. seealso:: - If the built-in fields don't do the trick, you can try :doc:`localflavor - `, which contains assorted pieces of code - that are useful for particular countries or cultures. Also, you can easily - :doc:`write your own custom model fields `. + If the built-in fields don't do the trick, you can try `django-localflavor + `_, which contains assorted + pieces of code that are useful for particular countries or cultures. Also, + you can easily :doc:`write your own custom model fields + `. .. note:: diff --git a/docs/topics/localflavor.txt b/docs/topics/localflavor.txt index 724805b147..5e9199c8e0 100644 --- a/docs/topics/localflavor.txt +++ b/docs/topics/localflavor.txt @@ -7,48 +7,13 @@ assorted pieces of code that are useful for particular countries or cultures. This code is now distributed separately from Django, for easier maintenance and to trim the size of Django's codebase. -The new localflavor package is named ``django-localflavor``, with a main -module called ``localflavor`` and many subpackages using an -`ISO 3166 country code`_. For example: ``localflavor.us`` is the -localflavor package for the U.S.A. - -Most of these ``localflavor`` add-ons are country-specific fields for the -:doc:`forms ` framework -- for example, a -``USStateField`` that knows how to validate U.S. state abbreviations and a -``FISocialSecurityNumber`` that knows how to validate Finnish social security -numbers. - -To use one of these localized components, just import the relevant subpackage. -For example, here's how you can create a form with a field representing a -French telephone number:: - - from django import forms - from localflavor.fr.forms import FRPhoneNumberField - - class MyForm(forms.Form): - my_french_phone_no = FRPhoneNumberField() - -For documentation on a given country's localflavor helpers, see its README -file. - -.. _ISO 3166 country code: http://www.iso.org/iso/country_codes.htm - -.. _localflavor-packages: - -Supported countries -=================== - See the official documentation for more information: https://django-localflavor.readthedocs.org/ -Internationalization of localflavors -==================================== +.. _localflavor-packages: -To activate translations for the ``localflavor`` application, you must include -the application's name in the :setting:`INSTALLED_APPS` setting, so the -internationalization system can find the catalog, as explained in -:ref:`how-django-discovers-translations`. +Code is hosted on github at https://github.com/django/django-localflavor. .. _localflavor-how-to-migrate: