Skip to content
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

add option to get ddl only from selected apps #7

Merged
merged 3 commits into from
Jan 24, 2024
Merged

add option to get ddl only from selected apps #7

merged 3 commits into from
Jan 24, 2024

Conversation

ronenlu
Copy link
Member

@ronenlu ronenlu commented Jan 24, 2024

In django your project are separated into apps.
each apps has its own models, this PR enables to import DDL for partial set of the installed apps

Screen.Recording.2024-01-24.at.10.34.57.mov

traceback.print_exc()
self.stderr.write(f"failed to create migrations, {e}")
exit(1)
selected_apps = options.get("apps", None)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
selected_apps = options.get("apps", None)
selected_apps = options.get("apps", [])

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesnt work for me,
If I pass [] the check app_label not in apps: throw the error TypeError: argument of type 'NoneType' is not iterable

@ronenlu ronenlu requested a review from noamcattan January 24, 2024 09:09
Copy link
Member

@masseelch masseelch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test for this.

@ronenlu ronenlu force-pushed the apps_flag branch 2 times, most recently from d230a73 to 929f046 Compare January 24, 2024 11:52
@ronenlu ronenlu requested a review from masseelch January 24, 2024 11:53
@ronenlu ronenlu merged commit 8074450 into master Jan 24, 2024
4 checks passed
@ronenlu ronenlu deleted the apps_flag branch January 24, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants