Skip to content

Commit 27deaa2

Browse files
Fix user-specified locale not being used (#67)
* Initialise faker with specified locale * add locale to readme * bump Co-authored-by: Viren Nadkarni <[email protected]>
1 parent 633d7ff commit 27deaa2

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ Django-seed does not populate auto-incremented primary keys, instead ``seeder.ex
105105
<class 'faker.django.tests.Game'>: [1, 2, 3, 4, 5]
106106
}
107107
108+
You may specify a different locale by passing it in the constructor of the seeder. Defaults to `settings.LANGUAGE_CODE`
109+
110+
.. code-block:: python
111+
112+
seeder = Seed.seeder(locale='sv_SE')
113+
seeder.faker.city() # 'Västerås'
114+
108115
109116
-----
110117
Tests

django_seed/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import random
33

44

5-
__version__ = '0.2.1'
5+
__version__ = '0.2.2'
66

77

88
class Seed(object):

0 commit comments

Comments
 (0)