Skip to content

Commit

Permalink
Fix user-specified locale not being used (#67)
Browse files Browse the repository at this point in the history
* Initialise faker with specified locale

* add locale to readme

* bump

Co-authored-by: Viren Nadkarni <[email protected]>
  • Loading branch information
Brobin and viren-nadkarni authored Feb 4, 2020
1 parent 633d7ff commit 27deaa2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ Django-seed does not populate auto-incremented primary keys, instead ``seeder.ex
<class 'faker.django.tests.Game'>: [1, 2, 3, 4, 5]
}
You may specify a different locale by passing it in the constructor of the seeder. Defaults to `settings.LANGUAGE_CODE`

.. code-block:: python
seeder = Seed.seeder(locale='sv_SE')
seeder.faker.city() # 'Västerås'
-----
Tests
Expand Down
2 changes: 1 addition & 1 deletion django_seed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import random


__version__ = '0.2.1'
__version__ = '0.2.2'


class Seed(object):
Expand Down

0 comments on commit 27deaa2

Please sign in to comment.