-
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
Feature/spaces #3
base: master
Are you sure you want to change the base?
Conversation
Through the 'accounts' application, we provide a backend capable of managing user acounts registration and activation, user profile editing and user's password updating. An user can be created by a POST request to the 'user-list'. The creation of a user automaticaly triggers the creation of his corresponding profile (which right now contains information such as: gender, birthdate, location and nationality,and is easily upgradable in the future with new fields), which can be updated with PUT or PATCH requests to 'user-update-profile' endpoint. Furthermore at the end of the registration process, an activation mail will be sent to the user, providing a link that accepts a GET request, which if correctly delivered will set to "True" the is_active flag of the corresponding user object. Finally a user can change is own password instantiating a POST request to the 'user-change-password' endpoint.
Through the 'accounts' application, we provide a backend capable of managing user accounts registration and activation, user profile editing and user's password updating. An user can be created by a POST request to the 'user-list'. The creation of a user automatically triggers the creation of his corresponding profile (which right now contains information such as: gender, birth date, location and nationality,and is easily upgradable in the future with new fields), which can be updated with PUT or PATCH requests to 'user-update-profile' endpoint. Furthermore at the end of the registration process, an activation mail will be sent to the user, providing a link that accepts a GET request, which if correctly delivered will set to "True" the is_active flag of the corresponding user object. Finally a user can change is own password instantiating a POST request to the 'user-change-password' endpoint.
The code introduces a new model called "Place" that represents a physical site that can host events. It features fields that can store general information (name, description and owner) plus an Address field, which is actually a separate model that encapsulates all the infos about the physical location of the Place. Common CRUD operations are supported. A specific @detail_route had been created for the update operation to deal with the nested kind of structure of the "Place" entity.
# Conflicts: # accounts/viewsets.py # api/urls.py # xea_core/settings.py
Then it should probably be called the 'places', and not 'spaces' app, and their URLs be on the 'place' prefix, not 'spaces' ;-) |
@@ -0,0 +1,19 @@ | |||
from rest_framework import permissions |
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.
Es buena idea hacer este refactor, pero si esto fuese una pull request por si mismo, ya estaría probablemente listo para mergear.
The code introduces a new model called "Place" that represents a physical site that can host events. It features fields that can store general information (name, description and owner) plus an Address field, which is actually a separate model Common CRUD operations are supported. A specific @detail_route had been created for the update operation to deal with the nested kind of structure of the "Place" entity.
@@ -20,21 +20,22 @@ def update(self, instance, validated_data): | |||
instance.name = validated_data.get('name', instance.name) | |||
instance.owner = validated_data.get('owner', instance.owner) | |||
instance.description = validated_data.get('nationality', instance.description) |
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.
description is validated_data.get('nationality') ?
Ping? |
Pong: Esta semana sigo muy líado. Espero poder implementar los cambios que discutimos para la siguiente (o mañana, si acabo las prácticas con antelación) |
The 'spaces' app introduces a new feature that allows basic CRUD operations on "Place" objects.