-
Notifications
You must be signed in to change notification settings - Fork 1
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
final merge from timmy #86
base: main
Are you sure you want to change the base?
Conversation
…into commanderZero
…into commanderZero
Feat: Add community model
all community endpoints (Sourcery refactored)
all community endpoints
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @timmyades3
I left some comments.
core/settings.py
Outdated
'default': { | ||
'ENGINE': 'django.db.backends.postgresql', | ||
'NAME': 'neondb', | ||
'USER': 'dimeji0518', | ||
'PASSWORD': 'cy8vHl7ASYTj', | ||
'HOST': 'ep-round-truth-56973996.us-east-2.aws.neon.tech', | ||
'PORT': '5432', | ||
'OPTIONS': {'sslmode': 'require'}, | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not expose secrets and push them on Github.
This is a dangerous bad practice.
Use env variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok done thanks
mentoring/urls.py
Outdated
path('sessions/<uuid:pk>/delete', views.SessionDeleteView.as_view(), name='session-delete'), | ||
|
||
|
||
path('sessions/<uuid:pk>/delete/', views.SessionDeleteView.as_view(), name='session-delete'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path('sessions/<uuid:pk>/delete/', views.SessionDeleteView.as_view(), name='session-delete'), | |
path('sessions/<uuid:pk>/', views.SessionDeleteView.as_view(), name='session-delete'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
mentoring/urls.py
Outdated
@@ -27,23 +26,19 @@ | |||
path('resource/<str:id>', views.RetrieveResourceApiView.as_view(), name='resource-detail'), | |||
path('resource/update/<str:id>/', views.updateResourceApiView.as_view(), name='resource-update'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path('resource/update/<str:id>/', views.updateResourceApiView.as_view(), name='resource-update'), | |
path('resource/<str:id>/', views.updateResourceApiView.as_view(), name='resource-update'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
community/views.py
Outdated
mail = request.user.email | ||
user = get_object_or_404(CustomUser, email=mail) | ||
id = kwargs.get("id") | ||
if id is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if id
also works fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
community/views.py
Outdated
if member := Members.objects.filter(community=community).first(): | ||
user_image = member.user.image | ||
else: | ||
user_image = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove the else branch
if member := Members.objects.filter(community=community).first(): | |
user_image = member.user.image | |
else: | |
user_image = None | |
user_image = None | |
if member := Members.objects.filter(community=community).first(): | |
user_image = member.user.image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems you haven't pushed the changes you've made @timmyades3
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes @timmyades3
No description provided.