-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 25 attribution change #48
base: refactor
Are you sure you want to change the base?
Issue 25 attribution change #48
Conversation
-Added extra installation instructions for Mac users -Added database setup using migrate command
This reverts commit 87d35cd.
Co-authored-by: Martin Breuss [email protected] -Added extra installation instructions for Mac users -Added database setup using migrate command
19: Improve installation instructions
…ke resource status, devices, audiance, etc. Did this so as new values were required, we wouldn't require a code change/redeployment of the application.
Registered new models with admin. Created new migration. Added __str__ method to all new models. Updated resource list view to return all resources for now. Will need to update to only allow for approved resources in the future.
Commented out language field as it was replaced by a many to many field.
Deleted the choices file and removed references in models.py, views.py and commented references in tests.py. Need to update the tests to utilize the appropriate models instead of the choices file.
Removed the multiselectfield import as it was no longer being used.
Added a sequence field to the ResourceStatus model so we can programmatically identify the Proposed status without having to rely on the "Proposed" value itself. This will allow us to change the status name if needed.
Added logic to default the status of a resource to the first status in the sequence so we can change the name of the status in the future if needed.
Removed unnecessary comments and fields that no longer exist on the Resource model.
Updated model name to remove pluralization. Added more details admin capabilities for all models.
Created CreateResourceForm in forms.py and updated views.py to utilize the new custom form. This form will more appropriately handle multiselect fields. Still need to add the ability to add a new author.
Updated resource list form to utilize the newly created fields/models. Also appears to have fixed the filters functionality as well.
|
||
|
||
def get_initial_status(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created a data migration file that will be used to automatically populate several tables within the DB.
@sijanonly I have now added the data migration file. You should be able to pull the latest version of this request down and run migrate to see the data appear. |
@brandonrosenbloom I am still getting this issue while running migration. can you please have a look? |
Updated get_initial_status to return None if there is no default status available.
Removed unneeded period.
@sijanonly Try now. I've updated the get_default_value method to return a none if there are no values available. |
@brandonrosenbloom , the changes didn't work. Actually, the statement
Also, there is one issue I am facing while creating user. I tried to create superuser I think it's better to set |
Added try/except logic to get_initial_status method as recommended by @sijanonly
@sijanonly I've applied the change to the get_initial_status method as suggested. @meg-ray Do we want to guarantee that all profiles have a population entered? |
|
@sijanonly The only issue I see with setting the population attribute to None on the model is really how it may impact the business process by which users are created. @meg-ray if we don't expect new users to always be created with a population value, then setting the value to no longer be required makes sense. However, if we expect all new users to have a population to be identified when they are first created, then we should probably leave the field as required. Thoughts? |
SEVERAL CHANGES: