You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running manage.py seed on an application with DateTimeField in the models results in this:
/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.10/site-packages/django/db/models/fields/__init__.py:1654: RuntimeWarning: DateTimeField ElectionState.valid_from received a naive datetime (2023-12-11 07:14:28.937317) while time zone support is active.
warnings.warn(
Traceback (most recent call last):
File "/Users/offby1/projects/worldcon/nomnom/manage.py", line 22, in <module>
main()
File "/Users/offby1/projects/worldcon/nomnom/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.10/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.10/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.10/site-packages/django/core/management/base.py", line 639, in handle
app_output = self.handle_app_config(app_config, **options)
File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.10/site-packages/django_seed/management/commands/seed.py", line 63, in handle_app_config
generated = seeder.execute()
File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.10/site-packages/django_seed/seeder.py", line 250, in execute
executed_entity = entity.execute(using, inserted_entities)
File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.10/site-packages/django_seed/seeder.py", line 157, in execute
faker_data = {
File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.10/site-packages/django_seed/seeder.py", line 158, in <dictcomp>
field: format_field(field_format, inserted_entities)
File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.10/site-packages/django_seed/seeder.py", line 144, in format_field
return format(inserted_entities)
File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.10/site-packages/django_seed/guessers.py", line 120, in <lambda>
return lambda x: _timezone_format(faker.date_time())
File "/Users/offby1/projects/worldcon/nomnom/.venv/lib/python3.10/site-packages/django_seed/guessers.py", line 21, in _timezone_format
return timezone.make_aware(value, timezone.get_current_timezone(), is_dst=False)
TypeError: make_aware() got an unexpected keyword argument 'is_dst'
The text was updated successfully, but these errors were encountered:
rg3915
added a commit
to rg3915/django-seed
that referenced
this issue
Jan 2, 2024
The
is_dst
argument tomake_aware()
is deprecated as of Django 5.0: https://docs.djangoproject.com/en/dev/internals/deprecation/#deprecation-removed-in-5-0Running
manage.py seed
on an application withDateTimeField
in the models results in this:The text was updated successfully, but these errors were encountered: