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
* First pass at changing how the history_change_reason works
* Use a better name for the class of the field.
* Initial work with passing tests
* Fix default field type
Make max_length configurable via settings if the other field is configured via settings.
* Add tests
Fix setting name
* Fix positional arguments suggestion, add my new thing at the end.
* Again, consider the usage of positional args. Move history_id after excluded fields.
* Trying to get my tests working.
Revert null change on field
* Still working on my tests.
Error:
Traceback (most recent call last):
File "/Users/kneuharth/projects/django-simple-history/simple_history/tests/tests/test_models.py", line 402, in test_textfield_history_change_reason2
TextFieldChangeReasonModel2.objects.create(greeting="what's up?")
File "/Users/kneuharth/projects/django-simple-history/.eggs/Django-2.0.4-py3.5.egg/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/Users/kneuharth/projects/django-simple-history/.eggs/Django-2.0.4-py3.5.egg/django/db/models/query.py", line 417, in create
obj.save(force_insert=True, using=self.db)
File "/Users/kneuharth/projects/django-simple-history/.eggs/Django-2.0.4-py3.5.egg/django/db/models/base.py", line 729, in save
force_update=force_update, update_fields=update_fields)
File "/Users/kneuharth/projects/django-simple-history/.eggs/Django-2.0.4-py3.5.egg/django/db/models/base.py", line 769, in save_base
update_fields=update_fields, raw=raw, using=using,
File "/Users/kneuharth/projects/django-simple-history/.eggs/Django-2.0.4-py3.5.egg/django/dispatch/dispatcher.py", line 178, in send
for receiver in self._live_receivers(sender)
File "/Users/kneuharth/projects/django-simple-history/.eggs/Django-2.0.4-py3.5.egg/django/dispatch/dispatcher.py", line 178, in <listcomp>
for receiver in self._live_receivers(sender)
File "/Users/kneuharth/projects/django-simple-history/simple_history/models.py", line 316, in post_save
self.create_historical_record(instance, created and '+' or '~')
File "/Users/kneuharth/projects/django-simple-history/simple_history/models.py", line 332, in create_historical_record
history_change_reason=history_change_reason, **attrs)
File "/Users/kneuharth/projects/django-simple-history/.eggs/Django-2.0.4-py3.5.egg/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/Users/kneuharth/projects/django-simple-history/.eggs/Django-2.0.4-py3.5.egg/django/db/models/query.py", line 415, in create
obj = self.model(**kwargs)
File "/Users/kneuharth/projects/django-simple-history/.eggs/Django-2.0.4-py3.5.egg/django/db/models/base.py", line 495, in __init__
raise TypeError("'%s' is an invalid keyword argument for this function" % kwarg)
TypeError: 'history_change_reason' is an invalid keyword argument for this function
* Fix indexing
* Cleanup and passing tests now.
Abandoned the max_length flag because TextField doesn’t use it.
* Cleanup after pep8 and pyflakes and start of docs.
* Finish the documentation for usage of customizations.
* Sleight documentation tweaks.
0 commit comments