Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: Current Version
-
Fix Version/s: TAG 2014/15
-
Component/s: OIOIOI
-
Labels:None
Activity
Szymon Acedański
made changes -
Field | Original Value | New Value |
---|---|---|
TAG Reviewer | Piotr Kozakowski [ koz4k ] |
Szymon Acedański
made changes -
TAG Reviewer | Piotr Kozakowski [ koz4k ] | Patryk Czajka [ heurezjusz ] |
Change I7d8200a078f1abab26a0dfe957a13c30ccb44bc8, patchset 2
https://gerrit.sio2project.mimuw.edu.pl/2243
SIO-1580 Upgrade to Django 1.7
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Fix the overriden syncdb management command
The new syncdb command, unlike the old one, receives arguments
and the overriden version now accounts for that by defining
the proper method.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
https://gerrit.sio2project.mimuw.edu.pl/2243
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Fix the overriden syncdb management command
The new syncdb command, unlike the old one, receives arguments
and the overriden version now accounts for that by defining
the proper method.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
Show
Gerrit Gerrit
added a comment - Change I7d8200a078f1abab26a0dfe957a13c30ccb44bc8, patchset 2
https://gerrit.sio2project.mimuw.edu.pl/2243
SIO-1580 Upgrade to Django 1.7
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Fix the overriden syncdb management command
The new syncdb command, unlike the old one, receives arguments
and the overriden version now accounts for that by defining
the proper method.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
Change I7d8200a078f1abab26a0dfe957a13c30ccb44bc8, patchset 3
https://gerrit.sio2project.mimuw.edu.pl/2243
SIO-1580 Upgrade to Django 1.7
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Fix the overriden syncdb management command
The new syncdb command, unlike the old one, receives arguments
and the overriden version now accounts for that by defining
the proper method.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
https://gerrit.sio2project.mimuw.edu.pl/2243
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Fix the overriden syncdb management command
The new syncdb command, unlike the old one, receives arguments
and the overriden version now accounts for that by defining
the proper method.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
Show
Gerrit Gerrit
added a comment - Change I7d8200a078f1abab26a0dfe957a13c30ccb44bc8, patchset 3
https://gerrit.sio2project.mimuw.edu.pl/2243
SIO-1580 Upgrade to Django 1.7
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Fix the overriden syncdb management command
The new syncdb command, unlike the old one, receives arguments
and the overriden version now accounts for that by defining
the proper method.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
Change I7d8200a078f1abab26a0dfe957a13c30ccb44bc8, patchset 4
https://gerrit.sio2project.mimuw.edu.pl/2243
SIO-1580 Upgrade to Django 1.7
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Move from the syncdb command to the migrate command
The new migrate command does everything the previous combination
of syncdb + migrate did. The syncdb command is now an alias for migrate
and is deprecated. This commit changes the overriden syncdb command
by renaming and fixing it appropriately and updates the documentation.
---
Add tools to aid upgrading from old versions of OIOIOI
Because of the new Django 1.7 migration system that replaces the old
South migration system, upgrading from previous versions of OIOIOI which
were based on the old system becomes a non-trivial process if user wants
to keep his old database. This commit adds a new ./manage.py command
that does exactly that in typical cases, adds auxilary files
and documents the process for advanced users.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
https://gerrit.sio2project.mimuw.edu.pl/2243
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Move from the syncdb command to the migrate command
The new migrate command does everything the previous combination
of syncdb + migrate did. The syncdb command is now an alias for migrate
and is deprecated. This commit changes the overriden syncdb command
by renaming and fixing it appropriately and updates the documentation.
---
Add tools to aid upgrading from old versions of OIOIOI
Because of the new Django 1.7 migration system that replaces the old
South migration system, upgrading from previous versions of OIOIOI which
were based on the old system becomes a non-trivial process if user wants
to keep his old database. This commit adds a new ./manage.py command
that does exactly that in typical cases, adds auxilary files
and documents the process for advanced users.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
Show
Gerrit Gerrit
added a comment - Change I7d8200a078f1abab26a0dfe957a13c30ccb44bc8, patchset 4
https://gerrit.sio2project.mimuw.edu.pl/2243
SIO-1580 Upgrade to Django 1.7
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Move from the syncdb command to the migrate command
The new migrate command does everything the previous combination
of syncdb + migrate did. The syncdb command is now an alias for migrate
and is deprecated. This commit changes the overriden syncdb command
by renaming and fixing it appropriately and updates the documentation.
---
Add tools to aid upgrading from old versions of OIOIOI
Because of the new Django 1.7 migration system that replaces the old
South migration system, upgrading from previous versions of OIOIOI which
were based on the old system becomes a non-trivial process if user wants
to keep his old database. This commit adds a new ./manage.py command
that does exactly that in typical cases, adds auxilary files
and documents the process for advanced users.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
Change I7d8200a078f1abab26a0dfe957a13c30ccb44bc8, patchset 5
https://gerrit.sio2project.mimuw.edu.pl/2243
SIO-1580 Upgrade to Django 1.7
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Move from the syncdb command to the migrate command
The new migrate command does everything the previous combination
of syncdb + migrate did. The syncdb command is now an alias for migrate
and is deprecated. This commit changes the overriden syncdb command
by renaming and fixing it appropriately and updates the documentation.
---
Add tools to aid upgrading from old versions of OIOIOI
Because of the new Django 1.7 migration system that replaces the old
South migration system, upgrading from previous versions of OIOIOI which
were based on the old system becomes a non-trivial process if user wants
to keep his old database. This commit adds a new ./manage.py command
that does exactly that in typical cases, adds auxilary files
and documents the process for advanced users.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
https://gerrit.sio2project.mimuw.edu.pl/2243
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Move from the syncdb command to the migrate command
The new migrate command does everything the previous combination
of syncdb + migrate did. The syncdb command is now an alias for migrate
and is deprecated. This commit changes the overriden syncdb command
by renaming and fixing it appropriately and updates the documentation.
---
Add tools to aid upgrading from old versions of OIOIOI
Because of the new Django 1.7 migration system that replaces the old
South migration system, upgrading from previous versions of OIOIOI which
were based on the old system becomes a non-trivial process if user wants
to keep his old database. This commit adds a new ./manage.py command
that does exactly that in typical cases, adds auxilary files
and documents the process for advanced users.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
Show
Gerrit Gerrit
added a comment - Change I7d8200a078f1abab26a0dfe957a13c30ccb44bc8, patchset 5
https://gerrit.sio2project.mimuw.edu.pl/2243
SIO-1580 Upgrade to Django 1.7
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Move from the syncdb command to the migrate command
The new migrate command does everything the previous combination
of syncdb + migrate did. The syncdb command is now an alias for migrate
and is deprecated. This commit changes the overriden syncdb command
by renaming and fixing it appropriately and updates the documentation.
---
Add tools to aid upgrading from old versions of OIOIOI
Because of the new Django 1.7 migration system that replaces the old
South migration system, upgrading from previous versions of OIOIOI which
were based on the old system becomes a non-trivial process if user wants
to keep his old database. This commit adds a new ./manage.py command
that does exactly that in typical cases, adds auxilary files
and documents the process for advanced users.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
Change I7d8200a078f1abab26a0dfe957a13c30ccb44bc8, patchset 6
https://gerrit.sio2project.mimuw.edu.pl/2243
SIO-1580 Upgrade to Django 1.7
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Move from the syncdb command to the migrate command
The new migrate command does everything the previous combination
of syncdb + migrate did. The syncdb command is now an alias for migrate
and is deprecated. This commit changes the overriden syncdb command
by renaming and fixing it appropriately and updates the documentation.
---
Add tools to aid upgrading from old versions of OIOIOI
Because of the new Django 1.7 migration system that replaces the old
South migration system, upgrading from previous versions of OIOIOI which
were based on the old system becomes a non-trivial process if user wants
to keep his old database. This commit adds a new ./manage.py command
that does exactly that in typical cases, adds auxilary files
and documents the process for advanced users.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
https://gerrit.sio2project.mimuw.edu.pl/2243
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Move from the syncdb command to the migrate command
The new migrate command does everything the previous combination
of syncdb + migrate did. The syncdb command is now an alias for migrate
and is deprecated. This commit changes the overriden syncdb command
by renaming and fixing it appropriately and updates the documentation.
---
Add tools to aid upgrading from old versions of OIOIOI
Because of the new Django 1.7 migration system that replaces the old
South migration system, upgrading from previous versions of OIOIOI which
were based on the old system becomes a non-trivial process if user wants
to keep his old database. This commit adds a new ./manage.py command
that does exactly that in typical cases, adds auxilary files
and documents the process for advanced users.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
Show
Gerrit Gerrit
added a comment - Change I7d8200a078f1abab26a0dfe957a13c30ccb44bc8, patchset 6
https://gerrit.sio2project.mimuw.edu.pl/2243
SIO-1580 Upgrade to Django 1.7
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Move from the syncdb command to the migrate command
The new migrate command does everything the previous combination
of syncdb + migrate did. The syncdb command is now an alias for migrate
and is deprecated. This commit changes the overriden syncdb command
by renaming and fixing it appropriately and updates the documentation.
---
Add tools to aid upgrading from old versions of OIOIOI
Because of the new Django 1.7 migration system that replaces the old
South migration system, upgrading from previous versions of OIOIOI which
were based on the old system becomes a non-trivial process if user wants
to keep his old database. This commit adds a new ./manage.py command
that does exactly that in typical cases, adds auxilary files
and documents the process for advanced users.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
Change I7d8200a078f1abab26a0dfe957a13c30ccb44bc8, patchset 7
https://gerrit.sio2project.mimuw.edu.pl/2243
SIO-1580 Upgrade to Django 1.7
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Move from the syncdb command to the migrate command
The new migrate command does everything the previous combination
of syncdb + migrate did. The syncdb command is now an alias for migrate
and is deprecated. This commit changes the overriden syncdb command
by renaming and fixing it appropriately and updates the documentation.
---
Add tools to aid upgrading from old versions of OIOIOI
Because of the new Django 1.7 migration system that replaces the old
South migration system, upgrading from previous versions of OIOIOI which
were based on the old system becomes a non-trivial process if user wants
to keep his old database. This commit adds a new ./manage.py command
that does exactly that in typical cases, adds auxilary files
and documents the process for advanced users.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
https://gerrit.sio2project.mimuw.edu.pl/2243
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Move from the syncdb command to the migrate command
The new migrate command does everything the previous combination
of syncdb + migrate did. The syncdb command is now an alias for migrate
and is deprecated. This commit changes the overriden syncdb command
by renaming and fixing it appropriately and updates the documentation.
---
Add tools to aid upgrading from old versions of OIOIOI
Because of the new Django 1.7 migration system that replaces the old
South migration system, upgrading from previous versions of OIOIOI which
were based on the old system becomes a non-trivial process if user wants
to keep his old database. This commit adds a new ./manage.py command
that does exactly that in typical cases, adds auxilary files
and documents the process for advanced users.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
Show
Gerrit Gerrit
added a comment - Change I7d8200a078f1abab26a0dfe957a13c30ccb44bc8, patchset 7
https://gerrit.sio2project.mimuw.edu.pl/2243
SIO-1580 Upgrade to Django 1.7
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Move from the syncdb command to the migrate command
The new migrate command does everything the previous combination
of syncdb + migrate did. The syncdb command is now an alias for migrate
and is deprecated. This commit changes the overriden syncdb command
by renaming and fixing it appropriately and updates the documentation.
---
Add tools to aid upgrading from old versions of OIOIOI
Because of the new Django 1.7 migration system that replaces the old
South migration system, upgrading from previous versions of OIOIOI which
were based on the old system becomes a non-trivial process if user wants
to keep his old database. This commit adds a new ./manage.py command
that does exactly that in typical cases, adds auxilary files
and documents the process for advanced users.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
Change I7d8200a078f1abab26a0dfe957a13c30ccb44bc8, patchset 8
https://gerrit.sio2project.mimuw.edu.pl/2243
SIO-1580 Upgrade to Django 1.7
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Move from the syncdb command to the migrate command
The new migrate command does everything the previous combination
of syncdb + migrate did. The syncdb command is now an alias for migrate
and is deprecated. This commit changes the overriden syncdb command
by renaming and fixing it appropriately and updates the documentation.
---
Add tools to aid upgrading from old versions of OIOIOI
Because of the new Django 1.7 migration system that replaces the old
South migration system, upgrading from previous versions of OIOIOI which
were based on the old system becomes a non-trivial process if user wants
to keep his old database. This commit adds a new ./manage.py command
that does exactly that in typical cases, adds auxilary files
and documents the process for advanced users.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
https://gerrit.sio2project.mimuw.edu.pl/2243
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Move from the syncdb command to the migrate command
The new migrate command does everything the previous combination
of syncdb + migrate did. The syncdb command is now an alias for migrate
and is deprecated. This commit changes the overriden syncdb command
by renaming and fixing it appropriately and updates the documentation.
---
Add tools to aid upgrading from old versions of OIOIOI
Because of the new Django 1.7 migration system that replaces the old
South migration system, upgrading from previous versions of OIOIOI which
were based on the old system becomes a non-trivial process if user wants
to keep his old database. This commit adds a new ./manage.py command
that does exactly that in typical cases, adds auxilary files
and documents the process for advanced users.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
Show
Gerrit Gerrit
added a comment - Change I7d8200a078f1abab26a0dfe957a13c30ccb44bc8, patchset 8
https://gerrit.sio2project.mimuw.edu.pl/2243
SIO-1580 Upgrade to Django 1.7
---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
---
Move from the syncdb command to the migrate command
The new migrate command does everything the previous combination
of syncdb + migrate did. The syncdb command is now an alias for migrate
and is deprecated. This commit changes the overriden syncdb command
by renaming and fixing it appropriately and updates the documentation.
---
Add tools to aid upgrading from old versions of OIOIOI
Because of the new Django 1.7 migration system that replaces the old
South migration system, upgrading from previous versions of OIOIOI which
were based on the old system becomes a non-trivial process if user wants
to keep his old database. This commit adds a new ./manage.py command
that does exactly that in typical cases, adds auxilary files
and documents the process for advanced users.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8
Kamil Braun
made changes -
Status | New [ 10000 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Szymon Acedański
made changes -
Fix Version/s | TAG 2014/15 [ 12303 ] | |
Fix Version/s | Sprint 2/2014 [ 12004 ] |
Szymon Acedański
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Transition | Time In Source Status | Execution Times | Last Executer | Last Execution Date | |||||
---|---|---|---|---|---|---|---|---|---|
|
45d 1h 18m | 1 | Kamil Braun | 2014-12-20 17:13 | |||||
|
1556d 23h 26m | 1 | Szymon Acedański | 2019-03-26 16:39 |
https://gerrit.sio2project.mimuw.edu.pl/2243
SIO-1580Upgrade to Django 1.7---
Fix and update documentation
This commit fixes a small bug in the documentation and updates
it to match the new Django version.
https://docs.djangoproject.com/en/1.7/releases/1.7/
---
Add deconstruct methods to custom Field classes where necessary
The schema migration system in Django 1.7 needs to know how to serialize
model fields before putting them into the database. The new deconstruct
method is added for this purpose similarly to South's introspection rules.
https://docs.djangoproject.com/en/1.7/releases/1.7/#new-method-on-field-subclasses
---
Update setup.py to account for new packages' versions
Updates Django to 1.7 and Grappelli to 2.6.x.
---
Remove South
South is a schema and data migration system for older Django versions.
Django 1.7 received its own migration system based on South, thus it is
not needed anymore nor is Django 1.7 supported by South.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Add new migration files
The new migration system is incompatible with the previous South format.
All migrations needed to be generated from scratch.
https://docs.djangoproject.com/en/1.7/releases/1.7/#schema-migrations
---
Rename the queryset method to get_queryset
Django 1.6 provided a new API for getting QuerySets from managers
and deprecated the old one. This change switches to the new API
and removes lots of deprecation warnings.
https://docs.djangoproject.com/en/1.7/releases/1.6/#get-query-set-and-similar-methods-renamed-to-get-queryset
---
Explicitly specify the Meta.fields attribute in ModelForms
Django 1.8 will require to explicitly provide the Meta.fields attribute
in ModelForms for security reasons and this generates deprecation warnings
which is fixed by this commit.
https://docs.djangoproject.com/en/1.7/releases/1.6/#modelform-without-fields-or-exclude
---
Change how ModelForms accesses the model instance provided in kwargs
Previously in some situations when there was no model instance provided
to the ModelForm constructor, the 'instance' key didn't exist at all
in the constructor's kwargs. A change in Django internals modifies this
behavior and this commit accounts for that.
https://github.com/django/django/commit/390001ce52802a7fa1fceeabfb646e6b32911fb9
---
Change how the Form.fields container is modified in some places
The Form.fields attribute was changed to be an OrderedDict instead
of a SortedDict in Django 1.7. Some come relied on the fields attribute
to provide an insert method, which OrderedDict doesn't have. This commit
uses a different way to insert into fields.
https://docs.djangoproject.com/en/1.7/releases/1.7/#django-utils-datastructures-sorteddict
---
Remove duplicated apps in test_settings.py
There were some applications that were listed twice in INSTALLED_APPS:
once in default_settings.py and once in test_settings.py. This caused
the new application registry to raise exceptions. These duplicates
are now removed.
https://docs.djangoproject.com/en/1.7/releases/1.7/#app-registry-consistency
---
Change the removed mimetype argument to content_type, its replacement
The 'mimetype' argument provided to some functions and methods was replaced
with the 'content_type' argument. This commit accounts for that.
https://docs.djangoproject.com/en/1.7/releases/1.7/#features-removed-in-1-7
---
Fix tests by providing necessary fixtures
Previously some tests had unfilled dependencies in the database
- models were loaded that depended on other models which weren't.
For some reason Django 1.6 didn't complain. Django 1.7 in such case
throws exceptions saying that constraints aren't met. This commit
splits some fixtures and fixes tests by loading the necessary ones.
---
Decorate models whose names start with 'Test' with the 'nottest' decorator
The test runner treats every name that starts with 'Test' as a potential test
to run. That includes model classes. This caused the new Django 1.7 app registry
to raise errors during testing. This change fixes it by decorating these model
classes with the 'nottest' decorator.
---
Replace oioioi's DefaultCache with Django's FileBasedCache
DefaultCache was created to patch a security issue existing in Django's
FileBasedCache. This issue is now fixed and DefaultCache is not needed
anymore.
---
Clear template cache in some tests
Some tests were dependent on a particular order in which tests were
being run. The order changed in Django 1.7 and this caused the cache
to provide wrong results. The cache needed to be cleared in some tests.
---
Postpone translations until after modules are loaded
Django can't run any translations before all modules are loaded.
Previously, translating at import time didn't cause an error and
it was a bug that couldn't be easly identified. With the new app
registry provided by Django 1.7 translating (e. g. calling ugettext)
before the app registry is ready raises an exception. This commit
fixes some places where this happened.
https://docs.djangoproject.com/en/1.7/ref/applications/#applications-troubleshooting
---
Remove the to_python method in ColorField and use default_validators instead
For some reason, during database migration, Django 1.7 creates model instances
and operates on them for internal purposes. During these operations, the to_python
method is being called. Since the ProblemBalloonsConfig model uses ColorField
and doesn't provide a default, ColorField's to_python method threw a ValidationError
as None is not a valid ColorField value. This change moves the validation process
outside of to_python by providing a proper validator in the default_validators field.
---
Monkey patch Django's ModelAdmin to fix a bug in model add/change views
There is a critical bug in Django described in this ticket:
https://code.djangoproject.com/ticket/23934
This commit monkey patches Django and applies the patch provided
in the ticket. The patch will need to be removed after Django 1.7.2
is released.
Change-Id: I7d8200a078f1abab26a0dfe957a13c30ccb44bc8