-
Notifications
You must be signed in to change notification settings - Fork 5
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
Exporter tool and minor changes to importer tool #18
base: master
Are you sure you want to change the base?
Conversation
* Component version list needs to be separately maintained and hence models are modified * Importer tool was changed as a result of component version list
@@ -238,6 +238,12 @@ def __str__(self): | |||
return "%s" % self.name | |||
|
|||
|
|||
|
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.
Did you check django admin component version creation page?
@@ -238,6 +238,12 @@ def __str__(self): | |||
return "%s" % self.name | |||
|
|||
|
|||
|
|||
class ComponentVersionListModel(models.Model): |
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.
I suppose Version
name. Also without Model
part
@@ -301,8 +307,10 @@ def __str__(self): | |||
class ComponentVersionModel(models.Model): | |||
component = models.ForeignKey(ComponentModel, on_delete=models.PROTECT, related_name='component_version') | |||
|
|||
version = models.CharField(max_length=64, verbose_name="Version or build", | |||
help_text="note: component version instance will be cloned if you change version!") | |||
version = models.ForeignKey(ComponentVersionListModel, to_field='version', |
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.
I suggest to leave models.CharFiled
and move release_date
field to ComponentVersion
. My opinion ComponentVersionList
equal to ComponentVersion
. Also we should review meta_updated
field: may be it equal to release_time
. @perfguru87 ?
Please review and accept if all well. Below changes -
Exporter tool
ComponentVersionList
model.`* entry1
python3.6 ./manage.py exporter -o -x export_file.xlsx
Options are:
x - output excel file name
o - overwrite excel file if exists
Importer tool
ComponentVersionList