Skip to content

Commit b51ac2d

Browse files
committed
feat: Add CODEOWNERS, issue templates, pull request template, and request context middleware; refactor user model and serializers for current work experience
1 parent 0d5d09e commit b51ac2d

27 files changed

Lines changed: 296 additions & 48 deletions

.github/CODEOWNERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Code owners for BizBuch
2+
* @ujjwalkar0
3+
4+
# Owners for platform directories
5+
/android/ @ujjwalkar0
6+
/ios/ @ujjwalkar0
7+
/src/ @ujjwalkar0
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG] "
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
1. Go to '...'
15+
2. Click on '...'
16+
3. Scroll down to '...'
17+
4. See error
18+
19+
**Expected behavior**
20+
A clear and concise description of what you expected to happen.
21+
22+
**Screenshots or logs**
23+
If applicable, add screenshots or terminal logs to help explain your problem.
24+
25+
**Environment (please complete the following information):**
26+
- OS: [e.g. Android 14 / iOS 17 / Ubuntu 22.04]
27+
- App version: [e.g. Android v2.0 / iOS 2.0]
28+
- Node version: [e.g. 20]
29+
- Device/emulator: [e.g. Pixel 6 / iPhone 12]
30+
31+
**Additional context**
32+
Add any other context about the problem here.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "[FEATURE] "
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of the problem the feature would solve.
11+
12+
**Describe the solution you'd like**
13+
Provide a clear description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
If applicable, describe alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!-- Describe the changes in this pull request. -->
2+
3+
## Description
4+
Short description of the change and the motivation.
5+
6+
## Related Issue
7+
Fixes: #<issue-number>
8+
9+
## Type of change
10+
- [ ] Bug fix
11+
- [ ] New feature
12+
- [ ] Documentation update
13+
- [ ] Breaking change
14+
15+
## How Has This Been Tested?
16+
Describe the tests that you ran to verify your changes. Include details about the test environment and test cases.
17+
18+
## Checklist
19+
- [ ] My code follows the project style (linting and formatting).
20+
- [ ] I added tests that prove my fix is effective or that my feature works.
21+
- [ ] I updated the documentation where necessary.

.vscode/launch.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Python: Remote Attach",
6+
"type": "debugpy",
7+
"request": "attach",
8+
"connect": {
9+
"host": "localhost",
10+
"port": 5678
11+
},
12+
"pathMappings": [
13+
{
14+
"localRoot": "${workspaceFolder}",
15+
"remoteRoot": "/code"
16+
}
17+
],
18+
"justMyCode": true
19+
}
20+
]
21+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Generated by Django 5.2.8 on 2026-01-26 08:54
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('accounts', '0002_user_account_type_user_company_user_current_position_and_more'),
10+
]
11+
12+
operations = [
13+
migrations.RemoveField(
14+
model_name='user',
15+
name='company',
16+
),
17+
migrations.RemoveField(
18+
model_name='user',
19+
name='current_position',
20+
),
21+
migrations.RemoveField(
22+
model_name='user',
23+
name='industry',
24+
),
25+
]

accounts/models/user.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ class User(AbstractUser):
88

99
# Professional Info
1010
headline = models.CharField(max_length=255, blank=True, null=True) # e.g., "Senior Software Engineer at Google"
11-
current_position = models.CharField(max_length=255, blank=True, null=True) # Job title
12-
company = models.CharField(max_length=255, blank=True, null=True) # Current company name
13-
industry = models.CharField(max_length=100, blank=True, null=True) # e.g., "Technology", "Finance"
1411

1512
# Contact & Links
1613
phone = models.CharField(max_length=20, blank=True, null=True)

accounts/serializers/login_serializer.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,9 @@ def validate(self, data):
1414
# Try email first
1515
user = User.objects.filter(email__iexact=identifier).first()
1616

17-
print("User found by email:", user)
18-
1917
# If not email, try username
2018
if not user:
2119
user = User.objects.filter(username__iexact=identifier).first()
22-
23-
print("User found by username:", user)
24-
2520
if not user:
2621
raise serializers.ValidationError("Invalid credentials")
2722

accounts/views/token_validate_view.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ def post(self, request):
1212
serializer = TokenValidateSerializer(data=request.data)
1313

1414
if not serializer.is_valid():
15-
print("Token validation errors:", serializer.errors)
1615
return Response(
1716
{
1817
"valid": False,
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
from rest_framework import serializers
22
from activity.models import Activity
3+
from uploads.services import generate_presigned_view
34

45

56
class ActivitySerializer(serializers.ModelSerializer):
67
actor_username = serializers.CharField(source="actor.username", read_only=True)
8+
actor_avatar_url = serializers.SerializerMethodField()
79

810
class Meta:
911
model = Activity
1012
fields = [
1113
"id",
1214
"actor_username",
15+
"actor_avatar_url",
1316
"verb",
1417
"is_read",
1518
"created_at",
1619
]
20+
21+
def get_actor_avatar_url(self, obj):
22+
"""Get actor's avatar presigned URL"""
23+
if hasattr(obj.actor, 'profile') and obj.actor.profile and obj.actor.profile.avatar:
24+
return generate_presigned_view(obj.actor.profile.avatar)
25+
return None

0 commit comments

Comments
 (0)