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

added a featured field in stori models #159

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

agarjoshua
Copy link

No description provided.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello Contributor,👋👋 Thank You For Opening This Pull Request 🎉🎉

Welcome to SpaceYaTech

We are the fastest growing Africa Open-Source Community Looking To Change The Way Young Africans Get Started In Technology.

JOIN US | THRIVE | GROW

SpaceYaTech Server
SpaceYaTech LinkedIn
SpaceYaTech Twitter
Website

It's great having you contribute to this project

Welcome to the community 🤓 🍿 **Fun facts** - we eat bugs 🐛🐛🐛🐛 for breakfast 🥣

This Pull request has been queued for `review`

Sit tight the maintainers are on your case.

Soon the maintainers/owner will review it and provide you with feedback suggestions.
If you think it's something urgent, feel free to reach out

@agarjoshua agarjoshua mentioned this pull request Mar 8, 2024
Copy link

github-actions bot commented May 5, 2024

Stale pull request message

Copy link
Member

@JimmyTron JimmyTron left a comment

Choose a reason for hiding this comment

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

This PR introduces a new featured field in the Stori model, allowing stories to be marked as featured, which adds useful functionality for content prioritization. After reviewing the changes, I approve the PR with the following observations:

Model update: This is useful for content management and display, especially for blogs or story-based platforms.

Serializer update: This aligns the model and API, maintaining consistency across the project.

Recommendations:
Testing the functionality to verify that stories can be properly marked as featured and that the featured field behaves as expected in both the admin and API views.
This is a well-implemented update that adds valuable functionality to the project.

@@ -41,6 +41,7 @@ class Status(models.TextChoices):
content = RichTextUploadingField()
created_by = models.ForeignKey(Account, on_delete=models.SET_NULL, null=True)
status = models.CharField(max_length=9,choices=Status.choices, default=Status.Draft) #"""This here serves to indicate whether a stori has been published or not."""
featured = models.BooleanField(default=False) #"""This here serves to indicate whether a stori is featured or not."""
Copy link
Member

Choose a reason for hiding this comment

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

The addition of the featured field (models.BooleanField(default=False)) is a practical enhancement to the Stori model, enabling the ability to distinguish featured content

blog/migrations/0003_stori_featured.py Show resolved Hide resolved
blog/serializers.py Show resolved Hide resolved
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.

2 participants