Skip to content

Conversation

@ksmuczynski
Copy link

This PR:

  • Updates the Thing model to include Well and Spring related fields.
  • De-registers the WellThing and SprigThing models from the admin.

# Define class-based choices for the 'thing_type' field.
# This allows for a more structured way to define and use choices in Django models.
# The format is CHOICE = " database value", "human-readable or display name"
class ThingType(models.TextChoices):
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be defined outside of the Thing class? I think that will make it easier to understand and follow

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it can. Good idea.


#Fields specific to a SPRING
spring_type = models.CharField(max_length=255, blank=True, null=True) # e.g. "artesian", "subartesian", "thermal", etc.
description_spring = models.CharField(max_length=255, blank=True, null=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of restricting description to a particular thing type, how about just having a general description field for all things?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, I was trying to think of another spring-specific field, but description does seem applicable to a general Thing.

Copy link
Contributor

@jacob-a-brown jacob-a-brown left a comment

Choose a reason for hiding this comment

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

this looks good to me

Copy link
Contributor

@chasetmartin chasetmartin left a comment

Choose a reason for hiding this comment

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

This looks good to me too.

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