mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-04-25 23:45:56 +03:00
[PR #315] [MERGED] Fixed migrations for new deployments, added unit tests #493
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/webvirtcloud#493
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/retspen/webvirtcloud/pull/315
Author: @Real-Gecko
Created: 5/28/2020
Status: ✅ Merged
Merged: 6/3/2020
Merged by: @retspen
Base:
master← Head:master📝 Commits (6)
85929b5Fixe migrations for new deployments83b1ddeAdded admin app unit tests7b0016cSome test for computes5ab22baAdded accounts test(moved from admin)7103c52Reworked some computes forms and views10b6f88Added coverage.py support📊 Changes
40 files changed (+507 additions, -573 deletions)
View changed files
📝
.gitignore(+2 -0)📝
accounts/__init__.py(+1 -0)➖
accounts/admin.py(+0 -3)➕
accounts/apps.py(+51 -0)➖
accounts/backends.py(+0 -13)➖
accounts/migrations/0002_addAdmin.py(+0 -23)📝
accounts/migrations/0002_permissionset.py(+2 -2)➖
accounts/migrations/0004_apply_change_password.py(+0 -25)➖
accounts/migrations/0005_remove_userattributes_can_clone_instances.py(+0 -18)📝
accounts/models.py(+1 -0)📝
accounts/tests.py(+27 -2)📝
admin/forms.py(+1 -1)📝
admin/templates/admin/common/form.html(+1 -0)➕
admin/tests.py(+120 -0)📝
admin/views.py(+1 -1)➖
computes/admin.py(+0 -3)📝
computes/forms.py(+33 -131)➕
computes/migrations/0002_auto_20200529_1320.py(+18 -0)📝
computes/models.py(+1 -1)➕
computes/templates/computes/form.html(+29 -0)...and 20 more files
📄 Description
So, putting all those RunPython inside migrations was a bad idea, breaking migrations for new installs and unit tests. Here are some fixes. Moved admin creation and migration of
can cloneto post_migrate signals, which is not that exciting, but better than fixtures or some other workarounds.can_clone_instancesuser attribute is in the model again, but is hidden from forms. If you're planning new release I think it's better to remove it at all and recreate all migrations from scratch.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.