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

Django management command for importing the stanzas #30

Merged
merged 5 commits into from
May 30, 2024
Merged

Conversation

hepplerj
Copy link
Member

No description provided.

hepplerj added 5 commits May 29, 2024 15:51
This commit updates the `load_stanzas.py` file to import poem data from a plain text file. It adds a new management command `handle` that takes a `--filepath` argument specifying the filepath of the plain text file to load. The content of the file is read and processed to import the stanzas into the database.

This change enhances the functionality of the application by allowing the import of poem data from external sources.
This commit modifies the `StanzaAdmin` class in the `admin.py` file to include the `list_display` attribute, which displays the `stanza_line_code_starts` and `stanza_text` fields in the admin interface. It also adds the `search_fields` attribute to enable searching for stanzas based on the `stanza_text` and `stanza_line_code_starts` fields.

This change improves the usability and accessibility of the admin interface for managing stanzas.
This commit updates the `load_stanzas.py` file to import stanzas from a plain text file. It adds a new management command `handle` that takes a `--filepath` argument specifying the filepath of the plain text file to load. The content of the file is read and processed to import the stanzas into the database.

This change enhances the functionality of the application by allowing the import of stanzas from external sources.
This commit adds the `ordering` attribute to the `Stanza` model in the `models.py` file. The `ordering` attribute specifies the default ordering of stanzas based on their `id` field. This change ensures that stanzas are consistently ordered when retrieved from the database.

This improvement enhances the predictability and consistency of stanza ordering in the application.
@hepplerj hepplerj self-assigned this May 30, 2024
@hepplerj hepplerj merged commit 7212d26 into main May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant