-
Notifications
You must be signed in to change notification settings - Fork 8
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
[Feature]: profile page #135
Comments
Hi @moonlitgrace, |
hey @Sahal-Rasheed, those tabs will on different endpoints, like this other endpoints: you could use actions decorator for extra actions for profile endpoint. and i suggest you to take a look at how reddit UI is: here |
Hi @moonlitgrace, |
unfortunately, no for both. i dont have a proper db to share. and I dont use postman every time. apart from that, could you also add a |
hi @moonlitgrace, |
@Sahal-Rasheed, thats a good take. do we actually need another 2 serializers? # annotate a new value to queryset
posts = <post-filter-here>.annotate(type=Value("post", CharField()))
comments = <comment-filter-here>.annotate(type=Value("comment", CharField()))
sorted_list = # [do something to sort based on "created_at" value)
serialized_data = OverviewSerializer(sorted_list, many=True).data
# OverviewSerializer
class OverviewSerializer(serializers.Serializer):
type = serializers.CharField()
data = serializers.SerializerMethodField()
def get_data(self, obj):
# remove type field from obj and pass to serializers
if obj.type == "post":
return PostSerializer(obj).data
return CommentSerializer(obj).data
# do other stuffs so the output will be like: [{ "type": "comment", "data": ...data_here }, ...same for post type ] |
@moonlitgrace, if the existing |
@Sahal-Rasheed since overview is not a specific app, what abt doing it like- |
@moonlitgrace, I’ve opened a PR (#160) implementing |
@Sahal-Rasheed here you go: #160 (review) |
@moonlitgrace so ig the backend stuff related to this issue is now sorted. so any other stuff should i look in to in backend ? |
@Sahal-Rasheed api looks good, I'll start FE integration and will let u know if any changes are needed in backend. |
Describe the feature
profile page akin to https://www.reddit.com/user/GovernmentWaste3396/
just add only necessary features and stuff and disable others which will be implemented later.
How important is this feature?
High priority
Additional context or examples
No response
The text was updated successfully, but these errors were encountered: