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

Feature/spaces #3

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Feature/spaces #3

wants to merge 7 commits into from

Conversation

therealtod
Copy link
Contributor

The 'spaces' app introduces a new feature that allows basic CRUD operations on "Place" objects.

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
@ssaavedra
Copy link
Member

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
Copy link
Member

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)
Copy link
Member

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') ?

@ssaavedra
Copy link
Member

Ping?

@therealtod
Copy link
Contributor Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants