Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix user-specified locale not being used #67

Merged
merged 4 commits into from
Feb 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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